http://wiki.caminobrowser.org/index.php?title=Development:Building:Common_make_Targets&feed=atom&action=historyDevelopment:Building:Common make Targets - Revision history2024-03-29T11:42:09ZRevision history for this page on the wikiMediaWiki 1.34.4http://wiki.caminobrowser.org/index.php?title=Development:Building:Common_make_Targets&diff=9625&oldid=prevSardisson: /* Other useful <code>make</code> tricks */ tweak to more than build2009-01-24T22:41:20Z<p><span dir="auto"><span class="autocomment">Other useful <code>make</code> tricks: </span> tweak to more than build</span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 22:41, 24 January 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l23" >Line 23:</td>
<td colspan="2" class="diff-lineno">Line 23:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Other useful <code>make</code> tricks==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Other useful <code>make</code> tricks==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><code>make</code> is also capable of <del class="diffchange diffchange-inline">rebuilding </del>directories selectively using <code>-C ''directory''</code> rather than performing a full recursive <del class="diffchange diffchange-inline">build</del>. Some scenarios where this is useful include:</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><code>make</code> is also capable of <ins class="diffchange diffchange-inline">processing </ins>directories selectively using <code>-C ''directory''</code> rather than performing a full recursive <ins class="diffchange diffchange-inline">pass through the tree</ins>. Some scenarios where this is useful include:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Widget code - You've made changes to Cocoa widget code; as described in [[Development:Building#Widget code|the build instructions]], you can <code>make</code> in the Widget directory and then Camino to get the Widget changes into your build. From the root of your <code>$OBJDIR</code>, run the following command: <code>make -C widget/src/cocoa; make -C embedding/config; make -C camino</code></div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Widget code - You've made changes to Cocoa widget code; as described in [[Development:Building#Widget code|the build instructions]], you can <code>make</code> in the Widget directory and then Camino to get the Widget changes into your build. From the root of your <code>$OBJDIR</code>, run the following command: <code>make -C widget/src/cocoa; make -C embedding/config; make -C camino</code></div></td></tr>
</table>Sardissonhttp://wiki.caminobrowser.org/index.php?title=Development:Building:Common_make_Targets&diff=9624&oldid=prevSardisson: /* Targets */ slight tweaks to wording2009-01-24T22:39:45Z<p><span dir="auto"><span class="autocomment">Targets: </span> slight tweaks to wording</span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 22:39, 24 January 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l11" >Line 11:</td>
<td colspan="2" class="diff-lineno">Line 11:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* <code>clean</code> - Removes the object files and other generated files, as well as any files or directories in the <code>GARBAGE</code> or <code>GARBAGE_DIRS</code> Makefile variables; it runs recursively from the point in the directory hierarchy where it is called. When run for Camino, <code>clean</code> also removes the <code>build/</code> directory.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* <code>clean</code> - Removes the object files and other generated files, as well as any files or directories in the <code>GARBAGE</code> or <code>GARBAGE_DIRS</code> Makefile variables; it runs recursively from the point in the directory hierarchy where it is called. When run for Camino, <code>clean</code> also removes the <code>build/</code> directory.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>** This target can <del class="diffchange diffchange-inline">only </del>be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>** This target can be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds <ins class="diffchange diffchange-inline">(or with <code>make -f client.mk</code>)</ins>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* <code>distclean</code> - Like <code>clean</code>, this removes intermediate build products (like object files), but it also removes Makefiles as well as any and all final build products in <code>dist/</code>; it runs recursively from the point in the directory hierarchy where it is called. When run for Camino, this removes Camino’s intermediate build products (like object files and the <code>build/</code> directory), as well as any of Camino's final build products in <code>dist/</code>.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* <code>distclean</code> - Like <code>clean</code>, this removes intermediate build products (like object files), but it also removes Makefiles as well as any and all final build products in <code>dist/</code>; it runs recursively from the point in the directory hierarchy where it is called. When run for Camino, this removes Camino’s intermediate build products (like object files and the <code>build/</code> directory), as well as any of Camino's final build products in <code>dist/</code>.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>** This target can <del class="diffchange diffchange-inline">only </del>be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>** This target can be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds <ins class="diffchange diffchange-inline">(or with <code>make -f client.mk</code>)</ins>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* <code>export</code> - <code>export</code> is usually the first target run by <code>build</code> or a stand-alone <code>make</code>; it configures the build, generates headers from IDL files, and exports various headers to locations where other parts of the build process can find them. There are few situations where you would run this target by itself in a full Mozilla build. For Camino, when first called by <code>client.mk</code>’s <code>export</code> target, the <code>export</code> target sets up the Camino part of the OBJDIR. This involves symlinking the <code>wallet</code> files and most source directories and copying the project files without clobbering the personal settings contained within. You should re-run this target in your <code>$OBJDIR</code> each time the project file is updated, when the Makefile itself changes (it will update itself in the OBJDIR), or when a new subdirectory is added to <code>mozilla/camino</code>.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* <code>export</code> - <code>export</code> is usually the first target run by <code>build</code> or a stand-alone <code>make</code>; it configures the build, generates headers from IDL files, and exports various headers to locations where other parts of the build process can find them. There are few situations where you would run this target by itself in a full Mozilla build. For Camino, when first called by <code>client.mk</code>’s <code>export</code> target, the <code>export</code> target sets up the Camino part of the OBJDIR. This involves <ins class="diffchange diffchange-inline">generating the Makefile from <code>Makefile.in</code>, </ins>symlinking the <code>wallet</code> files and most source directories<ins class="diffchange diffchange-inline">, </ins>and copying the project files without clobbering the personal settings contained within. You should re-run this target in your <code>$OBJDIR</code> each time the project file is updated, when the Makefile itself changes (it will update itself in the OBJDIR), or when a new subdirectory is added to <code>mozilla/camino</code>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* <code>libs</code> - This target is rarely called directly, either in a full Mozilla build or for Camino; however, it is the meat of a Camino build. <del class="diffchange diffchange-inline">The </del>targets <del class="diffchange diffchange-inline">it </del>depends on generate all of the Camino files that <del class="diffchange diffchange-inline">depend </del>on preprocessing (''e.g.'', <code>all-camino.js</code>, <code>Info.plist</code>, and all of the <code>Localizable.strings</code> and other <code>.strings</code> files. This target is also responsible for the <code>embed-replacements</code> system, for calling <code>xcodebuild</code> in the initial Mozilla build and in command-line Camino builds, copying the final Camino application to <code>dist/</code>, and handling the <code>xpt</code> files. After any <code>.strings</code> file changes, any updates to the Gecko milestone, or Camino version number change, the various dependent targets need to be re-run; the simplest way to do this is to simply <code>make</code> in <code>$OBJDIR/camino</CODE> (or <code>mozilla/camino</CODE> in a srcdir build).</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* <code>libs</code> - This target is rarely called directly, either in a full Mozilla build or for Camino; however, it is the meat of a Camino build. <ins class="diffchange diffchange-inline">In Camino, the </ins>targets <ins class="diffchange diffchange-inline"><code>libs</code> </ins>depends on generate all of the Camino files that <ins class="diffchange diffchange-inline">require </ins>on preprocessing (''e.g.'', <code>all-camino.js</code>, <code>Info.plist</code>, and all of the <code>Localizable.strings</code> and other <code>.strings</code> files. This target is also responsible for the <code>embed-replacements</code> system, for calling <code>xcodebuild</code> in the initial Mozilla build and in command-line Camino builds, <ins class="diffchange diffchange-inline">for </ins>copying the final Camino application to <code>dist/</code>, and <ins class="diffchange diffchange-inline">for </ins>handling the <code>xpt</code> files. After any <code>.strings</code> file changes, any updates to the Gecko milestone, or <ins class="diffchange diffchange-inline">any </ins>Camino version number change, the various dependent targets need to be re-run; the simplest way to do this is to simply <code>make</code> in <code>$OBJDIR/camino</CODE> (or <code>mozilla/camino</CODE> in a srcdir build).</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** '''''N.B.''''' Camino also has certain “external” pieces of code that are built only by recursive <code>make</code> and not by separate Camino Makefile targets or by project-related dependencies. If you do not <code>make</code> in Camino after these pieces of code are added or modified, your Xcode build will fail or will not pick up the changes.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** '''''N.B.''''' Camino also has certain “external” pieces of code that are built only by recursive <code>make</code> and not by separate Camino Makefile targets or by project-related dependencies. If you do not <code>make</code> in Camino after these pieces of code are added or modified, your Xcode build will fail or will not pick up the changes.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>Sardissonhttp://wiki.caminobrowser.org/index.php?title=Development:Building:Common_make_Targets&diff=9623&oldid=prevSardisson: /* Targets */ add Makefile note here, too2009-01-24T22:32:46Z<p><span dir="auto"><span class="autocomment">Targets: </span> add Makefile note here, too</span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 22:32, 24 January 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l13" >Line 13:</td>
<td colspan="2" class="diff-lineno">Line 13:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** This target can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** This target can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* <code>distclean</code> - Like <code>clean</code>, this removes intermediate build products (like object files), but it also removes any and all final build products in <code>dist/</code>; it runs recursively from the point in the directory hierarchy where it is called. When run for Camino, this removes Camino’s intermediate build products (like object files and the <code>build/</code> directory), as well as any of Camino's final build products in <code>dist/</code>.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* <code>distclean</code> - Like <code>clean</code>, this removes intermediate build products (like object files), but it also removes <ins class="diffchange diffchange-inline">Makefiles as well as </ins>any and all final build products in <code>dist/</code>; it runs recursively from the point in the directory hierarchy where it is called. When run for Camino, this removes Camino’s intermediate build products (like object files and the <code>build/</code> directory), as well as any of Camino's final build products in <code>dist/</code>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** This target can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** This target can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
</table>Sardissonhttp://wiki.caminobrowser.org/index.php?title=Development:Building:Common_make_Targets&diff=9622&oldid=prevSardisson: changes suggested by Ilya + make -C for clean/distclean2009-01-24T22:31:01Z<p>changes suggested by Ilya + make -C for clean/distclean</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 22:31, 24 January 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>You can run <code>make</code> with <del class="diffchange diffchange-inline">several </del>different targets to perform various tasks. Most interesting <code>make</code> targets can be found in <code>[http://mxr.mozilla.org/mozilla/source/client.mk mozilla/client.mk]</code> and various Makefiles, such as <code>[http://mxr.mozilla.org/mozilla/source/camino/Makefile.in mozilla/camino/Makefile.in]</code> and <code>[http://mxr.mozilla.org/mozilla/source/camino/installer/Makefile.in mozilla/camino/installer/Makefile.in]</code>.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>You can run <code>make</code> with <ins class="diffchange diffchange-inline">a number of </ins>different targets to perform various tasks. Most interesting <code>make</code> targets can be found in <code>[http://mxr.mozilla.org/mozilla/source/client.mk mozilla/client.mk]</code> and various Makefiles, such as <code>[http://mxr.mozilla.org/mozilla/source/camino/Makefile.in mozilla/camino/Makefile.in]</code> and <code>[http://mxr.mozilla.org/mozilla/source/camino/installer/Makefile.in mozilla/camino/installer/Makefile.in]</code>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>==<code>client.mk</code><del class="diffchange diffchange-inline">==</del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>==<ins class="diffchange diffchange-inline">Targets==</ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">''Unless </del>otherwise noted<del class="diffchange diffchange-inline">, all </del>targets can be used with both <code>make</code> in the <code>$OBJDIR</code> <del class="diffchange diffchange-inline">and </del><code>make <del class="diffchange diffchange-inline">-f client.mk</del></code> in the <code>$SRCDIR</code> (<del class="diffchange diffchange-inline">or </del><code><del class="diffchange diffchange-inline">make</del></code> <del class="diffchange diffchange-inline">in the </del><code><del class="diffchange diffchange-inline">$SRCDIR</del></code> <del class="diffchange diffchange-inline">in </del>a srcdir <del class="diffchange diffchange-inline">build </del>after <del class="diffchange diffchange-inline">the initial </del><code>client.mk</code>-driven build).''</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">''Targets are valid for both Camino Makefiles (and any other Makefile in the tree) and for </ins><code>client.mk</code><ins class="diffchange diffchange-inline">, unless </ins>otherwise noted<ins class="diffchange diffchange-inline">. All </ins>targets can be used with both <code>make</code> in the <code>$OBJDIR</code> <ins class="diffchange diffchange-inline">or </ins><code>make</code> in the <code>$SRCDIR</code> <ins class="diffchange diffchange-inline">in a srcdir build </ins>(<ins class="diffchange diffchange-inline">after the initial </ins><code><ins class="diffchange diffchange-inline">client.mk</ins></code><ins class="diffchange diffchange-inline">-driven build). Running </ins><code><ins class="diffchange diffchange-inline">make</ins></code> <ins class="diffchange diffchange-inline">with </ins>a <ins class="diffchange diffchange-inline">target at the root of the OBJDIR (or </ins>srcdir<ins class="diffchange diffchange-inline">, </ins>after <ins class="diffchange diffchange-inline">a </ins><code>client.mk</code>-driven build) <ins class="diffchange diffchange-inline">will run that target recursively throughout the entire tree, including for Camino</ins>.''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* <code>build</code> - This target triggers a full Mozilla build without performing a checkout (or update) first <del class="diffchange diffchange-inline">(this </del>can only be used with <code>make -f client.mk</code> in the <code>$SRCDIR</code>; <del class="diffchange diffchange-inline">in </del>the <code>$OBJDIR</code>, <code>make</code> with no target is the equivalent<del class="diffchange diffchange-inline">)</del>.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* <code>build</code> - This target triggers a full Mozilla build without performing a checkout (or update) first</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">** This </ins>can only be used with <code>make -f client.mk</code> in the <code>$SRCDIR</code>; <ins class="diffchange diffchange-inline">at the root of </ins>the <code>$OBJDIR</code>, <code>make</code> with no target is the equivalent.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* <code>checkout</code> - This target triggers a Mozilla cvs checkout (or update of an existing checkout) without subsequently performing a build <del class="diffchange diffchange-inline">(for </del>obvious reasons, this can only be used with <code>make -f client.mk</code> in the <code>$SRCDIR</code><del class="diffchange diffchange-inline">)</del>.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* <code>checkout</code> - This target triggers a Mozilla cvs checkout (or update of an existing checkout) without subsequently performing a build<ins class="diffchange diffchange-inline">.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">** For </ins>obvious reasons, this can only be used with <code>make -f client.mk</code> in the <code>$SRCDIR</code>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* <code>clean</code> - Removes the object files and other generated files, as well as any files or directories in the <code>GARBAGE</code> or <code>GARBAGE_DIRS</code> Makefile variables <del class="diffchange diffchange-inline">(</del>can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds<del class="diffchange diffchange-inline">)</del>.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* <code>clean</code> - Removes the object files and other generated files, as well as any files or directories in the <code>GARBAGE</code> or <code>GARBAGE_DIRS</code> Makefile variables<ins class="diffchange diffchange-inline">; it runs recursively from the point in the directory hierarchy where it is called. When run for Camino, <code>clean</code> also removes the <code>build/</code> directory.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">** This target </ins>can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* <code>distclean</code> - Like <code>clean</code>, this removes intermediate build products (like object files), but it also removes any and all final build products in <code>dist/</code> (can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds<del class="diffchange diffchange-inline">)</del>.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* <code>distclean</code> - Like <code>clean</code>, this removes intermediate build products (like object files), but it also removes any and all final build products in <code>dist/</code><ins class="diffchange diffchange-inline">; it runs recursively from the point in the directory hierarchy where it is called. When run for Camino, this removes Camino’s intermediate build products </ins>(<ins class="diffchange diffchange-inline">like object files and the <code>build/</code> directory), as well as any of Camino's final build products in <code>dist/</code>.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">** This target </ins>can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* <code>export</code> - <code>export</code> is usually the first target run by <code>build</code> or a stand-alone <code>make</code>; it configures the build, generates headers from IDL files, and exports various headers to locations where other parts of the build process can find them. There are few situations where you would run this target by itself in a full Mozilla build.</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* <code>export</code> - <code>export</code> is usually the first target run by <code>build</code> or a stand-alone <code>make</code>; it configures the build, generates headers from IDL files, and exports various headers to locations where other parts of the build process can find them. There are few situations where you would run this target by itself in a full Mozilla build<ins class="diffchange diffchange-inline">. For Camino, when first called by <code>client.mk</code>’s <code>export</code> target, the <code>export</code> target sets up the Camino part of the OBJDIR. This involves symlinking the <code>wallet</code> files and most source directories and copying the project files without clobbering the personal settings contained within. You should re-run this target in your <code>$OBJDIR</code> each time the project file is updated, when the Makefile itself changes (it will update itself in the OBJDIR), or when a new subdirectory is added to <code>mozilla/camino</code></ins>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">==<code>camino/Makefile.in</code>==</del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* <code>libs</code> - This target is rarely called directly<ins class="diffchange diffchange-inline">, either in a full Mozilla build or for Camino</ins>; however, it is the meat of a Camino build. The targets it depends on generate all of the Camino files that depend on preprocessing (''e.g.'', <code>all-camino.js</code>, <code>Info.plist</code>, and all of the <code>Localizable.strings</code> and other <code>.strings</code> files. This target is also responsible for the <code>embed-replacements</code> system, for calling <code>xcodebuild</code> in the initial Mozilla build and in command-line Camino builds, copying the final Camino application to <code>dist/</code>, and handling the <code>xpt</code> files. After any <code>.strings</code> file changes, any updates to the Gecko milestone, or Camino version number change, the various dependent targets need to be re-run; the simplest way to do this is to simply <code>make</code> in <code>$OBJDIR/camino</CODE> (or <code>mozilla/camino</CODE> in a srcdir build).</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">''Camino shares many of the targets above with <code>client.mk</code>; running the <code>client.mk</code> target will also run the corresponding Camino target.''</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">* <code>clean</code> - Removes the object files and other generated files, the <code>build</code> directory, as well as any files or directories in the <code>GARBAGE</code> or <code>GARBAGE_DIRS</code> variables of Camino Makefiles (can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds).</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">* <code>distclean</code> - Like <code>clean</code>, this removes intermediate build products (like object files), but it also removes any of Camino's final build products in <code>dist/</code> (can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds).</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">* <code>export</code> - For Camino, when first called by <code>client.mk</code>’s <code>export</code> target, the <code>export</code> target sets up the Camino part of the OBJDIR. This involves symlinking the <code>wallet</code> files and most source directories and copying the project files without clobbering the personal settings contained within. You should re-run this target in your <code>$OBJDIR</code> each time the project file is updated, when the Makefile itself changes (it will update itself in the OBJDIR), or when a new subdirectory is added to <code>mozilla/camino</code>.</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* <code>libs</code> - This target is rarely called directly; however, it is the meat of a Camino build. The targets it depends on generate all of the Camino files that depend on preprocessing (''e.g.'', <code>all-camino.js</code>, <code>Info.plist</code>, and all of the <code>Localizable.strings</code> and other <code>.strings</code> files. This target is also responsible for the <code>embed-replacements</code> system, for calling <code>xcodebuild</code> in the initial Mozilla build and in command-line Camino builds, copying the final Camino application to <code>dist/</code>, and handling the <code>xpt</code> files. After any <code>.strings</code> file changes, any updates to the Gecko milestone, or Camino version number change, the various dependent targets need to be re-run; the simplest way to do this is to simply <code>make</code> in <code>$OBJDIR/camino</CODE> (or <code>mozilla/camino</CODE> in a srcdir build).</div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** '''''N.B.''''' Camino also has certain “external” pieces of code that are built only by recursive <code>make</code> and not by separate Camino Makefile targets or by project-related dependencies. If you do not <code>make</code> in Camino after these pieces of code are added or modified, your Xcode build will fail or will not pick up the changes.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>** '''''N.B.''''' Camino also has certain “external” pieces of code that are built only by recursive <code>make</code> and not by separate Camino Makefile targets or by project-related dependencies. If you do not <code>make</code> in Camino after these pieces of code are added or modified, your Xcode build will fail or will not pick up the changes.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del class="diffchange diffchange-inline">=</del>==Other useful <code>make</code> tricks<del class="diffchange diffchange-inline">=</del>==</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>==Other useful <code>make</code> tricks==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><code>make</code> is also capable of rebuilding directories selectively using <code>-C ''directory''</code> rather than performing a full recursive build. Some scenarios where this is useful include:</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div><code>make</code> is also capable of rebuilding directories selectively using <code>-C ''directory''</code> rather than performing a full recursive build. Some scenarios where this is useful include:</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l35" >Line 35:</td>
<td colspan="2" class="diff-lineno">Line 30:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Rebuilding an “external” piece of Camino - Some “external” Camino dependencies (those bits of code in directories sitting directly in <code>mozilla/camino</code> rather than in <code>mozilla/camino/src</code>) have their own makefiles and can be built separately (they are normally built by recursive <code>make</code> from <code>camino</code>). If you were hacking on the feedhandlers or Flashblock, you may wish to check your changes by simply rebuilding them rather than all of Camino; from <code>$OBJDIR/camino</code>, run <code>make -C feedhandlers</code> or <code>make -C flashblock</code> to build these pieces. External pieces that are built using Xcode projects can generally ''not'' be built in this manner.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* Rebuilding an “external” piece of Camino - Some “external” Camino dependencies (those bits of code in directories sitting directly in <code>mozilla/camino</code> rather than in <code>mozilla/camino/src</code>) have their own makefiles and can be built separately (they are normally built by recursive <code>make</code> from <code>camino</code>). If you were hacking on the feedhandlers or Flashblock, you may wish to check your changes by simply rebuilding them rather than all of Camino; from <code>$OBJDIR/camino</code>, run <code>make -C feedhandlers</code> or <code>make -C flashblock</code> to build these pieces. External pieces that are built using Xcode projects can generally ''not'' be built in this manner.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">* Cleaning a single directory - Any directory with its own Makefile can be <code>clean</code>ed or <code>distclean</code>ed separately. For instance, you may want to clean up just <code>striptease</code>; in that case, from <code>$OBJDIR/camino</code>, run <code>make -C striptease clean</code>. '''N.B.''' If you <code>distclean</code> a directory, you will need to run its parent’s <code>export</code> target or <code>make -f client.mk</code> from <code>mozilla</code> in order to regenerate that directory's Makefile.</ins></div></td></tr>
</table>Sardissonhttp://wiki.caminobrowser.org/index.php?title=Development:Building:Common_make_Targets&diff=9621&oldid=prevSardisson: initial version of these tips2009-01-24T21:38:11Z<p>initial version of these tips</p>
<p><b>New page</b></p><div>You can run <code>make</code> with several different targets to perform various tasks. Most interesting <code>make</code> targets can be found in <code>[http://mxr.mozilla.org/mozilla/source/client.mk mozilla/client.mk]</code> and various Makefiles, such as <code>[http://mxr.mozilla.org/mozilla/source/camino/Makefile.in mozilla/camino/Makefile.in]</code> and <code>[http://mxr.mozilla.org/mozilla/source/camino/installer/Makefile.in mozilla/camino/installer/Makefile.in]</code>.<br />
<br />
==<code>client.mk</code>==<br />
''Unless otherwise noted, all targets can be used with both <code>make</code> in the <code>$OBJDIR</code> and <code>make -f client.mk</code> in the <code>$SRCDIR</code> (or <code>make</code> in the <code>$SRCDIR</code> in a srcdir build after the initial <code>client.mk</code>-driven build).''<br />
<br />
* <code>build</code> - This target triggers a full Mozilla build without performing a checkout (or update) first (this can only be used with <code>make -f client.mk</code> in the <code>$SRCDIR</code>; in the <code>$OBJDIR</code>, <code>make</code> with no target is the equivalent).<br />
<br />
* <code>checkout</code> - This target triggers a Mozilla cvs checkout (or update of an existing checkout) without subsequently performing a build (for obvious reasons, this can only be used with <code>make -f client.mk</code> in the <code>$SRCDIR</code>).<br />
<br />
* <code>clean</code> - Removes the object files and other generated files, as well as any files or directories in the <code>GARBAGE</code> or <code>GARBAGE_DIRS</code> Makefile variables (can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds).<br />
<br />
* <code>distclean</code> - Like <code>clean</code>, this removes intermediate build products (like object files), but it also removes any and all final build products in <code>dist/</code> (can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds).<br />
<br />
* <code>export</code> - <code>export</code> is usually the first target run by <code>build</code> or a stand-alone <code>make</code>; it configures the build, generates headers from IDL files, and exports various headers to locations where other parts of the build process can find them. There are few situations where you would run this target by itself in a full Mozilla build.<br />
<br />
==<code>camino/Makefile.in</code>==<br />
''Camino shares many of the targets above with <code>client.mk</code>; running the <code>client.mk</code> target will also run the corresponding Camino target.''<br />
<br />
* <code>clean</code> - Removes the object files and other generated files, the <code>build</code> directory, as well as any files or directories in the <code>GARBAGE</code> or <code>GARBAGE_DIRS</code> variables of Camino Makefiles (can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds).<br />
<br />
* <code>distclean</code> - Like <code>clean</code>, this removes intermediate build products (like object files), but it also removes any of Camino's final build products in <code>dist/</code> (can only be used in the <code>$OBJDIR</code> in OBJDIR builds and in the <code>$SRCDIR</code> in non-OBJDIR builds).<br />
<br />
* <code>export</code> - For Camino, when first called by <code>client.mk</code>’s <code>export</code> target, the <code>export</code> target sets up the Camino part of the OBJDIR. This involves symlinking the <code>wallet</code> files and most source directories and copying the project files without clobbering the personal settings contained within. You should re-run this target in your <code>$OBJDIR</code> each time the project file is updated, when the Makefile itself changes (it will update itself in the OBJDIR), or when a new subdirectory is added to <code>mozilla/camino</code>.<br />
<br />
* <code>libs</code> - This target is rarely called directly; however, it is the meat of a Camino build. The targets it depends on generate all of the Camino files that depend on preprocessing (''e.g.'', <code>all-camino.js</code>, <code>Info.plist</code>, and all of the <code>Localizable.strings</code> and other <code>.strings</code> files. This target is also responsible for the <code>embed-replacements</code> system, for calling <code>xcodebuild</code> in the initial Mozilla build and in command-line Camino builds, copying the final Camino application to <code>dist/</code>, and handling the <code>xpt</code> files. After any <code>.strings</code> file changes, any updates to the Gecko milestone, or Camino version number change, the various dependent targets need to be re-run; the simplest way to do this is to simply <code>make</code> in <code>$OBJDIR/camino</CODE> (or <code>mozilla/camino</CODE> in a srcdir build).<br />
** '''''N.B.''''' Camino also has certain “external” pieces of code that are built only by recursive <code>make</code> and not by separate Camino Makefile targets or by project-related dependencies. If you do not <code>make</code> in Camino after these pieces of code are added or modified, your Xcode build will fail or will not pick up the changes.<br />
<br />
===Other useful <code>make</code> tricks===<br />
<br />
<code>make</code> is also capable of rebuilding directories selectively using <code>-C ''directory''</code> rather than performing a full recursive build. Some scenarios where this is useful include:<br />
<br />
* Widget code - You've made changes to Cocoa widget code; as described in [[Development:Building#Widget code|the build instructions]], you can <code>make</code> in the Widget directory and then Camino to get the Widget changes into your build. From the root of your <code>$OBJDIR</code>, run the following command: <code>make -C widget/src/cocoa; make -C embedding/config; make -C camino</code><br />
<br />
* Packaging a build - If you have a static build you want to distribute, you need to make in <code>camino/installer</code> to invoke the packaging mechanism. After making sure you have run a command-line build in Camino (to ensure all of the steps in the <code>libs</code> target have run, <code>make -C installer; open ../dist</code> from <code>$OBJDIR/camino</code> to generate the disk image and open the <code>dist/</code> directory. (If you have a Universal build and you only want to package one half, ensure you are in the appropriate architecture subdirectory—<code>$OBJDIR/ppc/camino</code> or <code>$OBJDIR/i386/camino</code>—and run <code>make -C installer UNIVERSAL_BINARY=</CODE>.) ''N.B. There is some situation in which you will need to do a full build from <code>make -f client.mk build</code> before performing packaging; I can't remember what that is right now, though.''<br />
<br />
* Rebuilding an “external” piece of Camino - Some “external” Camino dependencies (those bits of code in directories sitting directly in <code>mozilla/camino</code> rather than in <code>mozilla/camino/src</code>) have their own makefiles and can be built separately (they are normally built by recursive <code>make</code> from <code>camino</code>). If you were hacking on the feedhandlers or Flashblock, you may wish to check your changes by simply rebuilding them rather than all of Camino; from <code>$OBJDIR/camino</code>, run <code>make -C feedhandlers</code> or <code>make -C flashblock</code> to build these pieces. External pieces that are built using Xcode projects can generally ''not'' be built in this manner.</div>Sardisson