3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Chapter 42. Boost.Jam : 3.1.19</title>
5 <link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
8 <link rel="up" href="tools.html" title="Part II. Boost Tools">
9 <link rel="prev" href="quickbook/ref.html" title="Quick Reference">
10 <link rel="next" href="jam/language.html" title="Language">
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
15 <td align="center"><a href="../../index.html">Home</a></td>
16 <td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../more/index.htm">More</a></td>
22 <div class="spirit-nav">
23 <a accesskey="p" href="quickbook/ref.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="tools.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="jam/language.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div>
27 <div><h2 class="title">
28 <a name="jam"></a>Chapter 42. Boost.Jam : 3.1.19</h2></div>
29 <div><div class="authorgroup">
30 <div class="author"><h3 class="author">
31 <span class="firstname">Rene</span> <span class="surname">Rivera</span>
33 <div class="author"><h3 class="author">
34 <span class="firstname">David</span> <span class="surname">Abrahams</span>
36 <div class="author"><h3 class="author">
37 <span class="firstname">Vladimir</span> <span class="surname">Prus</span>
40 <div><p class="copyright">Copyright © 2003-2007 Rene Rivera, David Abrahams, Vladimir Prus</p></div>
41 <div><div class="legalnotice">
42 <a name="jam.legal"></a><p>
43 Distributed under the Boost Software License, Version 1.0. (See accompanying
44 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
49 <p><b>Table of Contents</b></p>
51 <dt><span class="section"><a href="jam.html#jam.building">Building B2</a></span></dt>
52 <dt><span class="section"><a href="jam/language.html">Language</a></span></dt>
54 <dt><span class="section"><a href="jam/language.html#jam.language.lexical">Lexical Features</a></span></dt>
55 <dt><span class="section"><a href="jam/language.html#jam.language.target">Targets</a></span></dt>
56 <dt><span class="section"><a href="jam/language.html#jam.language.rules">Rules</a></span></dt>
57 <dt><span class="section"><a href="jam/language.html#jam.language.flow_of_control">Flow-of-Control</a></span></dt>
58 <dt><span class="section"><a href="jam/language.html#jam.language.variables">Variables</a></span></dt>
59 <dt><span class="section"><a href="jam/language.html#jam.language.modules">Modules</a></span></dt>
61 <dt><span class="section"><a href="jam/miscellaneous.html">Miscellaneous</a></span></dt>
63 <dt><span class="section"><a href="jam/miscellaneous.html#jam.miscellaneous.diagnostics">Diagnostics</a></span></dt>
64 <dt><span class="section"><a href="jam/miscellaneous.html#jam.miscellaneous.bugs__limitations">Bugs, Limitations</a></span></dt>
65 <dt><span class="section"><a href="jam/miscellaneous.html#jam.miscellaneous.fundamentals">Fundamentals</a></span></dt>
67 <dt><span class="section"><a href="jam/history.html">History</a></span></dt>
71 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
72 <a name="jam.building"></a><a class="link" href="jam.html#jam.building" title="Building B2">Building B2</a>
73 </h2></div></div></div>
75 Installing <code class="literal">B2</code> after building it is simply a matter of copying
76 the generated executables someplace in your <code class="literal">PATH</code>. For building
77 the executables there are a set of <code class="literal">build</code> bootstrap scripts
78 to accomodate particular environments. The scripts take one optional argument,
79 the name of the toolset to build with. When the toolset is not given an attempt
80 is made to detect an available toolset and use that. The build scripts accept
83 <pre class="programlisting"><span class="emphasis"><em>build</em></span> [<span class="emphasis"><em>toolset</em></span>]
86 Running the scripts without arguments will give you the best chance of success.
87 On Windows platforms from a command console do:
89 <pre class="programlisting">cd <span class="emphasis"><em>jam source location</em></span>
93 On Unix type platforms do:
95 <pre class="programlisting">cd <span class="emphasis"><em>jam source location</em></span>
99 For the Boost.Jam source included with the Boost distribution the <span class="emphasis"><em>jam
100 source location</em></span> is <code class="literal">BOOST_ROOT/tools/build/v2/engine</code>.
103 If the scripts fail to detect an appropriate toolset to build with your particular
104 toolset may not be auto-detectable. In that case, you can specify the toolset
105 as the first argument, this assumes that the toolset is readily available in
106 the <code class="literal">PATH</code>.
108 <div class="note"><table border="0" summary="Note">
110 <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../doc/src/images/note.png"></td>
111 <th align="left">Note</th>
113 <tr><td align="left" valign="top"><p>
114 The toolset used to build Boost.Jam is independent of the toolsets used for
115 Boost.Build. Only one version of Boost.Jam is needed to use Boost.Build.
119 The supported toolsets, and whether they are auto-detected, are:
122 <a name="jam.building.t0"></a><p class="title"><b>Table 42.1. Supported Toolsets</b></p>
123 <div class="table-contents"><table class="table" summary="Supported Toolsets">
156 <code class="literal">build.bat</code>
161 Windows NT, 2000, and XP
167 <table border="0" summary="Simple list" class="simplelist">
168 <tr><td><a href="http://www.codegear.com/downloads/free/cppbuilder" target="_top"><code class="literal">borland</code></a></td></tr>
170 <a href="http://www.borland.com/" target="_top">Borland</a> C++Builder (BCC 5.5)</td></tr>
178 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
179 <li class="listitem">Common install location: "<code class="literal">C:\Borland\BCC55</code>"</li>
180 <li class="listitem">
181 <code class="literal">BCC32.EXE</code>
182 in <code class="literal">PATH</code>
197 <table border="0" summary="Simple list" class="simplelist">
198 <tr><td><a href="http://www.comeaucomputing.com/" target="_top"><code class="literal">como</code></a></td></tr>
200 Computing C/C++</td></tr>
216 <table border="0" summary="Simple list" class="simplelist">
217 <tr><td><a href="http://gcc.gnu.org/" target="_top"><code class="literal">gcc</code></a></td></tr>
235 <table border="0" summary="Simple list" class="simplelist">
236 <tr><td><a href="http://gcc.gnu.org/" target="_top"><code class="literal">gcc-nocygwin</code></a></td></tr>
254 <table border="0" summary="Simple list" class="simplelist">
255 <tr><td><a href="http://www.intel.com/software/products/compilers/c60" target="_top"><code class="literal">intel-win32</code></a></td></tr>
257 C++ Compiler for Windows</td></tr>
265 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
266 <code class="literal">ICL.EXE</code> in <code class="literal">PATH</code>
280 <table border="0" summary="Simple list" class="simplelist">
281 <tr><td><a href="http://www.metrowerks.com/" target="_top"><code class="literal">metrowerks</code></a></td></tr>
283 CodeWarrior C/C++ 7.x, 8.x, 9.x</td></tr>
291 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
292 <li class="listitem">
293 <code class="literal">CWFolder</code> variable configured</li>
294 <li class="listitem">
295 <code class="literal">MWCC.EXE</code>
296 in <code class="literal">PATH</code>
311 <table border="0" summary="Simple list" class="simplelist">
312 <tr><td><a href="http://www.mingw.org/" target="_top"><code class="literal">mingw</code></a></td></tr>
314 <a href="http://gcc.gnu.org/" target="_top">GCC</a> as the <a href="http://www.mingw.org/" target="_top">MinGW</a>
315 configuration</td></tr>
323 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Common install location: "<code class="literal">C:\MinGW</code>"</li></ul></div>
336 <table border="0" summary="Simple list" class="simplelist">
337 <tr><td><a href="http://msdn.microsoft.com/visualc/" target="_top"><code class="literal">msvc</code></a></td></tr>
339 Visual C++ 6.x</td></tr>
347 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
348 <li class="listitem">
349 <code class="literal">VCVARS32.BAT</code> already configured</li>
350 <li class="listitem">
351 <code class="literal">%MSVCDir%</code>
352 is present in environment</li>
353 <li class="listitem">Common install locations: "<code class="literal">%ProgramFiles%\Microsoft
354 Visual Studio</code>", "<code class="literal">%ProgramFiles%\Microsoft
355 Visual C++</code>"</li>
356 <li class="listitem">
357 <code class="literal">CL.EXE</code> in <code class="literal">PATH</code>
372 <table border="0" summary="Simple list" class="simplelist">
373 <tr><td><a href="http://msdn.microsoft.com/visualc/" target="_top"><code class="literal">vc7</code></a></td></tr>
375 Visual C++ 7.x</td></tr>
383 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
384 <li class="listitem">
385 <code class="literal">VCVARS32.BAT</code> or <code class="literal">VSVARS32.BAT</code>
386 already configured</li>
387 <li class="listitem">
388 <code class="literal">%VS71COMNTOOLS%</code> is present in
390 <li class="listitem">
391 <code class="literal">%VCINSTALLDIR%</code> is present in environment</li>
392 <li class="listitem">Common
393 install locations: "<code class="literal">%ProgramFiles%\Microsoft Visual
394 Studio .NET</code>", "<code class="literal">%ProgramFiles%\Microsoft
395 Visual Studio .NET 2003</code>"</li>
396 <li class="listitem">
397 <code class="literal">CL.EXE</code>
398 in <code class="literal">PATH</code>
413 <table border="0" summary="Simple list" class="simplelist">
414 <tr><td><a href="http://msdn.microsoft.com/visualc/" target="_top"><code class="literal">vc8</code>
415 and <code class="literal">vc9</code></a></td></tr>
416 <tr><td>Microsoft Visual C++ 8.x and 9.x</td></tr>
424 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
425 <li class="listitem">
426 <code class="literal">VCVARSALL.BAT</code> already configured</li>
427 <li class="listitem">
428 <code class="literal">%VS90COMNTOOLS%</code>
429 is present in environment</li>
430 <li class="listitem">Common install location: "<code class="literal">%ProgramFiles%\Microsoft
431 Visual Studio 9</code>"</li>
432 <li class="listitem">
433 <code class="literal">%VS80COMNTOOLS%</code>
434 is present in environment</li>
435 <li class="listitem">Common install location: "<code class="literal">%ProgramFiles%\Microsoft
436 Visual Studio 8</code>"</li>
437 <li class="listitem">
438 <code class="literal">CL.EXE</code> in <code class="literal">PATH</code>
445 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">If <code class="literal">VCVARSALL.BAT</code> is called to set up the
446 toolset, it is passed all the extra arguments, see below for what
447 those arguments are. This can be used to build, for example, a Win64
448 specific version of <code class="literal">b2</code>. Consult the VisualStudio
449 documentation for what the possible argument values to the <code class="literal">VCVARSALL.BAT</code>
458 <code class="literal">build.sh</code>
463 Unix, Linux, Cygwin, etc.
469 <table border="0" summary="Simple list" class="simplelist">
470 <tr><td><a href="http://www.hp.com/go/c++" target="_top"><code class="literal">acc</code></a></td></tr>
480 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
481 <li class="listitem">
482 <code class="literal">aCC</code> in <code class="literal">PATH</code>
484 <li class="listitem">
485 <code class="literal">uname</code>
500 <table border="0" summary="Simple list" class="simplelist">
501 <tr><td><a href="http://www.comeaucomputing.com/" target="_top"><code class="literal">como</code></a></td></tr>
503 Computing C/C++</td></tr>
511 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">como in <code class="literal">PATH</code>
525 <table border="0" summary="Simple list" class="simplelist">
526 <tr><td><a href="http://gcc.gnu.org/" target="_top"><code class="literal">gcc</code></a></td></tr>
536 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">gcc in <code class="literal">PATH</code>
550 <table border="0" summary="Simple list" class="simplelist">
551 <tr><td><a href="http://www.intel.com/software/products/compilers/c60l/" target="_top"><code class="literal">intel-linux</code></a></td></tr>
553 C++ for Linux</td></tr>
561 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
562 <li class="listitem">
563 <code class="literal">icc</code> in <code class="literal">PATH</code>
565 <li class="listitem">Common install locations:
566 "<code class="literal">/opt/intel/cc/9.0</code>", "<code class="literal">/opt/intel_cc_80</code>",
567 "<code class="literal">/opt/intel/compiler70</code>", "<code class="literal">/opt/intel/compiler60</code>",
568 "<code class="literal">/opt/intel/compiler50</code>"</li>
582 <table border="0" summary="Simple list" class="simplelist">
583 <tr><td><code class="literal">kcc</code></td></tr>
584 <tr><td>Intel KAI C++</td></tr>
592 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
593 <code class="literal">KCC</code> in <code class="literal">PATH</code>
607 <table border="0" summary="Simple list" class="simplelist">
608 <tr><td><a href="http://www.codegear.com/downloads/free/cppbuilder" target="_top"><code class="literal">kylix</code></a></td></tr>
610 <a href="http://www.borland.com/" target="_top">Borland</a> C++Builder</td></tr>
618 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">bc++ in PATH</li></ul></div>
631 <table border="0" summary="Simple list" class="simplelist">
632 <tr><td><a href="http://www.sgi.com/developers/devtools/languages/mipspro.html" target="_top"><code class="literal">mipspro</code></a></td></tr>
642 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
643 <code class="literal">uname</code> is "<code class="literal">IRIX</code>" or
644 "<code class="literal">IRIX64</code>"</li></ul></div>
657 <table border="0" summary="Simple list" class="simplelist">
658 <tr><td><code class="literal">sunpro</code></td></tr>
659 <tr><td>Sun Workshop 6 C++</td></tr>
667 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Standard install location: "<code class="literal">/opt/SUNWspro</code>"</li></ul></div>
680 <table border="0" summary="Simple list" class="simplelist">
681 <tr><td><code class="literal">qcc</code></td></tr>
682 <tr><td><a href="http://www.qnx.com/" target="_top">QNX Neutrino</a></td></tr>
690 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
691 <code class="literal">uname</code> is "<code class="literal">QNX</code>" and
692 <code class="literal">qcc</code> in <code class="literal">PATH</code>
706 <table border="0" summary="Simple list" class="simplelist">
707 <tr><td><a href="http://www.tru64unix.compaq.com/cplus/" target="_top"><code class="literal">true64cxx</code></a></td></tr>
709 C++ Compiler for True64 UNIX</td></tr>
717 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
718 <code class="literal">uname</code> is "<code class="literal">OSF1</code>"</li></ul></div>
731 <table border="0" summary="Simple list" class="simplelist">
732 <tr><td><a href="http://www.ibm.com/software/awdtools/vacpp/" target="_top"><code class="literal">vacpp</code></a></td></tr>
734 VisualAge C++</td></tr>
742 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
743 <code class="literal">xlc</code> in <code class="literal">PATH</code>
760 <table border="0" summary="Simple list" class="simplelist">
761 <tr><td><a href="http://developer.apple.com/tools/compilers.html" target="_top"><code class="literal">darwin</code></a></td></tr>
763 MacOS X GCC</td></tr>
771 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
772 <code class="literal">uname</code> is "<code class="literal">Darwin</code>"</li></ul></div>
782 Windows NT, 2000, and XP
788 <table border="0" summary="Simple list" class="simplelist">
789 <tr><td><a href="http://www.mingw.org/" target="_top"><code class="literal">mingw</code></a></td></tr>
791 <a href="http://gcc.gnu.org/" target="_top">GCC</a> as the <a href="http://www.mingw.org/" target="_top">MinGW</a>
792 configuration with the MSYS shell</td></tr>
800 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Common install location: "<code class="literal">/mingw</code>"</li></ul></div>
808 <br class="table-break"><p>
809 The built executables are placed in a subdirectory specific to your platform.
810 For example, in Linux running on an Intel x86 compatible chip, the executables
811 are placed in: "<code class="literal">bin.linuxx86</code>". The =b2[.exe]=
812 executable can be used to invoke Boost.Build.
815 The build scripts support additional invocation arguments for use by developers
816 of Boost.Jam and for additional setup of the toolset. The extra arguments come
819 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
820 <li class="listitem">
821 Arguments not in the form of an option, before option arguments, are used
822 for extra setup to toolset configuration scripts.
824 <li class="listitem">
825 Arguments of the form "<code class="literal">--option</code>", which are
826 passed to the <code class="literal">build.jam</code> build script.
828 <li class="listitem">
829 Arguments not in the form of an option, after the options, which are targets
830 for the <code class="literal">build.jam</code> script.
833 <pre class="programlisting"><span class="emphasis"><em>build</em></span> [<span class="emphasis"><em>toolset</em></span>] [<span class="emphasis"><em>setup</em></span>*] [--<span class="emphasis"><em>option</em></span>+ <span class="emphasis"><em>target</em></span>*]
836 The arguments immediately after the toolset are passed directly to the setup
837 script of the toolset, if available and if it needs to be invoked. This allows
838 one to configure the toolset ass needed to do non-default builds of <code class="literal">b2</code>.
839 For example to build a Win64 version with <code class="literal">vc8</code>. See the toolset
840 descriptiona above for when particular toolsets support this.
843 The arguments starting with the "<code class="literal">--option</code>" forms
844 are passed to the <code class="literal">build.jam</code> script and are used to further
845 customize what gets built. Options and targets supported by the <code class="literal">build.jam</code>
848 <div class="variablelist">
849 <p class="title"><b></b></p>
850 <dl class="variablelist">
851 <dt><span class="term"><div class="literallayout"><p><code class="literal">---</code></p></div></span></dt>
853 Empty option when one wants to only specify a target.
855 <dt><span class="term"><div class="literallayout"><p><code class="literal">--release</code></p></div></span></dt>
857 The default, builds the optimized executable.
859 <dt><span class="term"><div class="literallayout"><p><code class="literal">--debug</code></p></div></span></dt>
861 Builds debugging versions of the executable. When built they are placed
862 in their own directory "<code class="literal">bin./platform/.debug</code>".
864 <dt><span class="term"><div class="literallayout"><p><code class="literal">--grammar</code></p></div></span></dt>
866 Normally the Jam language grammar parsing files are not regenerated.
867 This forces building of the grammar, although it may not force the regeneration
868 of the grammar parser. If the parser is out of date it will be regenerated
869 and subsequently built.
871 <dt><span class="term"><div class="literallayout"><p><code class="literal">--with-python=<span class="emphasis"><em>path</em></span></code></p></div></span></dt>
873 Enables Python integration, given a path to the Python libraries.
875 <dt><span class="term"><div class="literallayout"><p><code class="literal">--gc</code></p></div></span></dt>
877 Enables use of the Boehm Garbage Collector. The build will look for the
878 Boehm-GC source in a "boehm_gc" subdirectory from the <code class="literal">b2</code>
881 <dt><span class="term"><div class="literallayout"><p><code class="literal">--duma</code></p></div></span></dt>
883 Enables use of the DUMA (Detect Uintended Memory Access) debugging memory
884 allocator. The build expects to find the DUMA source files in a "duma"
885 subdirectory from the <code class="literal">b2</code> sources.
887 <dt><span class="term"><div class="literallayout"><p><code class="literal">--toolset-root=<span class="emphasis"><em>path</em></span></code></p></div></span></dt>
889 Indicates where the toolset used to build is located. This option is
890 passed in by the bootstrap (<code class="literal">build.bat</code> or <code class="literal">build.sh</code>)
893 <dt><span class="term"><div class="literallayout"><p><code class="literal">--show-locate-target</code></p></div></span></dt>
895 For information, prints out where it will put the built executable.
897 <dt><span class="term"><div class="literallayout"><p><code class="literal">--noassert</code></p></div></span></dt>
899 Disable debug assertions, even if building the debug version of the executable.
901 <dt><span class="term"><div class="literallayout"><p><code class="literal">dist</code></p></div></span></dt>
903 Generate packages (compressed archives) as appropriate for distribution
904 in the platform, if possible.
906 <dt><span class="term"><div class="literallayout"><p><code class="literal">clean</code></p></div></span></dt>
908 Remove all the built executables and objects.
914 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
915 <td align="left"></td>
916 <td align="right"><div class="copyright-footer"></div></td>
919 <div class="spirit-nav">
920 <a accesskey="p" href="quickbook/ref.html"><img src="../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="tools.html"><img src="../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="jam/language.html"><img src="../../doc/src/images/next.png" alt="Next"></a>