Boost C++ Libraries


Chapter 5. Reference

Table of Contents

General information
Builtin rules
Builtin features
Builtin tools
Builtin modules
Builtin classes
Build process

General information


Immediately upon starting, the Boost.Build engine (b2) loads the Jam code that implements the build system. To do this, it searches for a file called boost-build.jam, first in the invocation directory, then in its parent and so forth up to the filesystem root, and finally in the directories specified by the environment variable BOOST_BUILD_PATH. When found, the file is interpreted, and should specify the build system location by calling the boost-build rule:

rule boost-build ( location ? )

If location is a relative path, it is treated as relative to the directory of boost-build.jam. The directory specified by that location and the directories in BOOST_BUILD_PATH are then searched for a file called bootstrap.jam, which is expected to bootstrap the build system. This arrangement allows the build system to work without any command-line or environment variable settings. For example, if the build system files were located in a directory "build-system/" at your project root, you might place a boost-build.jam at the project root containing:

boost-build build-system ;

In this case, running b2 anywhere in the project tree will automatically find the build system.

The default bootstrap.jam, after loading some standard definitions, loads two site-config.jam and user-config.jam.