File: buildprocess.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 (129 lines) | stat: -rw-r--r-- 6,820 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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Build process</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="../reference.html" title="Chapter7.Detailed reference">
<link rel="prev" href="tools.html" title="Builtin tools">
<link rel="next" href="definitions.html" title="Definitions">
</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="tools.html"><img src="../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="definitions.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="bbv2.reference.buildprocess"></a>Build process</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section"><a href="buildprocess.html#bbv2.reference.buildprocess.alternatives">Alternative selection</a></span></dt>
<dt><span class="section"><a href="buildprocess.html#bbv2.reference.buildprocess.common">Determining common properties</a></span></dt>
</dl></div>
<p>The general overview of the build process was given in the 
      <a href="../advanced/build_process.html" title="The Build Process">user documentation</a>.
      This section provides additional details, and some specific rules.
    </p>
<p>To recap, building a target with specific properties includes the
      following steps:
      </p>
<div class="orderedlist"><ol type="1">
<li><p>applying default build,</p></li>
<li><p>selecting the main target alternative to use,
          </p></li>
<li><p>determining "common" properties,</p></li>
<li><p>building targets referred by the sources list and
            dependency properties,</p></li>
<li><p>adding the usage requirements produces when building
            dependencies to the "common" properties,</p></li>
<li><p>building the target using generators,</p></li>
<li><p>computing the usage requirements to be returned.</p></li>
</ol></div>
<p>
    </p>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.buildprocess.alternatives"></a>Alternative selection</h3></div></div></div>
<p>When there are several alternatives, one of them must be
        selected. The process is as follows:</p>
<div class="orderedlist"><ol type="1">
<li>
            For each alternative <span class="emphasis"><em>condition</em></span> is defined
            as the set of base properies in requirements. [Note: it might be
            better to specify the condition explicitly, as in
            conditional requirements].
          </li>
<li>
            An alternative is viable only if all properties in condition
            are present in build request.
          </li>
<li>
            If there's one viable alternative, it's choosen. Otherwise,
            an attempt is made to find one best alternative. An alternative
            a is better than another alternative b, iff the set of properties
            in b's condition is a strict subset of the set of properities of
            'a's condition. If there's one viable alternative, which is
            better than all others, it's selected. Otherwise, an error is
            reported.
          </li>
</ol></div>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="bbv2.reference.buildprocess.common"></a>Determining common properties</h3></div></div></div>
<p>The "common" properties is a somewhat artificial term. Those are
        the intermediate property set from which both the build request for
        dependencies and properties for building the target are derived.
      </p>
<p>Since default build and alternatives are already handled, we have
        only two inputs: build requests and requirements. Here are the rules
        about common properties.
      </p>
<div class="orderedlist"><ol type="1">
<li><p>Non-free feature can have only one
            value</p></li>
<li><p>A non-conditional property in requirement in always
            present in common properties.</p></li>
<li><p>A property in build request is present in
            common properties, unless (2) tells otherwise.</p></li>
<li><p>If either build request, or requirements (non-conditional
            or conditional) include an expandable property (either composite,
            or property with specified subfeature value), the behaviour is
            equivalent to explicitly adding all expanded properties to build
            request or requirements.</p></li>
<li><p>If requirements include a conditional property, and
            condiiton of this property is true in context of common
            properties, then the conditional property should be in common
            properties as well.</p></li>
<li><p>If no value for a feature is given by other rules
            here, it has default value in common properties.</p></li>
</ol></div>
<p>Those rules are declarative, they don't specify how to compute the
        common properties. However, they provide enough information for the
        user. The important point is the handling of conditional
        requirements. The condition can be satisfied either by property in
        build request, by non-conditional requirements, or even by another
        conditional property. For example, the following example works as
        expected:
</p>
<pre class="programlisting">
exe a : a.cpp 
      : &lt;toolset&gt;gcc:&lt;variant&gt;release 
        &lt;variant&gt;release:&lt;define&gt;FOO ;
</pre>
<p>
      </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"><small></small></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="tools.html"><img src="../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="definitions.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>