1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
---|
4 | <title>Build process</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"> |
---|
8 | body { 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="../reference.html" title="Chapter 26. Detailed reference"> |
---|
18 | <link rel="prev" href="jamfiles.html" title="Writing Jamfiles"> |
---|
19 | <link rel="next" href="definitions.html" title="Definitions"> |
---|
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="jamfiles.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="definitions.html"><img src="../../images/next.png" alt="Next"></a> |
---|
33 | </div> |
---|
34 | <div class="section" lang="en"> |
---|
35 | <div class="titlepage"><div><div><h2 class="title" style="clear: both"> |
---|
36 | <a name="bbv2.reference.buildprocess"></a>Build process</h2></div></div></div> |
---|
37 | <div class="toc"><dl> |
---|
38 | <dt><span class="section"><a href="buildprocess.html#bbv2.reference.buildprocess.alternatives">Alternative selection</a></span></dt> |
---|
39 | <dt><span class="section"><a href="buildprocess.html#bbv2.reference.buildprocess.common">Determining common properties</a></span></dt> |
---|
40 | </dl></div> |
---|
41 | <p>The general overview of the build process was given in the |
---|
42 | <a href="../advanced/build_process.html" title="The Build Process">user documentation</a>. |
---|
43 | This section provides additional details, and some specific rules. |
---|
44 | </p> |
---|
45 | <p>To recap, building a target with specific properties includes the |
---|
46 | following steps: |
---|
47 | </p> |
---|
48 | <div class="orderedlist"><ol type="1"> |
---|
49 | <li><p>applying default build,</p></li> |
---|
50 | <li><p>selecting the main target alternative to use, |
---|
51 | </p></li> |
---|
52 | <li><p>determining "common" properties</p></li> |
---|
53 | <li><p>building targets referred by the sources list and |
---|
54 | dependency properties</p></li> |
---|
55 | <li><p>adding the usage requirements produces when building |
---|
56 | dependencies to the "common" properties</p></li> |
---|
57 | <li><p>building the target using generators</p></li> |
---|
58 | <li><p>computing the usage requirements to be returned</p></li> |
---|
59 | </ol></div> |
---|
60 | <div class="section" lang="en"> |
---|
61 | <div class="titlepage"><div><div><h3 class="title"> |
---|
62 | <a name="bbv2.reference.buildprocess.alternatives"></a>Alternative selection</h3></div></div></div> |
---|
63 | <p>When there are several alternatives, one of them must be |
---|
64 | selected. The process is as follows:</p> |
---|
65 | <div class="orderedlist"><ol type="1"> |
---|
66 | <li> |
---|
67 | For each alternative <span class="emphasis"><em>condition</em></span> is defined |
---|
68 | as the set of base properies in requirements. [Note: it might be |
---|
69 | better to specify the condition explicitly, as in |
---|
70 | conditional requirements]. |
---|
71 | </li> |
---|
72 | <li> |
---|
73 | An alternative is viable only if all properties in condition |
---|
74 | are present in build request. |
---|
75 | </li> |
---|
76 | <li> |
---|
77 | If there's one viable alternative, it's choosen. Otherwise, |
---|
78 | an attempt is made to find one best alternative. An alternative |
---|
79 | a is better than another alternative b, iff set of properties |
---|
80 | in b's condition is strict subset of the set of properities of |
---|
81 | 'a's condition. If there's one viable alternative, which is |
---|
82 | better than all other, it's selected. Otherwise, an error is |
---|
83 | reported. |
---|
84 | </li> |
---|
85 | </ol></div> |
---|
86 | </div> |
---|
87 | <div class="section" lang="en"> |
---|
88 | <div class="titlepage"><div><div><h3 class="title"> |
---|
89 | <a name="bbv2.reference.buildprocess.common"></a>Determining common properties</h3></div></div></div> |
---|
90 | <p>The "common" properties is a somewhat artificial term. Those are |
---|
91 | the intermediate property set from which both the build request for |
---|
92 | dependencies and properties for building the target are derived. |
---|
93 | </p> |
---|
94 | <p>Since default build and alternatives are already handled, we have |
---|
95 | only two inputs: build requests and requirements. Here are the rules |
---|
96 | about common properties. |
---|
97 | </p> |
---|
98 | <div class="orderedlist"><ol type="1"> |
---|
99 | <li><p>Non-free feature can have only one |
---|
100 | value</p></li> |
---|
101 | <li><p>A non-conditional property in requirement in always |
---|
102 | present in common properties.</p></li> |
---|
103 | <li><p>A property in build request is present in |
---|
104 | common properties, unless (2) tells otherwise.</p></li> |
---|
105 | <li><p>If either build request, or requirements (non-conditional |
---|
106 | or conditional) include an expandable property (either composite, |
---|
107 | or property with specified subfeature value), the behaviour is |
---|
108 | equivalent to explicitly adding all expanded properties to build |
---|
109 | request or requirements.</p></li> |
---|
110 | <li><p>If requirements include a conditional property, and |
---|
111 | condiiton of this property is true in context of common |
---|
112 | properties, then the conditional property should be in common |
---|
113 | properties as well.</p></li> |
---|
114 | <li><p>If no value for a feature is given by other rules |
---|
115 | here, it has default value in common properties.</p></li> |
---|
116 | </ol></div> |
---|
117 | <p>Those rules are declarative, they don't specify how to compute the |
---|
118 | common properties. However, they provide enough information for the |
---|
119 | user. The important point is the handling of conditional |
---|
120 | requirements. The condition can be satisfied either by property in |
---|
121 | build request, by non-conditional requirements, or even by another |
---|
122 | conditional property. For example, the following example works as |
---|
123 | expected: |
---|
124 | </p> |
---|
125 | <pre class="programlisting"> |
---|
126 | exe a : a.cpp |
---|
127 | : <toolset>gcc:<variant>release |
---|
128 | <variant>release:<define>FOO ; |
---|
129 | </pre> |
---|
130 | </div> |
---|
131 | </div> |
---|
132 | <table width="100%"><tr> |
---|
133 | <td align="left"></td> |
---|
134 | <td align="right"><small></small></td> |
---|
135 | </tr></table> |
---|
136 | <hr> |
---|
137 | <div class="spirit-nav"> |
---|
138 | <a accesskey="p" href="jamfiles.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.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="definitions.html"><img src="../../images/next.png" alt="Next"></a> |
---|
139 | </div> |
---|
140 | </body> |
---|
141 | </html> |
---|