File: installation.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 (199 lines) | stat: -rw-r--r-- 9,635 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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter2.Installation</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="howto.html" title="Chapter1.How to use this document">
<link rel="next" href="tutorial.html" title="Chapter3.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></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="howto.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="tutorial.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.installation"></a>Chapter2.Installation</h2></div></div></div>
<p>
      This section describes how to install Boost.Build from a
      released <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041" target="_top">Boost
      source distribution</a>
      or <a href="http://sourceforge.net/cvs/?group_id=7586" target="_top">CVS
      image</a>.
      <sup>[<a name="id2539276" href="#ftn.id2539276">1</a>]</sup>
All paths are given relative to
      the <em class="firstterm">Boost.Build v2 root directory</em>, which is 

      

      

      located in the <code class="filename">tools/build/v2</code> subdirectory
      of a full Boost <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041" target="_top">distribution</a>.
      <sup>[<a name="id2539319" href="#ftn.id2539319">2</a>]</sup>
    </p>
<div class="orderedlist"><ol type="1">
<li>
          Boost.Build uses <a href="../../../tools/jam/index.html" target="_top">Boost.Jam</a>, an
          extension of the <a href="http://www.perforce.com/jam/jam.html" target="_top">Perforce
          Jam</a> portable <span><strong class="command">make</strong></span> replacement. The
          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
          a prebuilt executable</a></strong></span> from SourceForge.
          If a prebuilt executable is not provided for your platform
          or you are using Boost's sources in an unreleased state, it
          may be necessary to 
          <a href="../jam/building.html" title=" Building BJam">build <span><strong class="command">bjam</strong></span>
          from sources</a> included in the Boost source tree.
        </li>
<li>
<p>

          To install Boost.Jam, copy the executable,
          called <span><strong class="command">bjam</strong></span>
          or <span><strong class="command">bjam.exe</strong></span> to a location accessible in
          your <code class="envar">PATH</code>.  Go to the Boost.Build root
          directory and
          run <span><strong class="command">bjam <code class="option">--version</code></strong></span>. You
          should see:

          </p>
<pre class="screen">
            Boost.Build V2 (Milestone N)
            Boost.Jam xx.xx.xx 
          </pre>
<p>

          where N is the version of Boost.Build you're using.
        </p>
</li>
<li>
          Configure Boost.Build to recognize the build resources (such
          as compilers and libraries) you have installed on your
          system.  Open the
          <code class="filename">user-config.jam</code> file in the Boost.Build
          root directory and follow the instructions there to describe
          your toolsets and libraries, and, if necessary, where they
          are located.
        </li>
<li>
          You should now be able to go to the
          <code class="filename">example/hello/</code> directory and run
          <span><strong class="command">bjam</strong></span> there. A simple application will be
          built. You can also play with other projects in the
          <code class="filename">example/</code> directory. 
    
        </li>
</ol></div>
<p>
      If you are using Boost's CVS state, be sure to
      rebuild <span><strong class="command">bjam</strong></span> even if you have a previous
      version.  The CVS version of Boost.Build requires the CVS
      version of Boost.Jam.
    </p>
<p>
      When <span><strong class="command">bjam</strong></span> is invoked, it always needs to be
      able to find the Boost.Build root directory, where the
      interpreted source code of Boost.Build is located.  There are
      two ways to tell <span><strong class="command">bjam</strong></span> about the root directory:
    </p>
<div class="itemizedlist"><ul type="disc">
<li>
          Set the environment variable <code class="envar">BOOST_BUILD_PATH</code>
          to the absolute path of the Boost.Build root directory.
        </li>
<li>
<p>
          At the root directory of your project or in any of its
          parent directories, create a file called
          <code class="filename">boost-build.jam</code>, with a single line:

</p>
<pre class="programlisting">
boost-build <em class="replaceable"><code>/path/to/boost.build</code></em> ;
</pre>
<p>

        </p>
</li>
</ul></div>
<h2>
<a name="id2538285"></a>Information for distributors</h2>
<p>
          If you're planning to package Boost.Build for a Linux distribution,
          please follow these guidelines:

          </p>
<div class="itemizedlist"><ul type="disc">
<li><p>Create a separate package for Boost.Jam.</p></li>
<li>
<p>Create another package for Boost.Build, and make
              this package install all Boost.Build files to
              <code class="filename">/usr/share/boost-build</code> directory. After
              install, that directory should contain everything you see in
              Boost.Build release package, except for
              <code class="filename">jam_src</code> directory.  If you're using Boost CVS
              to obtain Boost.Build, as opposed to release package, take
              everything from the <code class="filename">tools/build/v2</code> directory.
              For a check, make sure that
              <code class="filename">/usr/share/boost-build/boost-build.jam</code> is installed.
              </p>
<p>Placing Boost.Build into <code class="filename">/usr/share/boost-build</code>
              will make sure that <span><strong class="command">bjam</strong></span> will find Boost.Build
              without any additional setup.</p>
</li>
<li>
<p>Provide a
            <code class="filename">/etc/site-config.jam</code> configuration file that will
            contain:
</p>
<pre class="programlisting">
using gcc ;
</pre>
<p>
             You might want to add dependency from Boost.Build package to gcc,
             to make sure that users can always build Boost.Build examples.
            </p>
</li>
</ul></div>
<p>
        </p>
<p>If those guidelines are met, users will be able to invoke
        <span><strong class="command">bjam</strong></span> without any explicit configuration.
        </p>
<div class="footnotes">
<br><hr width="100" align="left">
<div class="footnote"><p><sup>[<a name="ftn.id2539276" href="#id2539276">1</a>] </sup>Note that packages prepared for
      Unix/Linux systems usually make their own choices about where to
      put things and even which parts of Boost to include.  When we
      say &#8220;released source distribution&#8221; we mean a
      distribution of Boost as released on its SourceForge
      <a href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041" target="_top">project
      page</a>.
        </p></div>
<div class="footnote"><p><sup>[<a name="ftn.id2539319" href="#id2539319">2</a>] </sup>The Boost.Build subset of boost is also distributed
        separately, for those who are only interested in getting a
        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
        distribution</a> contains all the subdirectories of the
        <code class="filename">tools/build/v2</code> subdirectory from a full
        Boost distribution, so it is itself a valid Boost.Build root
        directory.  It also contains the
        <code class="filename">tools/jam/src</code> subdirectory of a
        full Boost distribution, so you can rebuild Boost.Jam from
        source.
        </p></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="howto.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="tutorial.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>