summaryrefslogtreecommitdiff
path: root/doc/html/bbv2.html
blob: c8709faf2d7972f824867f1d3b79ecc6feea23d2 (plain)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Chapter&#160;48.&#160;Boost.Build User Manual</title>
<link rel="stylesheet" href="../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="tools.html" title="Part&#160;II.&#160;Boost Tools">
<link rel="prev" href="boostbook/dtd/rationale.html" title="BoostBook element rationale">
<link rel="next" href="bbv2/tutorial.html" title="Tutorial">
</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>
<td align="center"><a href="../../index.html">Home</a></td>
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boostbook/dtd/rationale.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="bbv2/tutorial.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="chapter">
<div class="titlepage"><div><div><h2 class="title">
<a name="bbv2"></a>Chapter&#160;48.&#160;Boost.Build User Manual</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<dl class="toc">
<dt><span class="section"><a href="bbv2.html#bbv2.installation">Installation</a></span></dt>
<dt><span class="section"><a href="bbv2/tutorial.html">Tutorial</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="bbv2/tutorial.html#bbv2.tutorial.hello">Hello, world</a></span></dt>
<dt><span class="section"><a href="bbv2/tutorial.html#bbv2.tutorial.properties">Properties</a></span></dt>
<dt><span class="section"><a href="bbv2/tutorial.html#bbv2.tutorial.hierarchy">Project Hierarchies</a></span></dt>
<dt><span class="section"><a href="bbv2/tutorial.html#bbv2.tutorial.libs">Dependent Targets</a></span></dt>
<dt><span class="section"><a href="bbv2/tutorial.html#bbv2.tutorial.linkage">Static and shared libraries</a></span></dt>
<dt><span class="section"><a href="bbv2/tutorial.html#bbv2.tutorial.conditions">Conditions and alternatives</a></span></dt>
<dt><span class="section"><a href="bbv2/tutorial.html#bbv2.tutorial.prebuilt">Prebuilt targets</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="bbv2/overview.html">Overview</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="bbv2/overview.html#bbv2.overview.concepts">Concepts</a></span></dt>
<dt><span class="section"><a href="bbv2/overview.html#bbv2.overview.jam_language">Boost.Jam Language</a></span></dt>
<dt><span class="section"><a href="bbv2/overview.html#bbv2.overview.configuration">Configuration</a></span></dt>
<dt><span class="section"><a href="bbv2/overview.html#bbv2.overview.invocation">Invocation</a></span></dt>
<dt><span class="section"><a href="bbv2/overview.html#bbv2.overview.targets">Declaring Targets</a></span></dt>
<dt><span class="section"><a href="bbv2/overview.html#bbv2.overview.projects">Projects</a></span></dt>
<dt><span class="section"><a href="bbv2/overview.html#bbv2.overview.build_process">The Build Process</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="bbv2/tasks.html">Common tasks</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="bbv2/tasks.html#bbv2.tasks.programs">Programs</a></span></dt>
<dt><span class="section"><a href="bbv2/tasks.html#bbv2.tasks.libraries">Libraries</a></span></dt>
<dt><span class="section"><a href="bbv2/tasks.html#bbv2.tasks.alias">Alias</a></span></dt>
<dt><span class="section"><a href="bbv2/tasks.html#bbv2.tasks.installing">Installing</a></span></dt>
<dt><span class="section"><a href="bbv2/tasks.html#bbv2.builtins.testing">Testing</a></span></dt>
<dt><span class="section"><a href="bbv2/tasks.html#bbv2.builtins.raw">Custom commands</a></span></dt>
<dt><span class="section"><a href="bbv2/tasks.html#bbv2.reference.precompiled_headers">Precompiled Headers</a></span></dt>
<dt><span class="section"><a href="bbv2/tasks.html#bbv2.reference.generated_headers">Generated headers</a></span></dt>
<dt><span class="section"><a href="bbv2/tasks.html#bbv2.tasks.crosscompile">Cross-compilation</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="bbv2/reference.html">Reference</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="bbv2/reference.html#bbv2.reference.general">General information</a></span></dt>
<dt><span class="section"><a href="bbv2/reference.html#bbv2.reference.rules">Builtin rules</a></span></dt>
<dt><span class="section"><a href="bbv2/reference.html#bbv2.overview.builtins.features">Builtin features</a></span></dt>
<dt><span class="section"><a href="bbv2/reference.html#bbv2.reference.tools">Builtin tools</a></span></dt>
<dt><span class="section"><a href="bbv2/reference.html#bbv2.reference.modules">Builtin modules</a></span></dt>
<dt><span class="section"><a href="bbv2/reference.html#bbv2.reference.class">Builtin classes</a></span></dt>
<dt><span class="section"><a href="bbv2/reference.html#bbv2.reference.buildprocess">Build process</a></span></dt>
<dt><span class="section"><a href="bbv2/reference.html#bbv2.reference.definitions">Definitions</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="bbv2/extender.html">Extender Manual</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="bbv2/extender.html#bbv2.extender.intro">Introduction</a></span></dt>
<dt><span class="section"><a href="bbv2/extender.html#bbv2.extender.example">Example: 1-to-1 generator</a></span></dt>
<dt><span class="section"><a href="bbv2/extender.html#bbv2.extending.targets">Target types</a></span></dt>
<dt><span class="section"><a href="bbv2/extender.html#bbv2.extending.tools">Tools and generators</a></span></dt>
<dt><span class="section"><a href="bbv2/extender.html#bbv2.extending.features">Features</a></span></dt>
<dt><span class="section"><a href="bbv2/extender.html#bbv2.extending.rules">Main target rules</a></span></dt>
<dt><span class="section"><a href="bbv2/extender.html#bbv2.extending.toolset_modules">Toolset modules</a></span></dt>
</dl></dd>
<dt><span class="section"><a href="bbv2/faq.html">Frequently Asked Questions</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="bbv2/faq.html#bbv2.faq.featurevalue">
      How do I get the current value of feature in Jamfile?
    </a></span></dt>
<dt><span class="section"><a href="bbv2/faq.html#bbv2.faq.duplicate">
      I am getting a "Duplicate name of actual target" error. What does that
      mean?
    </a></span></dt>
<dt><span class="section"><a href="bbv2/faq.html#bbv2.faq.envar">
      Accessing environment variables
    </a></span></dt>
<dt><span class="section"><a href="bbv2/faq.html#bbv2.faq.proporder">
      How to control properties order?
    </a></span></dt>
<dt><span class="section"><a href="bbv2/faq.html#bbv2.faq.liborder">
      How to control the library linking order on Unix?
    </a></span></dt>
<dt><span class="section"><a href="bbv2/faq.html#bbv2.faq.external">
      Can I get capture external program output using a Boost.Jam variable?
    </a></span></dt>
<dt><span class="section"><a href="bbv2/faq.html#bbv2.faq.projectroot">
      How to get the project root (a.k.a. Jamroot) location?
    </a></span></dt>
<dt><span class="section"><a href="bbv2/faq.html#bbv2.faq.flags">
      How to change compilation flags for one file?
    </a></span></dt>
<dt><span class="section"><a href="bbv2/faq.html#bbv2.faq.dll-path">
      Why are the <code class="literal">dll-path</code> and <code class="literal">hardcode-dll-paths
      </code> properties useful?
    </a></span></dt>
<dt><span class="section"><a href="bbv2/faq.html#bbv2.recipies.site-config">Targets in site-config.jam</a></span></dt>
<dt><span class="section"><a href="bbv2/faq.html#bbv2.faq.header-only-libraries">Header-only libraries</a></span></dt>
<dt><span class="section"><a href="bbv2/faq.html#bbv2.faq.names">
        What is the difference between Boost.Build, 
        <code class="filename">b2</code>, <code class="filename">bjam</code> and Perforce Jam?
      </a></span></dt>
</dl></dd>
</dl>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="bbv2.installation"></a>Installation</h2></div></div></div>
<p>
      To install Boost.Build from an official release or a nightly build, as
      available on the <a href="http://boost.org/boost-build2" target="_top">official web site</a>,
      follow these steps:
    </p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
          Unpack the release. On the command line, go to the root of the
          unpacked tree.
        </li>
<li class="listitem">
          Run either <span class="command"><strong>.\bootstrap.bat</strong></span> (on Windows), or
          <span class="command"><strong>./bootstrap.sh</strong></span> (on other operating systems).
        </li>
<li class="listitem">
          Run 
          <pre class="screen">./b2 install --prefix=<em class="replaceable"><code>PREFIX</code></em></pre>
          where <em class="replaceable"><code>PREFIX</code></em> is a directory where you
          want Boost.Build to be installed.
        </li>
<li class="listitem">
          Optionally, add <code class="filename"><em class="replaceable"><code>PREFIX</code></em>/bin</code>
          to your <code class="envar">PATH</code> environment variable.
        </li>
</ol></div>
<p>If you are not using a Boost.Build package, but rather the version
    bundled with the Boost C++ Libraries, the above commands should be run
    in the <code class="filename">tools/build</code> directory.</p>
<p>
      Now that Boost.Build is installed, you can try some of the examples. Copy
      <code class="filename"><em class="replaceable"><code>PREFIX</code></em>/share/boost-build/examples/hello</code>
      to a different directory, then change to that directory and run:
</p>
<pre class="screen"><code class="filename"><em class="replaceable"><code>PREFIX</code></em>/bin/b2</code></pre>
<p>
      A simple executable should be built.
    </p>
</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"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boostbook/dtd/rationale.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="bbv2/tutorial.html"><img src="../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>