Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/doc/html/bbv2/installation.html @ 47

Last change on this file since 47 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 9.6 KB
Line 
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>Installation</title>
5<link rel="stylesheet" href="../boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
7<link rel="start" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
8<link rel="up" href="../bbv2.html" title="Chapter 25. Boost.Build V2 User Manual">
9<link rel="prev" href="../bbv2.html" title="Chapter 25. Boost.Build V2 User Manual">
10<link rel="next" href="tutorial.html" title="Tutorial">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%">
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
15<td align="center"><a href="../../../index.htm">Home</a></td>
16<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="../../../people/people.htm">People</a></td>
18<td align="center"><a href="../../../more/faq.htm">FAQ</a></td>
19<td align="center"><a href="../../../more/index.htm">More</a></td>
20</table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="../bbv2.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>
24</div>
25<div class="section" lang="en">
26<div class="titlepage"><div><div><h2 class="title" style="clear: both">
27<a name="bbv2.installation"></a>Installation</h2></div></div></div>
28<p>
29      This section describes how to install Boost.Build from a
30      released <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041" target="_top">Boost
31      source distribution</a>
32      or <a href="http://sourceforge.net/cvs/?group_id=7586" target="_top">CVS
33      image</a>.
34      <sup>[<a name="id2117455" href="#ftn.id2117455">3</a>]</sup>
35All paths are given relative to
36      the <em class="firstterm">Boost.Build v2 root directory</em>, which is
37
38     
39
40     
41
42      located in the <code class="filename">tools/build/v2</code> subdirectory
43      of a full Boost <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041" target="_top">distribution</a>.
44      <sup>[<a name="id2117488" href="#ftn.id2117488">4</a>]</sup>
45    </p>
46<div class="orderedlist"><ol type="1">
47<li>
48          Boost.Build uses <a href="../../../tools/jam/index.html" target="_top">Boost.Jam</a>, an
49          extension of the <a href="http://www.perforce.com/jam/jam.html" target="_top">Perforce
50          Jam</a> portable <span><strong class="command">make</strong></span> replacement. The
51          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
52          a prebuilt executable</a></strong></span> from SourceForge.
53          If a prebuilt executable is not provided for your platform
54          or you are using Boost's sources in an unreleased state, it
55          may be necessary to
56          <a href="../jam/building.html" title=" Building BJam">build <span><strong class="command">bjam</strong></span>
57          from sources</a> included in the Boost source tree.
58        </li>
59<li>
60<p>
61
62          To install Boost.Jam, copy the executable,
63          called <span><strong class="command">bjam</strong></span>
64          or <span><strong class="command">bjam.exe</strong></span> to a location accessible in
65          your <code class="envar">PATH</code>.  Go to the Boost.Build root
66          directory and
67          run <span><strong class="command">bjam <code class="option">--version</code></strong></span>. You
68          should see:
69
70          </p>
71<pre class="screen">
72            Boost.Build V2 (Milestone N)
73            Boost.Jam xx.xx.xx
74          </pre>
75<p>
76
77          where N is the version of Boost.Build you're using.
78        </p>
79</li>
80<li>
81          Configure Boost.Build to recognize the build resources (such
82          as compilers and libraries) you have installed on your
83          system.  Open the
84          <code class="filename">user-config.jam</code> file in the Boost.Build
85          root directory and follow the instructions there to describe
86          your toolsets and libraries, and, if necessary, where they
87          are located.
88        </li>
89<li>
90          You should now be able to go to the
91          <code class="filename">example/hello/</code> directory and run
92          <span><strong class="command">bjam</strong></span> there. A simple application will be
93          built. You can also play with other projects in the
94          <code class="filename">example/</code> directory.
95   
96        </li>
97</ol></div>
98<p>
99      If you are using Boost's CVS state, be sure to
100      rebuild <span><strong class="command">bjam</strong></span> even if you have a previous
101      version.  The CVS version of Boost.Build requires the CVS
102      version of Boost.Jam.
103    </p>
104<p>
105      When <span><strong class="command">bjam</strong></span> is invoked, it always needs to be
106      able to find the Boost.Build root directory, where the
107      interpreted source code of Boost.Build is located.  There are
108      two ways to tell <span><strong class="command">bjam</strong></span> about the root directory:
109    </p>
110<div class="itemizedlist"><ul type="disc">
111<li>
112          Set the environment variable <code class="envar">BOOST_BUILD_PATH</code>
113          to the absolute path of the Boost.Build root directory.
114        </li>
115<li>
116<p>
117          At the root directory of your project or in any of its
118          parent directories, create a file called
119          <code class="filename">boost-build.jam</code>, with a single line:
120
121</p>
122<pre class="programlisting">
123boost-build <em class="replaceable"><code>/path/to/boost.build</code></em> ;
124</pre>
125<p>
126
127        </p>
128</li>
129</ul></div>
130<h3>
131<a name="id2117741"></a>Information for distributors</h3>
132<p>
133          If you're planning to package Boost.Build for a Linux distribution,
134          please follow these guidelines:
135
136          </p>
137<div class="itemizedlist"><ul type="disc">
138<li><p>Create a separate package for Boost.Jam.</p></li>
139<li>
140<p>Create another package for Boost.Build, and make
141              this package install all Boost.Build files to
142              <code class="filename">/usr/share/boost-build</code> directory. After
143              install, that directory should contain everything you see in
144              Boost.Build release package, except for
145              <code class="filename">jam_src</code> directory.  If you're using Boost CVS
146              to obtain Boost.Build, as opposed to release package, take
147              everything from the <code class="filename">tools/build/v2</code> directory.
148              For a check, make sure that
149              <code class="filename">/usr/share/boost-build/boost-build.jam</code> is installed.
150              </p>
151<p>Placing Boost.Build into <code class="filename">/usr/share/boost-build</code>
152              will make sure that <span><strong class="command">bjam</strong></span> will find Boost.Build
153              without any additional setup.</p>
154</li>
155<li>
156<p>Provide a
157            <code class="filename">/etc/site-config.jam</code> configuration file that will
158            contain:
159</p>
160<pre class="programlisting">
161using gcc ;
162</pre>
163<p>
164             You might want to add dependency from Boost.Build package to gcc,
165             to make sure that users can always build Boost.Build examples.
166            </p>
167</li>
168</ul></div>
169<p>
170        </p>
171<p>If those guidelines are met, users will be able to invoke
172        <span><strong class="command">bjam</strong></span> without any explicit configuration.
173        </p>
174<div class="footnotes">
175<br><hr width="100" align="left">
176<div class="footnote"><p><sup>[<a name="ftn.id2117455" href="#id2117455">3</a>] </sup>Note that packages prepared for
177      Unix/Linux systems usually make their own choices about where to
178      put things and even which parts of Boost to include.  When we
179      say &#8220;released source distribution&#8221; we mean a
180      distribution of Boost as released on its SourceForge
181      <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041" target="_top">project
182      page</a>.
183        </p></div>
184<div class="footnote"><p><sup>[<a name="ftn.id2117488" href="#id2117488">4</a>] </sup>The Boost.Build subset of boost is also distributed
185        separately, for those who are only interested in getting a
186        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
187        distribution</a> contains all the subdirectories of the
188        <code class="filename">tools/build/v2</code> subdirectory from a full
189        Boost distribution, so it is itself a valid Boost.Build root
190        directory.  It also contains the
191        <code class="filename">tools/jam/src</code> subdirectory of a
192        full Boost distribution, so you can rebuild Boost.Jam from
193        source.
194        </p></div>
195</div>
196</div>
197<table width="100%"><tr>
198<td align="left"></td>
199<td align="right"><small></small></td>
200</tr></table>
201<hr>
202<div class="spirit-nav">
203<a accesskey="p" href="../bbv2.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>
204</div>
205</body>
206</html>
Note: See TracBrowser for help on using the repository browser.