From Fedora Project Wiki

(Created page with " == Method 1 == * Add scan-build to mock's chroot_setup_cmd, for example: <pre>config_opts['chroot_setup_cmd'] = 'install @buildsys-build /usr/bin/scan-build'</pre> * Set up...")
 
Line 6: Line 6:


* Set up an alias and use it instead of plain mock (everything on one line):
* Set up an alias and use it instead of plain mock (everything on one line):
<pre>alias mock-scan-build="mock --define '__scan_build /usr/bin/scan-build' --define '_configure %__scan_build ./configure' --define '__cmake %__scan_build %{_bindir}/cmake' --define '__make %__scan_build %{_bindir}/make' --define '___build_template
<pre>alias mock-scan-build="mock --define '__scan_build /usr/bin/scan-build' --define '_configure %__scan_build ./configure' --define '__cmake %__scan_build %{_bindir}/cmake' --define '__make %__scan_build %{_bindir}/make' --define '___build_template #!%{___build_shell}\\"$'\n'"alias make=\"%__make\" cmake=\"%__cmake\"\\"$'\n'"%{___build_pre}\\"$'\n'"%{nil}'"</pre>
#!%{___build_shell}\\"$'\n'"alias make=\"%__make\" cmake=\"%__cmake\"\\"$'\n'"%{___build_pre}\\"$'\n'"%{nil}'"</pre>


== Method 2 ==
== Method 2 ==

Revision as of 09:35, 31 December 2013

Method 1

  • Add scan-build to mock's chroot_setup_cmd, for example:
config_opts['chroot_setup_cmd'] = 'install @buildsys-build /usr/bin/scan-build'
  • Set up an alias and use it instead of plain mock (everything on one line):
alias mock-scan-build="mock --define '__scan_build /usr/bin/scan-build' --define '_configure %__scan_build ./configure' --define '__cmake %__scan_build %{_bindir}/cmake' --define '__make %__scan_build %{_bindir}/make' --define '___build_template #!%{___build_shell}\\"$'\n'"alias make=\"%__make\" cmake=\"%__cmake\"\\"$'\n'"%{___build_pre}\\"$'\n'"%{nil}'"

Method 2