You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



So you want to add something
(and not break the build) ...

Akkana Peck, akkana@netscape.com

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 if you add new makefiles).

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 subdirs in ../Makefile.in .

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 Makefile.in, and IDL files are exported by including them in the XPIDLSRCS list.

XPInstall

If you create something that needs to be present in an end-user distribution then don't forget to add it to the proper xpinstall packages. Add your file to the appropriate places (depending on where it's needed) in mozilla/xpinstall/packager/packages-win or mozilla/xpinstall/packager/xpcom-win.pkg (GRE), mozilla/xpinstall/packager/packages-static-win, mozilla/xpinstall/packager/packages-unix, mozilla/xpinstall/packager/packages-static-unix, and mozilla/xpinstall/packager/packages-os2. If your new files are needed by embedders, then also add them to the appropriate lists in mozilla/embedding/config/basebrowser-*.

Neglecting to add your new files to xpinstall packages means that your new feature will work when you run it from your own tree, but will break in packages distributed to actual end users.