| Home | Libraries | People | FAQ | More

## Building BJam

Installing `BJam` after building it is simply a matter of copying the generated executables someplace in your `PATH`. For building the executables there are a set of `build` bootstrap scripts to accomodate particular environments. The scripts take one optional argument, the name of the toolset to build with. When the toolset is not given an attempt is made to detect an available toolset and use that. The build scripts accept these arguments:

    build [toolset]

Running the scripts without arguments will give you the best chance of success. On Windows platforms from a command console do:

    cd jam source location
    .\build.bat

On Unix type platforms do:

    cd jam source location
    sh ./build.sh

For the Boost.Jam source included with the Boost distribution the jam source location is `BOOST_ROOT/tools/jam/src`.

If the scripts fail to detect an appropriate toolset to build with your particular toolset may not be auto-detectable. In that case, you can specify the toolset as the first argument, this assumes that the toolset is readily available in the `PATH`.

| Note
The toolset used to build Boost.Jam is independent of the toolsets used for Boost.Build. Only one version of Boost.Jam is needed to use Boost.Build.

The supported toolsets, and wether they are auto-detected, are:

#### Supported Toolsets

Script | Platform | Toolset | Detection
--- | --- | --- | ---
`build.bat` | Windows NT, 2000, and XP | `borland` Borland C++Builder (BCC 5.5) | * Common install location: "`C:\Borland\BCC55`" * `BCC32.EXE` in `PATH`
|  | `como` Comeau Computing C/C++ |
|  | `gcc` GNU GCC |
|  | `gcc-nocygwin` GNU GCC |
|  | `intel-win32` Intel C++ Compiler for Windows | * `ICL.EXE` in `PATH`
|  | `metrowerks` MetroWerks CodeWarrior C/C++ 7.x, 8.x, 9.x | * `CWFolder` variable configured * `MWCC.EXE` in `PATH`
|  | `mingw` GNU GCC as the MinGW configuration | * Common install location: "`C:\MinGW`"
|  | `msvc` Microsoft Visual C++ 6.x | * `VCVARS32.BAT` already configured * `%MSVCDir%` is present in environment * Common install locations: "`%ProgramFiles%\Microsoft Visual Studio`", "`%ProgramFiles%\Microsoft Visual C++`" * `CL.EXE` in `PATH` * `VCVARS32.BAT` in `PATH`
|  | `vc7` Microsoft Visual C++ 7.x | * `VCVARS32.BAT` or `VSVARS32.BAT` already configured * `%VS71COMNTOOLS%` is present in environment * `%VCINSTALLDIR%` is present in environment * Common install locations: "`%ProgramFiles%\Microsoft Visual Studio .NET`", "`%ProgramFiles%\Microsoft Visual Studio .NET 2003`" * `CL.EXE` in `PATH` * `VCVARS32.BAT` in `PATH`
|  | `vc8` Microsoft Visual C++ 8.x | * `VCVARS32.BAT` or `VSVARS32.BAT` already configured * `%VS80COMNTOOLS%` is present in environment * Common install location: "`%ProgramFiles%\Microsoft Visual Studio 8`" * `CL.EXE` in `PATH` * `VCVARS32.BAT` in `PATH`
`build.sh` | Unix, Linux, Cygwin, etc. | `acc` HP-UX aCC | * `aCC` in `PATH` * `uname` is "HP-UX"
|  | `como` Comeau Computing C/C++ | * como in `PATH`
|  | `gcc` GNU GCC | * gcc in `PATH`
|  | `intel-linux` Intel C++ for Linux | * `icc` in `PATH` * Common install locations: "`/opt/intel/cc/9.0`", "`/opt/intel_cc_80`", "`/opt/intel/compiler70`", "`/opt/intel/compiler60`", "`/opt/intel/compiler50`"
|  | `kcc` Intel KAI C++ | * `KCC` in `PATH`
|  | `kylix` Borland C++Builder | * bc++ in PATH
|  | `mipspro` SGI MIPSpro C | * `uname` is "`IRIX`" or "`IRIX64`"
|  | `sunpro` Sun Workshop 6 C++ | * Standard install location: "`/opt/SUNWspro`"
|  | `qcc` QNX Neutrino | * `uname` is "`QNX`" and `qcc` in `PATH`
|  | `true64cxx` Compaq C++ Compiler for True64 UNIX | * `uname` is "`OSF1`"
|  | `vacpp` IBM VisualAge C++ | * `xlc` in `PATH`
| MacOS X | `darwin` Apple MacOS X GCC | * `uname` is "`Darwin`"
| Windows NT, 2000, and XP | `mingw` GNU GCC as the MinGW configuration with the MSYS shell | * Common install location: "`/mingw`"

The built executables are placed in a subdirectory specific to your platform. For example, in Linux running on an Intel x86 compatible chip, the executables are placed in: "`bin.linuxx86`". The `bjam[.exe]` executable can be used to invoke Boost.Build.

The build scripts support additional invocation arguments for use by developers of Boost.Jam. The extra arguments come after the toolset, and can take the form of "`--option`" or targets for the `build.jam` script:

    build [toolset] [--option+ target*]

There is currently only one available option, "`--debug`", which builds debugging versions of the executable. When built they are placed in their own directory "`bin./platform/.debug`". To specify targets without options, one can suply a special ignore option "`---`".

Currently there are two targets supported: `dist`, and `clean`. Respectively they: generate packages (compressed archives) as appropriate for distribution in the platform, or remove all the built executables and objects.

| Copyright © 2003-2006 Rene Rivera, David Abrahams, Vladimir Prus