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.



bootstrap.pl:
Embed/REQUIRES-based build mechanism

  1. What is this?
  2. How this works.
  3. Get me started.
  4. Options for bootstrap.pl
  5. Feedback, bugs

  1. 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

  2. How this works.

    A module-dependencies map gets created using mozilla/tools/module-deps/module-graph.pl, which is periodically saved to mozilla/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).

  3. 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 at mozilla/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.

  4. 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.

  5. Feedback, bugs

    Please file bugs under the Build Config component, and/or send mail to mcafee.

Chris McAfee