4. Configuration File Reference

The ~/.jhbuildrc file uses standard Python syntax. The file is run, and the resulting variables defined in the namespace are used to control how JHBuild acts. A set of default values are inserted into the namespace before running the user's configuration file.

4.1. Configuration Variables

alwaysautogen

If set to True, then always run autogen.sh before make even if a makefile exists. This is equivalent to passing --always-autogen option to JHBuild. Defaults to False.

autogenargs

A string containing arguments passed to the autogen.sh script of all modules. Can be overriden for particular modules using the module_autogenargs dictionary.

builddir_pattern

A printf style formatting pattern used to generate build directory names. This is only used when using separate source and build trees. The %s in the format string will be replaced with the source directory name. Defaults to '%s'.

buildroot

A string giving the parent directory to place build trees. Defaults to None, which causes builds to be performed within the source trees.

checkoutroot

A string giving the directory to unpack source trees to. Unless buildroot is set, builds will occur in this directory too. Defaults to ~/cvs/gnome2.

cvsroots

A dictionary that can be used to change the CVS roots used to check out source code. If you have a CVS account for a particular project, you can set the associated key to use that account rather than the anonymous account. For example, you might want to set 'gnome.org' to ':ext:username@cvs.gnome.org:/cvs/gnome'.

branches

A dictionary that can be used to override the branch used for a particular module. This is useful if you are doing some changes on a branch of a module and want JHBuild to build that branch instead of the one listed in the module set.

makeargs

A string listing additional arguments to be passed to make. Defaults to ''.

makecheck

A boolean value specifying whether to run make check after make. This might be useful in a tinderbox-style setup. Defaults to False.

makeclean

A boolean value specifying whether to run make clean before make. Defaults to False.

module_autogenargs

A dictionary mapping module names to strings giving arguments to be passed to autogen.sh. If a particular module isn't listed in the dictionary, the global autogenargs will be used instead.

module_makeargs

A dictionary mapping module names to strings giving arguments to be passed to make. If a particular module isn't listed in the dictionary, the global makeargs will be used instead.

modules

A list of module names to build. This list will be expanded using the dependency information found in the module set. Defaults to [ 'meta-gnome-desktop' ].

moduleset

A string giving the name of the module set to use. This can either be a short string to refer to one of JHBuild's included module sets, or a full HTTP URL to refer to an externally managed module set. Currently defaults to 'gnome-2.10', but is usually updated as Gnome development progresses.

nonetwork

A boolean value saying whether to access the network or not. This affects checking out or updating CVS modules, downloading tarballs and updating module sets. Setting this to True is equivalent to passing the --no-network option to JHBuild. Defaults to False.

prefix

A string giving the prefix to install modules to. Defaults to '/opt/gnome2'.

pretty_print

A boolean value that can be used to disable pretty printing of subprocess output. Currently there is only support for pretty printing CVS output. You probably only want to disable this if the pretty printing causes problems. Defaults to True.

skip

A list of modules to skip when expanding the list of modules to build. This is similar to the --skip option (in fact, the --skip option extends this list). This list is empty by default.

sticky_date

If set, JHBuild will attempt to check out modules as they existed at the given date. The date should be given in the form 'yyyy-mm-dd'. Defaults to None.

svnroots

Similar to cvsroots but for Subversion repositories.

tarballdir

If set, tarballs will be downloaded to this directory instead of checkoutroot. This is useful if you have multiple JHBuild environments or regularly blow away your checkoutroot and want to reduce bandwidth usage.

tinderbox_outputdir

A string giving the directory to store jhbuild tinderbox output. This string can be overridden by the --output option. Defaults to None, so either the command line option must be used or this variable must be set in the configuration file.

use_lib64

A boolean value that specifies whether to install libraries to lib64 directories. If this is set, --libdir=\${exec_prefix}/lib64 will be passed to configure. Defaults to True if running on x86_64, ppc64 or s390x Linux, and False on other systems.

4.2. Other Configuration File Structures

In addition to the above variables, there are some other things that can be set in the configuration file:

os.environ

This is dictionary represents the environment of the process (which also gets passed on to processes that JHBuild spawns).

Some environment variables you may want to set include CFLAGS, INSTALL (to use the more efficient install-check program included with JHBuild) and LDFLAGS.

addpath(envvar, pathname)

This will add a directory to a PATH-style environment variable. It will correctly handle the case when the environment variable is initially empty (having a stray colon at the beginning or end of an environment variable can have unexpected consequences).

This function has special handling for the ACLOCAL_FLAGS environment variable, which expects paths to be listed in the form -I pathname.

prependpath(envvar, pathname)

After processing the configuration file, JHBuild will alter some paths based on variables such as prefix (eg. adding $prefix/bin to the start of PATH).

The prependpath function works like addpath, except that the environment variable is modified after JHBuild has made its changes to the environment.