Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/doc/html/bbv2/installation.html @ 12

Last change on this file since 12 was 12, checked in by landauf, 18 years ago

added boost

File size: 8.7 KB
Line 
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>Chapter 22. Installation</title>
5<link rel="stylesheet" href="../boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
7<style type="text/css">
8body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
9       background-repeat: no-repeat;
10       background-position: top left;
11       /* The following properties make the watermark "fixed" on the page. */
12       /* I think that's just a bit too distracting for the reader... */
13       /* background-attachment: fixed; */
14       /* background-position: center center; */
15     }</style>
16<link rel="start" href="../index.html" title="The Boost C++ Libraries">
17<link rel="up" href="../bbv2.html" title="Part III. Boost.Build v2 User Manual">
18<link rel="prev" href="howto.html" title="Chapter 21. How to use this document">
19<link rel="next" href="tutorial.html" title="Chapter 23. Tutorial">
20</head>
21<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
22<table cellpadding="2" width="100%">
23<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../boost.png"></td>
24<td align="center"><a href="../../../index.htm">Home</a></td>
25<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
26<td align="center"><a href="../../../people/people.htm">People</a></td>
27<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
28<td align="center"><a href="../../../more/index.htm">More</a></td>
29</table>
30<hr>
31<div class="spirit-nav">
32<a accesskey="p" href="howto.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../bbv2.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../images/next.png" alt="Next"></a>
33</div>
34<div class="chapter" lang="en">
35<div class="titlepage"><div><div><h2 class="title">
36<a name="bbv2.installation"></a>Chapter 22. Installation</h2></div></div></div>
37<p>
38      This section describes how to install Boost.Build from a
39      released <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041" target="_top">Boost
40      source distribution</a>
41      or <a href="http://sourceforge.net/cvs/?group_id=7586" target="_top">CVS
42      image</a>.
43      <sup>[<a name="id2853505" href="#ftn.id2853505">2</a>]</sup>
44All paths are given relative to
45      the <em class="firstterm">Boost.Build v2 root directory</em>, which is
46
47     
48
49      located in the <code class="filename">tools/build/v2</code> subdirectory
50      of a full Boost <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041" target="_top">distribution</a>.
51      <sup>[<a name="id2853545" href="#ftn.id2853545">3</a>]</sup></p>
52<div class="orderedlist"><ol type="1">
53<li>
54          Boost.Build uses <a href="../../../tools/build/jam_src/index.html" target="_top">Boost.Jam</a>, an
55          extension of the <a href="http://www.perforce.com/jam/jam.html" target="_top">Perforce
56          Jam</a> portable <span><strong class="command">make</strong></span> replacement. The
57          recommended way to get Boost.Jam is to <span class="bold"><strong><a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=72941" target="_top">download
58          a prebuilt executable</a></strong></span> from SourceForge.
59          If a prebuilt executable is not provided for your platform
60          or you are using Boost's sources in an unreleased state, it
61          may be necessary to <a href="../../../tools/build/jam_src/index.html#building_bjam" target="_top">build <span><strong class="command">bjam</strong></span>
62          from sources</a> included in the Boost source tree.
63        </li>
64<li>
65<p>
66
67          To install Boost.Jam, copy the executable,
68          called <span><strong class="command">bjam</strong></span>
69          or <span><strong class="command">bjam.exe</strong></span> to a location accessible in
70          your <code class="envar">PATH</code>.  Go to the Boost.Build root
71          directory and
72          run <span><strong class="command">bjam <code class="option">--version</code></strong></span>. You
73          should see:
74
75          </p>
76<pre class="screen">
77            Boost.Build V2 (Milestone N)
78            Boost.Jam xx.xx.xx
79          </pre>
80<p>
81
82          where N is the version of Boost.Build you're using.
83        </p>
84</li>
85<li>
86          Configure Boost.Build to recognize the build resources (such
87          as compilers and libraries) you have installed on your
88          system.  Open the
89          <code class="filename">user-config.jam</code> file in the Boost.Build
90          root directory and follow the instructions there to describe
91          your toolsets and libraries, and, if necessary, where they
92          are located.
93        </li>
94<li>
95          You should now be able to go to the
96          <code class="filename">example/hello/</code> directory and run
97          <span><strong class="command">bjam</strong></span> there. A simple application will be
98          built. You can also play with other projects in the
99          <code class="filename">example/</code> directory.
100    </li>
101</ol></div>
102<p>
103      If you are using Boost's CVS state, be sure to
104      rebuild <span><strong class="command">bjam</strong></span> even if you have a previous
105      version.  The CVS version of Boost.Build requires the CVS
106      version of Boost.Jam.
107    </p>
108<p>
109      When <span><strong class="command">bjam</strong></span> is invoked, it always needs to be
110      able to find the Boost.Build root directory, where the
111      interpreted source code of Boost.Build is located.  There are
112      two ways to tell <span><strong class="command">bjam</strong></span> about the root directory:
113    </p>
114<div class="itemizedlist"><ul type="disc">
115<li>
116          Set the environment variable <code class="envar">BOOST_BUILD_PATH</code>
117          to the absolute path of the Boost.Build root directory.
118        </li>
119<li>
120<p>
121          At the root directory of your project or in any of its
122          parent directories, create a file called
123          <code class="filename">boost-build.jam</code>, with a single line:
124
125</p>
126<pre class="programlisting">
127boost-build <em class="replaceable"><code>/path/to/boost.build</code></em> ;
128</pre>
129</li>
130</ul></div>
131<p><span class="bold"><strong>N.B.</strong></span>
132  When <span><strong class="command">bjam</strong></span> is invoked from anywhere in the Boost
133  directory tree <span class="emphasis"><em>other than</em></span> the Boost.Build root
134  and its subdirectories, <a href="../../../tools/build/index.html" target="_top">Boost.Build
135  v1</a> is used by default. To override the default and use
136  Boost.Build v2, you have to add the <code class="option">--v2</code> command
137  line option to all <span><strong class="command">bjam</strong></span> invocations.</p>
138<div class="footnotes">
139<br><hr width="100" align="left">
140<div class="footnote"><p><sup>[<a name="ftn.id2853505" href="#id2853505">2</a>] </sup>Note that packages prepared for
141      Unix/Linux systems usually make their own choices about where to
142      put things and even which parts of Boost to include.  When we
143      say &#8220;released source distribution&#8221; we mean a
144      distribution of Boost as released on its SourceForge
145      <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041" target="_top">project
146      page</a>.
147        </p></div>
148<div class="footnote"><p><sup>[<a name="ftn.id2853545" href="#id2853545">3</a>] </sup>The Boost.Build subset of boost is also distributed
149        separately, for those who are only interested in getting a
150        build tool. The top-level directory of a <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=80982" target="_top">Boost.Build
151        distribution</a> contains all the subdirectories of the
152        <code class="filename">tools/build/v2</code> subdirectory from a full
153        Boost distribution, so it is itself a valid Boost.Build root
154        directory.  It also contains the
155        <code class="filename">tools/build/jam_src</code> subdirectory of a
156        full Boost distribution, so you can rebuild Boost.Jam from
157        source.
158        </p></div>
159</div>
160</div>
161<table width="100%"><tr>
162<td align="left"></td>
163<td align="right"><small></small></td>
164</tr></table>
165<hr>
166<div class="spirit-nav">
167<a accesskey="p" href="howto.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../bbv2.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="tutorial.html"><img src="../images/next.png" alt="Next"></a>
168</div>
169</body>
170</html>
Note: See TracBrowser for help on using the repository browser.