bootstrap.pl:
Embed/REQUIRES-based build mechanism
Embed/REQUIRES-based build mechanism
-
What is this?
Embeddors need a way to build mozilla modules without pulling and building the entire mozilla tree. This mechanism will allow an embeddor to:
- Pull exactly the files needed for a given module
- Build only those files
- Make changes and re-build things easily
-
How this works.
A module-dependencies map gets created usingmozilla/tools/module-deps/module-graph.pl
, which is periodically saved tomozilla/tools/module-deps/all.dot
. Based on this map and the module you want to build, bootstrap.pl figures out the dependent modules needed, maps the resulting module list to a directory list, and then pulls those directories down and builds them.
In order to do this, some files are generated to make this work in the current build scheme (mozilla/allmakefiles.sh
,mozilla/build/unix/modules.mk
).
-
Get me started.
- Set up CVSROOT to point at the mozilla cvs repository, e.g.
:pserver:<user>%netscape.com@cvs.mozilla.org:/cvsroot :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
- Get the script, check it out into a small/temporary cvs tree:
cvs checkout mozilla/tools/module-deps/bootstrap.pl
- Create a new directory for your tree, and put bootstrap.pl there:
mkdir <path-out-of-existing-cvs-tree>/newdir cd newdir ln -s <path-to-bootstrap.pl>/bootstrap.pl .
- Pull, configure, and build your module. Example shown here is a wrapper for gtkembedmoz, this adds image decoders which are not required, but desirable for a usable TestGtkEmbed binary:
perl ./bootstrap.pl --module=gtkembedmoz-wrapper
Other modules tested so far are xpcom, necko. Note, this has been tested for single modules only at this point. If you start mixing modules, please be aware that this hasn't been tested much yet. For other modules, look atmozilla/tools/module-deps/all.dot
.
Subsequent builds (during a edit-compile iteration) can either use the --skip-cvs option to bootstrap.pl, or use a top-level make command.
- Options for bootstrap.pl
- --help
Show usage string, options. - --module=<mod>
Specify which module to build. - --skip-cvs
Do top-level build and config, but skip all cvs operations. Useful for iterating on module dependency changes, or re-generating config files. - --skip-core-cvs
Same as --skip-cvs, but only skips cvs for the main config files. Rest of tree still gets pulled. Useful for debugging core config files w/o getting cvs conflicts.
- Feedback, bugs
Please file bugs under the Build Config component, and/or send mail to mcafee. - Set up CVSROOT to point at the mozilla cvs repository, e.g.
Chris McAfee