You are currently viewing a snapshot of 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, please file a bug.
Embed/REQUIRES-based build mechanism

  1. What is this?
  2. How this works.
  3. Get me started.
  4. Options for
  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/, which is periodically saved to mozilla/tools/module-deps/ Based on this map and the module you want to build, 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/, mozilla/build/unix/

  3. Get me started.

    • Set up CVSROOT to point at the mozilla cvs repository, e.g.
    • Get the script, check it out into a small/temporary cvs tree:
        cvs checkout mozilla/tools/module-deps/
    • Create a new directory for your tree, and put there:
        mkdir <path-out-of-existing-cvs-tree>/newdir
        cd newdir
        ln -s <>/ .
    • 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 ./ --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/

      Subsequent builds (during a edit-compile iteration) can either use the --skip-cvs option to, or use a top-level make command.

  4. Options for

    • --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