File: reference.html

package info (click to toggle)
boost-build 2.0-m12-2
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 8,692 kB
  • ctags: 6,963
  • sloc: ansic: 39,914; sh: 9,086; python: 6,120; xml: 5,524; cpp: 1,467; yacc: 456; asm: 353; makefile: 184
file content (256 lines) | stat: -rw-r--r-- 11,161 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter7.Detailed reference</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="../index.html" title="Boost.Build V2 User Manual">
<link rel="up" href="../index.html" title="Boost.Build V2 User Manual">
<link rel="prev" href="extending/toolset_modules.html" title="Toolset modules">
<link rel="next" href="reference/rules.html" title="Builtin rules">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="extending/toolset_modules.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reference/rules.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="chapter" lang="en">
<div class="titlepage"><div><div><h2 class="title">
<a name="bbv2.reference"></a>Chapter7.Detailed reference</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl>
<dt><span class="section"><a href="reference.html#bbv2.reference.general">General information</a></span></dt>
<dt><span class="section"><a href="reference/rules.html">Builtin rules</a></span></dt>
<dt><span class="section"><a href="advanced/builtins/features.html">Builtin features</a></span></dt>
<dt><span class="section"><a href="reference/tools.html">Builtin tools</a></span></dt>
<dt><span class="section"><a href="reference/buildprocess.html">Build process</a></span></dt>
<dt><span class="section"><a href="reference/definitions.html">Definitions</a></span></dt>
<dt><span class="section"><a href="reference/generators.html">Generators</a></span></dt>
</dl>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="bbv2.reference.general"></a>General information</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="reference.html#bbv2.reference.init">Initialization</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.commandline">Command line</a></span></dt>
</dl></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.init"></a>Initialization</h3></div></div></div>
<p>bjam's first job upon startup is to load the Jam code that
        implements the build system. To do this, it searches for a file
        called <code class="filename">boost-build.jam</code>, 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:</p>
<pre class="programlisting">
rule boost-build ( location ? )
</pre>
<p>
        If location is a relative path, it is treated as relative to
        the directory of <code class="filename">boost-build.jam</code>. The directory specified by
        that location and the directories in BOOST_BUILD_PATH are then searched for
        a file called <code class="filename">bootstrap.jam</code>, 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
        <code class="filename">boost-build.jam</code> at the project root containing:

</p>
<pre class="programlisting">
boost-build build-system ;
</pre>
<p>

        In this case, running bjam anywhere in the project tree will
        automatically find the build system.</p>
<p>The default <code class="filename">bootstrap.jam</code>, after loading some standard
        definitions, loads two files, which can be provided/customised by
        user: <code class="filename">site-config.jam</code> and <code class="filename">user-config.jam</code>.</p>
<p>Locations where those files are searched are summarized below:</p>
<div class="table">
<a name="bbv2.reference.init.config"></a><p class="title"><b>Table7.1.Search paths for configuration files</b></p>
<table class="table" summary="Search paths for configuration files">
<colgroup>
<col>
<col>
<col>
</colgroup>
<thead><tr>
<th></th>
<th>site-config.jam</th>
<th>user-config.jam</th>
</tr></thead>
<tbody>
<tr>
<td>Linux</td>
<td>
                <p><code class="computeroutput">/etc</code></p>
                <p><code class="computeroutput">$HOME</code></p>
                <p><code class="computeroutput">$BOOST_BUILD_PATH</code></p>
              </td>
<td>
                <p><code class="computeroutput">$HOME</code></p>
                <p><code class="computeroutput">$BOOST_BUILD_PATH</code></p>
              </td>
</tr>
<tr>
<td>Windows</td>
<td>
                <p><code class="computeroutput">%SystemRoot%</code></p>
                <p><code class="computeroutput">%HOMEDRIVE%%HOMEPATH%</code></p>
                <p><code class="computeroutput">%HOME%</code></p>
                <p><code class="computeroutput">%BOOST_BUILD_PATH%</code></p>
              </td>
<td>
                <p><code class="computeroutput">%HOMEDRIVE%%HOMEPATH%</code></p>
                <p><code class="computeroutput">%HOME%</code></p>
                <p><code class="computeroutput">%BOOST_BUILD_PATH%</code></p>
              </td>
</tr>
</tbody>
</table>
</div>
<p>
        Boost.Build comes with default versions of those files,
        
        which can serve as templates for customized versions.
      </p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.commandline"></a>Command line</h3></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="reference.html#bbv2.reference.init.args">Command line arguments</a></span></dt>
<dt><span class="section"><a href="reference.html#bbv2.reference.init.options">Command line options</a></span></dt>
</dl></div>
<p>The command line may contain:</p>
<div class="itemizedlist"><ul type="disc">
<li>Jam options,</li>
<li>Boost.Build <a href="reference.html#bbv2.reference.init.options" title="Command line options">options</a>,</li>
<li>Command line arguments</li>
</ul></div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="bbv2.reference.init.args"></a>Command line arguments</h4></div></div></div>
<p>
          Command line arguments specify targets and build
          request using the following rules.
        </p>
<div class="itemizedlist"><ul type="disc">
<li>
              An argument that does not contain slashes or the <code class="computeroutput">=</code>
              symbol is either a value of an implicit feature or of a target to
              be built. It is taken to be value of a feature if an appropriate
              feature exists. Otherwise, it is considered a <a href="reference/definitions.html#bbv2.reference.ids" title="Target identifiers and references">target id</a>. Building the
              special target name &#8220;clean&#8221; has the same effect as
              using the <code class="computeroutput">--clean</code> option.
            </li>
<li>
<p>
              An argument containing either slashes or
              the <code class="computeroutput">=</code> symbol specifies a number of build
              request elements (see <a href="advanced/build_process.html#bbv2.advanced.build_request" title="Build Request">the section called &#8220;Build Request&#8221;</a>). In its simplest
              form, it's just a set of properties, separated by
              slashes, which become a single build request element,
              for example:

</p>
<pre class="programlisting">
borland/&lt;runtime-link&gt;static
</pre>
<p>

              A more complex form can be used to save typing. For example,
              instead of

</p>
<pre class="programlisting">
borland/runtime-link=static borland/runtime-link=dynamic
</pre>
<p>

              one can use

</p>
<pre class="programlisting">
borland/runtime-link=static,dynamic
</pre>
<p>

              Exactly, the conversion from argument to build request
              elements is performed by (1) splitting the argument at each slash,
              (2) converting each split part into a set of properties and (3)
              taking all possible combinations
                
              of the property sets. Each split
              part should have either the form

</p>
<pre class="programlisting">
<span class="emphasis"><em>feature-name</em></span>=<span class="emphasis"><em>feature-value1</em></span>[","<span class="emphasis"><em>feature-valueN</em></span>]*   
</pre>
<p>

              or, in case of implicit features

</p>
<pre class="programlisting">
<span class="emphasis"><em>feature-value1</em></span>[","<span class="emphasis"><em>feature-valueN</em></span>;]*   
</pre>
<p>

              will be converted into the property set

</p>
<pre class="programlisting">
&lt;feature-name&gt;feature-value1 .... &lt;feature-name&gt;feature-valueN
</pre>
<p>



            </p>
</li>
</ul></div>
<p>
          For example, the command line

</p>
<pre class="programlisting">
target1 debug gcc/runtime-link=dynamic,static
</pre>
<p>

          would cause target called <code class="literal">target1</code> to be rebuilt in
          debug mode, except that for gcc, both dynamically and statically
          linked binaries would be created.
        </p>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h4 class="title">
<a name="bbv2.reference.init.options"></a>Command line options</h4></div></div></div>
<p>All of the Boost.Build options start with the "--" prefix.
          They are described in the following table.</p>
<p>FIXME: That table has moved into "User documentation" section
        and there's nothing we can add here. Remove this part?</p>
</div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><small></small></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="extending/toolset_modules.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="reference/rules.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>