JamPlus manual
Bootstrapping/Building

Prerequisites

Linux requires certain packages installed to complete the entire bootstrap process. The packages are: build-essential uuid-dev.

FreeBSD should have an install of the package e2fsprogs-libuuid.

Quick Bootstrapping of JamPlus

The directions in the sections below describe the build process in better detail, but if you just need a working copy of JamPlus with its dependencies, run the following:

# If you are on a Unix-y OS and want a 32-bit build:
./bootstrap-linux32.sh
# If you are on Unix-y OS and want a 64-bit build:
./bootstrap-linux64.sh
# If you are on Mac OS X and want a 64-bit build:
./bootstrap-macosx64.sh
# If you are on Windows, have Visual Studio installed, and want a 32-bit build, launch x86 Native Tools Command Prompt and run:
bootstrap-win32-vc.bat
# If you are on Windows, have Visual Studio installed, and want a 64-bit build, launch x64 Native Tools Command Prompt and run:
bootstrap-win64-vc.bat
# If you are on Windows, have Clang installed, and want a 64-bit build:
bootstrap-win64-clang.bat

Binaries are built into a platform specific directory under the bin/ directory, such as bin/win64/ or bin/macosx64/. All associated scripts and optional binaries (such as the webserver used for iOS .ipa serving to device) are also within this platform directory. Multiple JamPlus platform binaries can be deployed within the same directory tree, making it easy to check into your source control system.

Embed Build Modules

(Note: Embedding of build modules is done as part of the bootstrapping step described above. Re-embedding of build modules is only needed if updates are being made to the embedded .jam or .lua files.)

JamPlus has the ability to store its build modules in the Jam executable itself. The built-in command-line options –embedbuildmodules [DIRECTORY_WHERE_JAMBUILDMODULES_TXT_RESIDES] or –embed [DIRECTORY_WHERE_JAMBUILDMODULES_TXT_RESIDES] packages up and embeds all of the needed files directly into a Jam executable that can be used in a standalone fashion without any additional support files.

The embedded build modules are searched for last. When the Jam executable resides relative to the various JamPlus module directories and files (Jambase.jam, apps/, lua/, modules/, and scripts/), either one directory level deeper (such as in its default source distribution build location at bin/PLATFORM/jam[.exe]) or immediately relative to the Jambase.jam, the Jam executable will access its modules from the individual disk files first and then attempt access the embedded build modules after exhausting the disk search.

embedbuildmodules accepts an optional argument, the DIRECTORY_WHERE_JAMBUILDMODULES_TXT_RESIDE. If no directory is provided, the current directory will be used. Then, jam –embedbuildmodules will use jambuildmodules.txt is used as a source file list of what files and directories should be embedded within the Jam executable.

The updated Jam executable is called jam.exe.embed or jam.embed depending on your platform. It should be renamed and appropriate executable bits set on it.

# Embed build modules specified from the current directory's jambuildmodules.txt.
jam --embedbuildmodules
move jam.exe.embed jam.exe
# Embed build modules specified in ../bin/jambuildmodules.txt.
jam --embed ../bin
mv jam.embed jam
chmod +x jam

Extract Build Modules

extractbuildmodules dumps out the embedded build modules and build support files collected during jam –embedbuildmodules.

extractbuildmodules accepts an optional argument, the destination path. If the destination path is not provided, the build files will be written into the current directory. extractbuildmodules will not overwrite an existing file.

When the Jam executable resides in the same directory as the extracted Jambase.jam or one directory level deeper than the Jambase.jam, an invocation of the Jam executable will use the build files on disk before falling back to its embedded versions, allowing easy modification and testing before re-embedding.

# Extract to the current directory.
jam --extractbuildmodules
# Extract to the directory above the executable's directory (assuming it is in jamplus/bin/macosx64):
[~/jamplus/bin/macosx64]jam --extractbuildmodules ..

Run the JamPlus Test Suite

It may also be useful to run the JamPlus test suite after the bootstrap is finished. Note that the test suite may fail depending on platform and compiler version and so on, even though JamPlus itself will work fine. The varied combinations of output text and intermediate files are difficult to determine.

cd tests
# If you are on Linux and want to test the 32-bit build:
./runtests-linux32
# If you are on Linux and want to test the 64-bit build:
./runtests-linux64
# If you are on Mac OS X and want to test the 64-bit build:
./runtests-macosx64
# If you are on Windows and want to test the 32-bit build:
runtests-win32.bat
# If you are on Windows and want to test the 64-bit build:
runtests-win64.bat