The Mozilla
Organization
Our Mission
Who We Are
Getting Involved
Community
Editorials
What's New
Newsbot
Development
Roadmap
Module Owners
Blue Sky
Projects
Status
Tools
Products
Source Code
Binaries
Documentation
License Terms
Bug Reports
Quality
Search
Feedback
Configurator FAQ

Stephen Lamm, slamm@netscape.com
Last modified: Fri Aug 13 08:33:01 PDT 1999
Q. What are the Unix Build Configurator and client.mk?
Q. How does it work?
Q. Can I still do all the build steps by hand?
Q. Can I load an existing '.mozconfig' into the web Configutator?
Q. How do I force client.mk to run autoconf?
Q. How do I use .mozconfig with more than one tree?
Q. How do I temporarily disable .mozconfig?
Q. What is the best way to build with dependencies? Should I use 'make depend'?
Q. I changed a Makefile.in file. How to do I update the Makefile?
Q. What is the difference between 'ac_add_options' and 'mk_add_options'?
Q. What are the Unix Build Configurator and client.mk?
A. The Unix Build Configurator is a CGI form for picking and saving build options.
client.mk has been around for a while, but I never used it because there was no easy way to pass options into it. It used a set of environment variable to control parameters. However, these variables had no direct correlation to the options that configure used.

The .mozconfig script describes build options in a way that both client.mk and configure understand. It saves you the trouble of typing the options on the command-line all the time. Of course, you are still welcome to type options on the command-line if you want. Any options you give configure on the command-line will be listed after the .mozconfig options. In this way, you can override individual .mozconfig options.

 
Q. How does it work?
A. The Build Configurator produces a script, .mozconfig, that you save in your home directory. When client.mk runs, it reads in the options that apply to it (e.g. object dirctory). When configure runs, it also reads in the options that it understands.

If you are interested in more of the details, you can start by looking at the README file. Or, send me an email.

 
Q. Can I still do all the build steps by hand?
A. Absolutely. Fill free to mix and match build steps.
 
Q. Can I load an existing '.mozconfig' into the web Configutator?
A. Yes.
    cd mozilla
    gmake -f client.mk webconfig
It uses netscape -remote, so make sure you have netscape running.
 
Q. How do I force client.mk to run autoconf?
A. Set the environment variable RUN_AUTOCONF_LOCALLY. You should not need to do this unless you are making changes to configure.in. The configure script gets updated automatically anytime someone makes a change to configure.in.
 
Q. How do I use .mozconfig with more than one tree?
A. If you want to use different options with different trees, you can save a ".mozconfig" as mozilla/.mozconfig in the root of the tree. That file will be read instead of the .mozconfig in your home directory. If you only want to override an option or two, you could save a mozilla/.mozconfig like the following,
    # mozilla/.mozconfig
    . $HOME/.mozconfig
    ac_add_options --disable-debug
 
Q. How do I temporarily disable .mozconfig?
A. If you have a ~/.mozconfig, that you want to disable for a particular tree, you have two options. First, you can create an empty .mozconfig at the root of the tree,
    cd mozilla (top of the source tree)
    touch .mozconfig
    (build as usual)
Simply remove /.mozconfig when you want to revert to your ~/.mozconfig. Second, you can set $MOZCONFIG to point to an empty file,
    touch /tmp/empty
    export MOZCONFIG=/tmp/empty (or setenv MOZCONFIG /tmp/empty)
    (build as usual)
 
Q. What is the best way to build with dependencies? Should I use 'make depend'?
A. If you are building with gcc or egcs, you should build with --enable-md. This causes the compiler to generate the dependencies when the objects are build. With this option, there is no need to run 'make depend'.
Update: "--enable-md" is used by default if your compiler supports it. If your compiler does not support it, running 'make depend' is your best bet. (client.mk includes 'depend' as a default target.)
 
Q. I changed a Makefile.in file. How to do I update the Makefile?
A. make will update the Makefile for you. It has a dependency rule to update the Makefile,
    $(OBJDIR)/Makefile: Makefile.in
      @echo Updating $@
      $(topsrcdir)/build/autoconf/update-makefile.sh
 
Q. What is the difference between 'ac_add_options' and 'mk_add_options'?
A. 'ac_add_options' is for passing options to 'configure'. 'mk_add_options' is for passing options to 'client.mk'. (The 'mk' stands for make). Use 'mk_add_options' for everything that needs to be done before you run configure such as checking out the tree, or deciding where to put build objects.


Back to the Unix Build Instructions
Back to the Unix Build Configurator
Send questions or comments to <slamm@netcape.com>.

Copyright © 1998-1999 The Mozilla Organization.