mozilla

Revision 48886 of Adding Files to the Build

  • Revision slug: Adding_Files_to_the_Build
  • Revision title: Adding Files to the Build
  • Revision id: 48886
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment copy edit; 11 words added, 27 words removed

Revision Content

All platforms are now using the same set of makefiles for the build, so, finally, all you have to do are edit Makefile.in files (and possibly mozilla/allmakefiles.sh and possibly toolkit/toolkit-tiers.mk if you add new makefiles).

{{ Note("Don\'t forget to check Tinderbox after you check in!") }}

Adding files to the build

  • All platforms use Makefile.in files now. Edit these to add new source files, and export header files.
  • Dependencies are specified in Makefile.in too
  • If you add a new directory to the build, you have to add an entry for its makefile in the directory list in mozilla/allmakefiles.sh, as well as adding the directory to the list of subdirectories in ../Makefile.in.
  • Some directories are special, and you need to list new directories in toolkit/toolkit-tiers.mk. The files listed here are not specific to the toolkit/ directory, so if your makefile is not yet being processed correctly, try to add it here.
  • On platforms that build with gcc, because of the symbol visibility, you might have to check System Headers to make sure they are properly wrapped.

Checking in

Adding new files to the build can cause breakage on tinderbox and to other developers if things aren't checked in the correct order.

  1. Check in only the new files.
  2. Check in the patches to existing files that make your new files get used.

Exporting files

Exporting a file makes it get copied to mozilla/dist. C and C++ header files are exported by including them the EXPORTS list in {{ Source("xpcom/base/Makefile.in#60", "Makefile.in") }}, and IDL files are exported by including them in the XPIDLSRCS list.

Original Document Information

  • Author(s): Akkana Peck
  • Last Updated Date: May 28, 2007
  • Copyright Information: Portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details.

{{ languages( { "ja": "ja/Adding_Files_to_the_Build" } ) }}

Revision Source

<p>All platforms are now using the same set of makefiles for the build, so, finally, all you have to do are edit <code>Makefile.in</code> files (and possibly <code class="filename">mozilla/allmakefiles.sh</code> and possibly <code>toolkit/toolkit-tiers.mk</code> if you add new makefiles).</p>
<p>{{ Note("Don\'t forget to check Tinderbox after you check in!") }}</p>
<h2 id="Adding_files_to_the_build" name="Adding_files_to_the_build">Adding files to the build</h2>
<ul> <li>All platforms use <code class="filename">Makefile.in</code> files now. Edit these to add new source files, and export header files.</li> <li>Dependencies are specified in <code class="filename">Makefile.in</code> too</li> <li>If you add a new directory to the build, you have to add an entry for its makefile in the directory list in <code class="filename">mozilla/allmakefiles.sh</code>, as well as adding the directory to the list of subdirectories in <code class="filename">../Makefile.in</code>.</li> <li>Some directories are special, and you need to list new directories in <code>toolkit/toolkit-tiers.mk</code>. The files listed here are not specific to the <code>toolkit/</code> directory, so if your makefile is not yet being processed correctly, try to add it here.</li> <li>On platforms that build with <code>gcc</code>, because of the symbol visibility, you might have to check <a href="/en/System_Headers" title="en/System_Headers">System Headers</a> to make sure they are properly wrapped.</li>
</ul>
<h2 id="Checking_In" name="Checking_In">Checking in</h2>
<p>Adding new files to the build can cause breakage on tinderbox and to other developers if things aren't checked in the correct order.</p>
<ol> <li>Check in only the new files.</li> <li>Check in the patches to existing files that make your new files get used.</li>
</ol>
<h2 id="Exporting_Files" name="Exporting_Files">Exporting files</h2>
<p>Exporting a file makes it get copied to <code>mozilla/dist</code>. C and C++ header files are exported by including them the <code>EXPORTS</code> list in {{ Source("xpcom/base/Makefile.in#60", "Makefile.in") }}, and IDL files are exported by including them in the <code>XPIDLSRCS</code> list.</p>
<p>Original Document Information</p>
<div class="originaldocinfo"> <ul> <li>Author(s): <a class="link-mailto" href="mailto:akkana@netscape.com">Akkana Peck</a></li> <li>Last Updated Date: May 28, 2007</li> <li>Copyright Information: Portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a Creative Commons license | <a class="external" href="http://www.mozilla.org/foundation/licensing/website-content.html">Details</a>.</li> </ul>
</div>
<p>{{ languages( { "ja": "ja/Adding_Files_to_the_Build" } ) }}</p>
Revert to this revision