diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
commit | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (patch) | |
tree | 7a7053ceb8874b28ec4b868d4c49b500008a102e /doc/html/bbv2 | |
parent | bb4dd8289b351fae6b55e303f189127a394a1edd (diff) | |
download | boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.gz boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.bz2 boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.zip |
Imported Upstream version 1.57.0upstream/1.57.0
Diffstat (limited to 'doc/html/bbv2')
-rw-r--r-- | doc/html/bbv2/extender.html | 64 | ||||
-rw-r--r-- | doc/html/bbv2/faq.html | 40 | ||||
-rw-r--r-- | doc/html/bbv2/installation.html | 8 | ||||
-rw-r--r-- | doc/html/bbv2/overview.html | 133 | ||||
-rw-r--r-- | doc/html/bbv2/reference.html | 601 | ||||
-rw-r--r-- | doc/html/bbv2/tasks.html | 114 | ||||
-rw-r--r-- | doc/html/bbv2/tutorial.html | 24 |
7 files changed, 682 insertions, 302 deletions
diff --git a/doc/html/bbv2/extender.html b/doc/html/bbv2/extender.html index 955e87fd87..dcce83c99e 100644 --- a/doc/html/bbv2/extender.html +++ b/doc/html/bbv2/extender.html @@ -3,9 +3,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Extender Manual</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../bbv2.html" title="Chapter 39. Boost.Build V2 User Manual"> +<link rel="up" href="../bbv2.html" title="Chapter 43. Boost.Build V2 User Manual"> <link rel="prev" href="reference.html" title="Reference"> <link rel="next" href="faq.html" title="Frequently Asked Questions"> </head> @@ -25,7 +25,7 @@ <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="bbv2.extender"></a>Extender Manual</h2></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="extender.html#bbv2.extender.intro">Introduction</a></span></dt> <dt><span class="section"><a href="extender.html#bbv2.extender.example">Example: 1-to-1 generator</a></span></dt> <dt><span class="section"><a href="extender.html#bbv2.extending.targets">Target types</a></span></dt> @@ -37,7 +37,7 @@ <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.extender.intro"></a>Introduction</h3></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="extender.html#bbv2.extender.overview.metatargets">Metatargets</a></span></dt> <dt><span class="section"><a href="extender.html#bbv2.extender.overview.targets">Concrete targets</a></span></dt> <dt><span class="section"><a href="extender.html#bbv2.extender.overview.generators">Generators</a></span></dt> @@ -53,7 +53,7 @@ The current version of Boost.Build has three levels of targets, listed below. </p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term">metatarget</span></dt> <dd><p> Object that is created from declarations in Jamfiles. May @@ -94,14 +94,14 @@ and can be called with specific properties to generate concrete targets. At the code level it is represented by an instance of class derived from <a class="link" href="reference.html#bbv2.reference.class.abstract-target" title="Class abstract-target">abstract-target</a>. - <sup>[<a name="id4013451" href="#ftn.id4013451" class="footnote">13</a>]</sup> + <a href="#ftn.idp549788672" class="footnote" name="idp549788672"><sup class="footnote">[16]</sup></a> </p> <p>The <a class="link" href="reference.html#bbv2.reference.class.abstract-target.generate">generate</a> method takes the build properties (as an instance of the <a class="link" href="reference.html#bbv2.reference.class.property-set" title="Class property-set"> property-set</a> class) and returns a list containing:</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>As front element—Usage-requirements from this invocation (an instance of <a class="link" href="reference.html#bbv2.reference.class.property-set" title="Class property-set"> property-set</a>)</p></li> @@ -114,7 +114,7 @@ lookup and generate a metatarget.</p> <p>The <a class="link" href="reference.html#bbv2.reference.class.abstract-target" title="Class abstract-target">abstract-target</a> class has three immediate derived classes:</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p><a class="link" href="reference.html#bbv2.reference.class.project-target" title="Class project-target">project-target</a> that corresponds to a project and is not intended for further subclassing. The <a class="link" href="reference.html#bbv2.reference.class.project-target.generate"> @@ -173,7 +173,7 @@ local a = [ new action $(source) : common.copy : $(property-set) ] ; local t = [ new file-target $(name) : CPP : $(project) : $(a) ] ; </pre> -<p>The first line creates an instance of the <code class="computeroutput">action></code> class. +<p>The first line creates an instance of the <code class="computeroutput">action</code> class. The first parameter is the list of sources. The second parameter is the name a jam-level <a class="link" href="overview.html#bbv2.overview.jam_language.actions">action</a>. The third parameter is the property-set applying to this action. The second line @@ -184,8 +184,9 @@ local t = [ new file-target $(name) : CPP : $(project) : $(a) ] ; once with the same properties. Returning to different instance of <code class="computeroutput">file-target</code> that correspond to the same file clearly will result in problems. Therefore, whenever returning targets you should pass them via the <code class="computeroutput">virtual-target.register</code> - function, that will replace targets with previously created identical ones, as - necessary.<sup>[<a name="id4013834" href="#ftn.id4013834" class="footnote">14</a>]</sup> + function, besides allowing Boost.Build to track which virtual targets + got created for each metatarget, this will also replace targets with previously created identical + ones, as necessary.<a href="#ftn.idp549828832" class="footnote" name="idp549828832"><sup class="footnote">[17]</sup></a> Here are a couple of examples: </p> <pre class="programlisting"> @@ -207,7 +208,7 @@ return [ sequence.transform virtual-target.register : $(targets) ] ; <p>In practice, most files have specific types, and most tools consume and produce files of specific type. To take advantage of this fact, Boost.Build defines concept of target type and - <a class="indexterm" name="id4013893"></a> + <a class="indexterm" name="idp549835104"></a> <em class="firstterm">generators</em>, and has special metatarget class <a class="link" href="reference.html#bbv2.reference.class.typed-target" title="Class typed-target">typed-target</a>. Target type is merely an identifier. It is associated with a set of file extensions that @@ -312,8 +313,8 @@ exe codegen : codegen.cpp class_template.verbatim usage.verbatim ; <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.extending.targets"></a>Target types</h3></div></div></div> -<div class="toc"><dl><dt><span class="section"><a href="extender.html#bbv2.extending.scanners">Scanners</a></span></dt></dl></div> -<p>The first thing we did in the <a class="link" href="extender.html#bbv2.extender.intro" title="Introduction">intruduction</a> was declaring a +<div class="toc"><dl class="toc"><dt><span class="section"><a href="extender.html#bbv2.extending.scanners">Scanners</a></span></dt></dl></div> +<p>The first thing we did in the <a class="link" href="extender.html#bbv2.extender.intro" title="Introduction">introduction</a> was declaring a new target type: </p> <pre class="programlisting"> @@ -456,7 +457,7 @@ actions inline-file and the target type. When invoked, the generator will create a target of type <code class="literal">CPP</code> with a source target of type <code class="literal">VERBATIM</code> as the only source. But what command - will be used to actually generate the file? In bjam, actions are + will be used to actually generate the file? In Boost.Build, actions are specified using named "actions" blocks and the name of the action block should be specified when creating targets. By convention, generators use the same name of the action block as their own id. So, @@ -492,7 +493,7 @@ generators.register-composing mex.mex : CPP LIB : MEX ; </p> <p>(Need a note about UNIX)</p> <h4> -<a name="id4014577"></a>Custom generator classes</h4> +<a name="idp549908512"></a>Custom generator classes</h4> <p>The standard generators allows you to specify source and target types, an action, and a set of flags. If you need anything more complex, @@ -683,7 +684,7 @@ actions inline-file <p> Using portable features is a good idea because: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>When a portable feature is given a fixed set of values, you can build your project with two different settings of the feature and Boost.Build will automatically @@ -700,7 +701,7 @@ actions inline-file <p> </p> <h4> -<a name="id4014858"></a>Steps for adding a feauture</h4> +<a name="idp549940144"></a>Steps for adding a feauture</h4> <p>Adding a feature requires three steps: </p> @@ -711,7 +712,7 @@ actions inline-file attributes</a>: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>if you want a feature value set for one target to automaticaly propagate to its dependant targets then make it “propagated”. </p></li> @@ -720,7 +721,7 @@ actions inline-file </code> feature is a free feature.</p></li> <li class="listitem"><p>if a feature is used to refer to a path relative to the Jamfile, it must be a “path” feature. Such features will - also get their values automatically converted to Boost Build's + also get their values automatically converted to Boost.Build's internal path representation. For example, <code class="computeroutput">include</code> is a path feature.</p></li> <li class="listitem"><p>if feature is used to refer to some target, it @@ -741,7 +742,7 @@ actions inline-file <p> </p> <h4> -<a name="id4014957"></a>Another example</h4> +<a name="idp549951168"></a>Another example</h4> <p>Here's another example. Let's see how we can make a feature that refers to a target. For example, when linking dynamic libraries on Windows, one sometimes needs to @@ -796,15 +797,14 @@ actions link bind DEF_FILE <p> </p> <p> Note the <code class="computeroutput">bind DEF_FILE</code> part. It tells - bjam to translate the internal target name in + Boost.Build to translate the internal target name in <code class="varname">DEF_FILE</code> to a corresponding filename in the <code class="computeroutput">link</code> action. Without it the expansion of <code class="computeroutput">$(DEF_FILE)</code> would be a strange symbol that is not likely to make sense for the linker. </p> <p> - We are almost done, but we should stop for a small workaround. Add the following - code to msvc.jam + We are almost done, except for adding the follwing code to <code class="filename">msvc.jam</code>: </p> <pre class="programlisting"> @@ -816,14 +816,14 @@ rule link <p> - This is needed to accomodate some bug in bjam, which hopefully - will be fixed one day. + This is a workaround for a bug in Boost.Build engine, which will hopefully + be fixed one day. </p> </li> </ol></div> <h4> -<a name="id4015068"></a>Variants and composite features.</h4> +<a name="idp549963616"></a>Variants and composite features.</h4> <p>Sometimes you want to create a shortcut for some set of features. For example, <code class="computeroutput">release</code> is a value of <code class="computeroutput"><variant></code> and is a shortcut for a set of features. @@ -951,7 +951,7 @@ glib codegen ; <p>Here are some guidelines that help to make Boost.Build more consistent: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>The <code class="computeroutput">init</code> rule should never fail. Even if the user provided an incorrect path, you should emit a warning and go on. Configuration may be shared between different machines, and @@ -1020,16 +1020,16 @@ using yfc ; </p> </div> <div class="footnotes"> -<br><hr width="100" align="left"> -<div class="footnote"><p><sup>[<a id="ftn.id4013451" href="#id4013451" class="para">13</a>] </sup>This name is historic, and will be eventuall changed to +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.idp549788672" class="footnote"><p><a href="#idp549788672" class="para"><sup class="para">[16] </sup></a>This name is historic, and will be eventuall changed to <code class="computeroutput">metatarget</code></p></div> -<div class="footnote"><p><sup>[<a id="ftn.id4013834" href="#id4013834" class="para">14</a>] </sup>This create-then-register pattern is caused by limitations +<div id="ftn.idp549828832" class="footnote"><p><a href="#idp549828832" class="para"><sup class="para">[17] </sup></a>This create-then-register pattern is caused by limitations of the Boost.Jam language. Python port is likely to never create duplicate targets.</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"><div class="copyright-footer">Copyright © 2006-2009 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. +<td align="right"><div class="copyright-footer">Copyright © 2006-2009, 2014 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> diff --git a/doc/html/bbv2/faq.html b/doc/html/bbv2/faq.html index be0aa5ee07..ab62cf4b91 100644 --- a/doc/html/bbv2/faq.html +++ b/doc/html/bbv2/faq.html @@ -3,9 +3,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Frequently Asked Questions</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../bbv2.html" title="Chapter 39. Boost.Build V2 User Manual"> +<link rel="up" href="../bbv2.html" title="Chapter 43. Boost.Build V2 User Manual"> <link rel="prev" href="extender.html" title="Extender Manual"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -24,7 +24,7 @@ <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="bbv2.faq"></a>Frequently Asked Questions</h2></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="faq.html#bbv2.faq.featurevalue"> How do I get the current value of feature in Jamfile? </a></span></dt> @@ -56,6 +56,10 @@ </a></span></dt> <dt><span class="section"><a href="faq.html#bbv2.recipies.site-config">Targets in site-config.jam</a></span></dt> <dt><span class="section"><a href="faq.html#bbv2.faq.header-only-libraries">Header-only libraries</a></span></dt> +<dt><span class="section"><a href="faq.html#bbv2.faq.names"> + What is the difference between Boost.Build, + <code class="filename">b2</code>, <code class="filename">bjam</code> and Perforce Jam? + </a></span></dt> </dl></div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> @@ -76,7 +80,7 @@ A feature has a specific value only when building a target, and there are two ways you can use that value: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> Use conditional requirements or indirect conditional requirements. See <a class="xref" href="overview.html#bbv2.overview.targets.requirements.conditional">the section called “Requirements”</a>. @@ -514,10 +518,36 @@ alias mylib ; <p> </p> </div> +<div class="section"> +<div class="titlepage"><div><div><h3 class="title"> +<a name="bbv2.faq.names"></a> + What is the difference between Boost.Build, + <code class="filename">b2</code>, <code class="filename">bjam</code> and Perforce Jam? + </h3></div></div></div> +<p> + Boost.Build is the name of the complete build system. The executable that runs + it is <code class="filename">b2</code>. That executable is written in C and implements + performance-critical algorithms, like traversal of dependency graph and executing + commands. It also implements an interpreted language used to implement the rest of + Boost.Build. This executable is formally called "Boost.Build engine". + </p> +<p> + The Boost.Build engine is derived from an earlier build tool called Perforce Jam. Originally, + there were just minor changes, and the filename was <code class="filename">bjam</code>. Later on, + with more and more changes, the similarity of names because a disservice to users, and as of + Boost 1.47.0, the official name of the executable was changed to <code class="filename">b2</code>. + A copy named <code class="filename">bjam</code> is still created for compatibility, + but you are encouraged to use the new name in all cases. + </p> +<p> + Perforce Jam was an important foundation, and we gratefully acknowledge its influence, + but for users today, these tools share only some basics of the interpreted language. + </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"><div class="copyright-footer">Copyright © 2006-2009 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. +<td align="right"><div class="copyright-footer">Copyright © 2006-2009, 2014 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> diff --git a/doc/html/bbv2/installation.html b/doc/html/bbv2/installation.html index 507f39d195..2648743652 100644 --- a/doc/html/bbv2/installation.html +++ b/doc/html/bbv2/installation.html @@ -3,10 +3,10 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Installation</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../bbv2.html" title="Chapter 39. Boost.Build V2 User Manual"> -<link rel="prev" href="../bbv2.html" title="Chapter 39. Boost.Build V2 User Manual"> +<link rel="up" href="../bbv2.html" title="Chapter 43. Boost.Build V2 User Manual"> +<link rel="prev" href="../bbv2.html" title="Chapter 43. Boost.Build V2 User Manual"> <link rel="next" href="tutorial.html" title="Tutorial"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> @@ -65,7 +65,7 @@ </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> -<td align="right"><div class="copyright-footer">Copyright © 2006-2009 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. +<td align="right"><div class="copyright-footer">Copyright © 2006-2009, 2014 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> diff --git a/doc/html/bbv2/overview.html b/doc/html/bbv2/overview.html index 89e5f54953..41c8456b5b 100644 --- a/doc/html/bbv2/overview.html +++ b/doc/html/bbv2/overview.html @@ -3,9 +3,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Overview</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../bbv2.html" title="Chapter 39. Boost.Build V2 User Manual"> +<link rel="up" href="../bbv2.html" title="Chapter 43. Boost.Build V2 User Manual"> <link rel="prev" href="tutorial.html" title="Tutorial"> <link rel="next" href="tasks.html" title="Common tasks"> </head> @@ -25,7 +25,7 @@ <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="bbv2.overview"></a>Overview</h2></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="overview.html#bbv2.overview.concepts">Concepts</a></span></dt> <dt><span class="section"><a href="overview.html#bbv2.overview.jam_language">Boost.Jam Language</a></span></dt> <dt><span class="section"><a href="overview.html#bbv2.overview.configuration">Configuration</a></span></dt> @@ -41,14 +41,14 @@ help system must be used to obtain low-level documentation (see <a class="xref" href="overview.html#bbv2.reference.init.options.help"><code class="option">--help</code></a>). </p> <p> - Boost.Build actually consists of two parts - Boost.Jam, a build engine + Boost.Build has two parts—a build engine with its own interpreted language, and Boost.Build itself, implemented in - Boost.Jam's language. The chain of events when you type + that language. The chain of events when you type <span class="command"><strong>b2</strong></span> on the command line is as follows: </p> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"><p> - The Boost.Build executable tries to find Boost.Build modules and + The Boost.Build executable tries to find Boost.Build modules and loads the top-level module. The exact process is described in <a class="xref" href="reference.html#bbv2.reference.init" title="Initialization">the section called “Initialization”</a> </p></li> <li class="listitem"><p> @@ -74,7 +74,7 @@ So, to be able to successfully use Boost.Build, you need to know only four things: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p> <a class="link" href="overview.html#bbv2.overview.configuration" title="Configuration">How to configure Boost.Build</a> @@ -110,10 +110,10 @@ a.o: a.c </pre> <p> This is a rather low-level description mechanism and it's hard to adjust commands, options, - and sets of created targets depending on the compiler and operating system used. + and sets of created targets depending on the compiler and operating system used. </p> <p> - To improve portability, most modern build system provide a set of higher-level + To improve portability, most modern build system provide a set of higher-level functions that can be used in build description files. Consider this example: </p> <pre class="programlisting"> @@ -125,15 +125,15 @@ add_program ("a", "a.c") different command lines may be used. However, <code class="computeroutput">add_program</code> is higher-level, but rather thin level. All targets are created immediately when the build description is parsed, which makes it impossible to perform multi-variant builds. Often, change - in any build property requires a complete reconfiguration of the build tree. + in any build property requires a complete reconfiguration of the build tree. </p> <p> In order to support true multivariant builds, Boost.Build introduces the concept of a - <a class="indexterm" name="id3994348"></a> - <a class="indexterm" name="id3994361"></a> + <a class="indexterm" name="idp547395600"></a> + <a class="indexterm" name="idp547396960"></a> <em class="firstterm">metatarget</em>—an object that is created when the build description is parsed and can be called later with specific build properties to generate - actual targets. + actual targets. </p> <p> Consider an example: @@ -157,7 +157,7 @@ b2 toolset=gcc toolset=msvc </p> <p> Another key concept is - <a class="indexterm" name="id3994420"></a> + <a class="indexterm" name="idp547403312"></a> <em class="firstterm">build property</em>. A build property is a variable that affects the build process. It can be specified on the command line, and is passed when calling a metatarget. While all build tools have a similar mechanism, @@ -165,9 +165,9 @@ b2 toolset=gcc toolset=msvc and providing a large set of properties with portable semantics. </p> <p> - The final concept is <a class="indexterm" name="id3994442"></a> + The final concept is <a class="indexterm" name="idp547405664"></a> <em class="firstterm">property propagation</em>. Boost.Build does not require that every - metatarget is called with the same properties. Instead, the + metatarget is called with the same properties. Instead, the "top-level" metatargets are called with the properties specified on the command line. Each metatarget can elect to augment or override some properties (in particular, using the requirements mechanism, see <a class="xref" href="overview.html#bbv2.overview.targets.requirements" title="Requirements">the section called “Requirements”</a>). @@ -175,7 +175,7 @@ b2 toolset=gcc toolset=msvc concrete targets that are then used in the build process. Of course, dependency metatargets maybe in turn modify build properties and have dependencies of their own. </p> -<p>For a more in-depth treatment of the requirements and concepts, you may refer +<p>For a more in-depth treatment of the requirements and concepts, you may refer to <a href="http://syrcose.ispras.ru/2009/files/04_paper.pdf" target="_top">SYRCoSE 2009 Boost.Build article</a>. </p> </div> @@ -190,7 +190,7 @@ b2 toolset=gcc toolset=msvc <p> <a class="link" href="../">Boost.Jam</a> has an interpreted, procedural language. On the lowest level, a <a class="link" href="../">Boost.Jam - </a> program consists of variables and <a class="indexterm" name="id3994534"></a> <em class="firstterm">rules</em> (the Jam term for + </a> program consists of variables and <a class="indexterm" name="idp547415056"></a> <em class="firstterm">rules</em> (the Jam term for functions). They are grouped into modules—there is one global module and a number of named modules. Besides that, a <a class="link" href="../">Boost.Jam</a> program contains classes and class instances. @@ -283,7 +283,7 @@ if cond { statements } [ else { statements } ] <p> This is a regular if-statement. The condition is composed of: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p> Literals (true if at least one string is not empty) </p></li> @@ -402,7 +402,7 @@ actions create-file-from-another </pre> <p> In this example, the rule checks if a certain build property is specified. - If so, it sets the variable <code class="varname">OPIONS</code> that is then used + If so, it sets the variable <code class="varname">OPTIONS</code> that is then used inside the action. Note that the variables set "on a target" will be visible only inside actions building that target, not globally. Were they set globally, using variable named <code class="varname">OPTIONS</code> in @@ -416,7 +416,7 @@ actions create-file-from-another <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.overview.configuration"></a>Configuration</h3></div></div></div> <p> - On startup, Boost.Build searches and reads two configuration files: + On startup, Boost.Build searches and reads two configuration files: <code class="filename">site-config.jam</code> and <code class="filename">user-config.jam</code>. The first one is usually installed and maintained by a system administrator, and the second is for the user to modify. You can edit the one in the top-level @@ -425,7 +425,7 @@ actions create-file-from-another are searched. </p> <div class="table"> -<a name="bbv2.reference.init.config"></a><p class="title"><b>Table 39.1. Search paths for configuration files</b></p> +<a name="bbv2.reference.init.config"></a><p class="title"><b>Table 43.1. Search paths for configuration files</b></p> <div class="table-contents"><table class="table" summary="Search paths for configuration files"> <colgroup> <col> @@ -506,7 +506,7 @@ using gcc ; </p> <p>If you have a single compiler, and the compiler executable </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>has its “usual name” and is in the <code class="envar">PATH</code>, or</p></li> <li class="listitem"><p>was installed in a standard “installation @@ -557,7 +557,7 @@ using gcc : 3.2 : g++-3.2 ; Many of toolsets have an <em class="parameter"><code>options</code></em> parameter to fine-tune the configuration. All of Boost.Build's standard compiler toolsets accept four options - <code class="varname">cflags</code>, <code class="varname">cxxflags</code>, + <code class="varname">cflags</code>, <code class="varname">cxxflags</code>, <code class="varname">compileflags</code> and <code class="varname">linkflags</code> as <em class="parameter"><code>options</code></em> specifying flags that will be always passed to the corresponding tools. Values of the <code class="varname">cflags</code> feature are passed directly to the C @@ -588,7 +588,7 @@ using gcc : 3.2 : g++-3.2 ; <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.overview.invocation"></a>Invocation</h3></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="overview.html#bbv2.overview.invocation.examples">Examples</a></span></dt> <dt><span class="section"><a href="overview.html#bbv2.overview.invocation.options">Options</a></span></dt> <dt><span class="section"><a href="overview.html#bbv2.overview.invocation.properties">Properties</a></span></dt> @@ -596,7 +596,7 @@ using gcc : 3.2 : g++-3.2 ; </dl></div> <p>To invoke Boost.Build, type <span class="command"><strong>b2</strong></span> on the command line. Three kinds of command-line tokens are accepted, in any order:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term">options</span></dt> <dd><p>Options start with either one or two dashes. The standard options are listed below, and each project may add additional options</p></dd> @@ -607,7 +607,7 @@ using gcc : 3.2 : g++-3.2 ; <span class="command"><strong><em class="replaceable"><code>feature</code></em>=<em class="replaceable"><code>value</code></em></strong></span> </p></dd> <dt><span class="term">target</span></dt> -<dd><p>All tokens that are neither options nor properties specify +<dd><p>All tokens that are neither options nor properties specify what targets to build. The available targets entirely depend on the project you are building.</p></dd> </dl></div> @@ -641,7 +641,7 @@ b2 toolset=gcc variant=debug optimization=space <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.overview.invocation.options"></a>Options</h4></div></div></div> <p>Boost.Build recognizes the following command line options.</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt> <a name="bbv2.reference.init.options.help"></a><span class="term"><code class="option">--help</code></span> </dt> @@ -672,6 +672,18 @@ b2 toolset=gcc variant=debug optimization=space media, when you can't modify Jamroot. </p> </dd> +<dt><span class="term"><code class="option">--abbreviate-paths</code></span></dt> +<dd><p>Compresses target paths by abbreviating each component. + This option is useful to keep paths from becoming longer than + the filesystem supports. See also <a class="xref" href="reference.html#bbv2.reference.buildprocess.targetpath" title="Target Paths">the section called “Target Paths”</a>. + </p></dd> +<dt><span class="term"><code class="option">--hash</code></span></dt> +<dd><p>Compresses target paths using an MD5 hash. This option is + useful to keep paths from becoming longer than the filesystem + supports. This option produces shorter paths than --abbreviate-paths + does, but at the cost of making them less understandable. + See also <a class="xref" href="reference.html#bbv2.reference.buildprocess.targetpath" title="Target Paths">the section called “Target Paths”</a>. + </p></dd> <dt><span class="term"><code class="option">--version</code></span></dt> <dd><p>Prints information on the Boost.Build and Boost.Jam versions. @@ -695,15 +707,11 @@ b2 toolset=gcc variant=debug optimization=space <dd><p>Produces debug output from the generator search process. Useful for debugging custom generators. </p></dd> -<dt><span class="term"><code class="option">--ignore-config</code></span></dt> -<dd><p>Do not load <code class="literal">site-config.jam</code> or - <code class="literal">user-config.jam</code>. - </p></dd> <dt><span class="term"><code class="option">-d0</code></span></dt> <dd><p>Supress all informational messages.</p></dd> <dt><span class="term"><code class="option">-d <em class="replaceable"><code>N</code></em></code></span></dt> <dd> -<p>Enable cummulative debugging levels from 1 to n. Values are: +<p>Enable cummulative debugging levels from 1 to n. Values are: </p> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem">Show the actions taken for building targets, as they are executed (the default).</li> @@ -742,10 +750,10 @@ b2 toolset=gcc variant=debug optimization=space <p>In the simplest case, the build is performed with a single set of properties, that you specify on the command line with elements in the form <span class="command"><strong><em class="replaceable"><code>feature</code></em>=<em class="replaceable"><code>value</code></em></strong></span>. - The complete list of features can be found in <a class="xref" href="reference.html#bbv2.overview.builtins.features" title="Builtin features">the section called “Builtin features”</a>. + The complete list of features can be found in <a class="xref" href="reference.html#bbv2.overview.builtins.features" title="Builtin features">the section called “Builtin features”</a>. The most common features are summarized below.</p> <div class="table"> -<a name="id3996105"></a><p class="title"><b>Table 39.2. </b></p> +<a name="idp547594672"></a><p class="title"><b>Table 43.2. </b></p> <div class="table-contents"><table class="table"> <colgroup> <col> @@ -823,12 +831,12 @@ b2 toolset=gcc variant=debug optimization=space </div> <br class="table-break"><p>If you have more than one version of a given C++ toolset (e.g. configured in <code class="filename">user-config.jam</code>, or autodetected, as happens with msvc), you can - request the specific version by passing + request the specific version by passing <code class="computeroutput"><em class="replaceable"><code>toolset</code></em>-<em class="replaceable"><code>version</code></em></code> as the value of the <code class="computeroutput">toolset</code> feature, for example <code class="computeroutput">toolset=msvc-8.0</code>. </p> <p> - If a feature has a fixed set of values it can be specified more than + If a feature has a fixed set of values it can be specified more than once on the command line. In which case, everything will be built several times -- once for each specified value of a feature. For example, if you use @@ -837,7 +845,7 @@ b2 toolset=gcc variant=debug optimization=space b2 link=static link=shared threading=single threading=multi </pre> <p> - Then a total of 4 builds will be performed. For convenience, + Then a total of 4 builds will be performed. For convenience, instead of specifying all requested values of a feature in separate command line elements, you can separate the values with commas, for example: </p> @@ -863,12 +871,12 @@ b2 include=static,shared <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.overview.targets"></a>Declaring Targets</h3></div></div></div> -<div class="toc"><dl> -<dt><span class="section"><a href="overview.html#id3996520">Name</a></span></dt> -<dt><span class="section"><a href="overview.html#id3996676">Sources</a></span></dt> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="overview.html#idp547651648">Name</a></span></dt> +<dt><span class="section"><a href="overview.html#idp547657376">Sources</a></span></dt> <dt><span class="section"><a href="overview.html#bbv2.overview.targets.requirements">Requirements</a></span></dt> -<dt><span class="section"><a href="overview.html#id3996995">Default Build</a></span></dt> -<dt><span class="section"><a href="overview.html#id3997023">Additional Information</a></span></dt> +<dt><span class="section"><a href="overview.html#idp547693696">Default Build</a></span></dt> +<dt><span class="section"><a href="overview.html#idp547696512">Additional Information</a></span></dt> </dl></div> <p><a name="bbv2.overview.targets.main"></a> A <em class="firstterm">Main target</em> is a user-defined named @@ -877,9 +885,9 @@ b2 include=static,shared target rules described in <a class="xref" href="reference.html#bbv2.reference.rules" title="Builtin rules">the section called “Builtin rules”</a>. The user can also declare custom main target rules as shown in <a class="xref" href="extender.html#bbv2.extending.rules" title="Main target rules">the section called “Main target rules”</a>. </p> -<a class="indexterm" name="id3996468"></a><p>Most main target rules in Boost.Build have the same common +<a class="indexterm" name="idp547635040"></a><p>Most main target rules in Boost.Build have the same common signature:</p> -<a class="indexterm" name="id3996481"></a><a name="bbv2.main-target-rule-syntax"></a><pre class="programlisting"> +<a class="indexterm" name="idp547636688"></a><a name="bbv2.main-target-rule-syntax"></a><pre class="programlisting"> rule <em class="replaceable"><code>rule-name</code></em> ( main-target-name : sources + : @@ -887,7 +895,7 @@ rule <em class="replaceable"><code>rule-name</code></em> ( default-build * : usage-requirements * ) </pre> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> <em class="parameter"><code>main-target-name</code></em> is the name used to request the target on command line and to use it from @@ -927,7 +935,7 @@ rule <em class="replaceable"><code>rule-name</code></em> ( </p> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3996520"></a>Name</h4></div></div></div> +<a name="idp547651648"></a>Name</h4></div></div></div> <p>The name of main target has two purposes. First, it's used to refer to this target from other targets and from command line. Second, it's used to compute the names of the generated files. Typically, filenames are obtained from main target name by appending system-dependent suffixes and @@ -947,7 +955,7 @@ obj test.debug : test.cpp : <variant>debug ; </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3996676"></a>Sources</h4></div></div></div> +<a name="idp547657376"></a>Sources</h4></div></div></div> <p>The list of sources specifies what should be processed to get the resulting targets. Most of the time, it's just a list of files. Sometimes, you'll want to automatically construct the @@ -994,7 +1002,7 @@ exe c : c.cpp /boost/program_options//program_options ; <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.overview.targets.requirements"></a>Requirements</h4></div></div></div> -<a class="indexterm" name="id3996778"></a><p>Requirements are the properties that should always be present when +<a class="indexterm" name="idp547669088"></a><p>Requirements are the properties that should always be present when building a target. Typically, they are includes and defines: </p> <pre class="programlisting"> @@ -1012,7 +1020,9 @@ obj main : main.cpp : <optimization>off ; </pre> <p> </p> -<p><a name="bbv2.overview.targets.requirements.conditional"></a>Sometimes, particular relationships need to be maintained +<p><a name="bbv2.overview.targets.requirements.conditional"></a> + <a class="indexterm" name="idp547673824"></a> + Sometimes, particular relationships need to be maintained among a target's build properties. This can be achieved with <em class="firstterm">conditional requirements</em>. For example, you might want to set @@ -1022,7 +1032,7 @@ obj main : main.cpp : <optimization>off ; </p> <pre class="programlisting"> lib network : network.cpp - : <span class="bold"><strong><link>shared:<define>NEWORK_LIB_SHARED</strong></span> + : <span class="bold"><strong><link>shared:<define>NETWORK_LIB_SHARED</strong></span> <variant>release:<define>EXTRA_FAST ; </pre> @@ -1030,7 +1040,7 @@ lib network : network.cpp In the example above, whenever <code class="filename">network</code> is built with <code class="computeroutput"><link>shared</code>, - <code class="computeroutput"><define>NEWORK_LIB_SHARED</code> will be in its + <code class="computeroutput"><define>NETWORK_LIB_SHARED</code> will be in its properties, too. </p> <p>You can use several properties in the condition, for example: @@ -1043,6 +1053,7 @@ lib network : network.cpp <p> </p> <p><a name="bbv2.overview.targets.requirements.indirect"></a> + <a class="indexterm" name="idp547683264"></a> A more powerful variant of conditional requirements is <em class="firstterm">indirect conditional requirements</em>. You can provide a rule that will be called with the current build properties and can compute additional properties @@ -1099,7 +1110,7 @@ exe test3 : test3.cpp : -<threading>multi ; </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3996995"></a>Default Build</h4></div></div></div> +<a name="idp547693696"></a>Default Build</h4></div></div></div> <p>The <code class="varname">default-build</code> parameter is a set of properties to be used if the build request does not otherwise specify a value for features in the set. For example: @@ -1116,7 +1127,7 @@ exe hello : hello.cpp : : <threading>multi ; </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3997023"></a>Additional Information</h4></div></div></div> +<a name="idp547696512"></a>Additional Information</h4></div></div></div> <p> The ways a target is built can be so different that describing them using conditional requirements would be @@ -1209,7 +1220,7 @@ project tennis </p> <div class="table"> -<a name="id3997240"></a><p class="title"><b>Table 39.3. </b></p> +<a name="idp547718944"></a><p class="title"><b>Table 43.3. </b></p> <div class="table-contents"><table class="table" summary=""> <colgroup> <col> @@ -1308,10 +1319,10 @@ project tennis <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.overview.build_process"></a>The Build Process</h3></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="overview.html#bbv2.overview.build_request">Build Request</a></span></dt> -<dt><span class="section"><a href="overview.html#id3997557">Building a main target</a></span></dt> -<dt><span class="section"><a href="overview.html#id3997672">Building a Project</a></span></dt> +<dt><span class="section"><a href="overview.html#idp547754864">Building a main target</a></span></dt> +<dt><span class="section"><a href="overview.html#idp547766880">Building a Project</a></span></dt> </dl></div> <p>When you've described your targets, you want Boost.Build to run the right tools and create the needed targets. @@ -1368,7 +1379,7 @@ b2 app1 lib1//lib1 gcc debug optimization=full </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3997557"></a>Building a main target</h4></div></div></div> +<a name="idp547754864"></a>Building a main target</h4></div></div></div> <p>When you request, directly or indirectly, a build of a main target with specific requirements, the following steps are done. Some brief explanation is provided, and more details are given in <a class="xref" href="reference.html#bbv2.reference.buildprocess" title="Build process">the section called “Build process”</a>. @@ -1428,7 +1439,7 @@ b2 app1 lib1//lib1 gcc debug optimization=full </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id3997672"></a>Building a Project</h4></div></div></div> +<a name="idp547766880"></a>Building a Project</h4></div></div></div> <p>Often, a user builds a complete project, not just one main target. In fact, invoking <span class="command"><strong>b2</strong></span> without arguments @@ -1458,7 +1469,7 @@ explicit hello_test ; </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> -<td align="right"><div class="copyright-footer">Copyright © 2006-2009 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. +<td align="right"><div class="copyright-footer">Copyright © 2006-2009, 2014 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> diff --git a/doc/html/bbv2/reference.html b/doc/html/bbv2/reference.html index 3bcb419c9f..dfff8c8bbf 100644 --- a/doc/html/bbv2/reference.html +++ b/doc/html/bbv2/reference.html @@ -3,9 +3,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Reference</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../bbv2.html" title="Chapter 39. Boost.Build V2 User Manual"> +<link rel="up" href="../bbv2.html" title="Chapter 43. Boost.Build V2 User Manual"> <link rel="prev" href="tasks.html" title="Common tasks"> <link rel="next" href="extender.html" title="Extender Manual"> </head> @@ -25,7 +25,7 @@ <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="bbv2.reference"></a>Reference</h2></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="reference.html#bbv2.reference.general">General information</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.rules">Builtin rules</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.overview.builtins.features">Builtin features</a></span></dt> @@ -38,12 +38,13 @@ <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.reference.general"></a>General information</h3></div></div></div> -<div class="toc"><dl><dt><span class="section"><a href="reference.html#bbv2.reference.init">Initialization</a></span></dt></dl></div> +<div class="toc"><dl class="toc"><dt><span class="section"><a href="reference.html#bbv2.reference.init">Initialization</a></span></dt></dl></div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.init"></a>Initialization</h4></div></div></div> -<p>bjam's first job upon startup is to load the Jam code that - implements the build system. To do this, it searches for a file +<p> + Immediately upon starting, the Boost.Build engine (<span class="command"><strong>b2</strong></span>) + loads the Jam code that implements the build system. To do this, it searches for a file called <code class="filename">boost-build.jam</code>, first in the invocation directory, then in its parent and so forth up to the filesystem root, and finally in the directories specified by the environment variable @@ -82,7 +83,7 @@ boost-build build-system ; <p>This section contains the list of all rules that can be used in Jamfile—both rules that define new targets and auxiliary rules.</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">exe</code></span></dt> <dd><p>Creates an executable file. See <a class="xref" href="tasks.html#bbv2.tasks.programs" title="Programs">the section called “Programs”</a>.</p></dd> @@ -103,6 +104,30 @@ boost-build build-system ; </dt> <dd><p>Specialized rules for testing. See <a class="xref" href="tasks.html#bbv2.builtins.testing" title="Testing">the section called “Testing”</a>.</p></dd> +<dt> +<a name="bbv2.reference.check-target-builds"></a><span class="term"><code class="literal">check-target-builds</code></span> +</dt> +<dd> +<p>The <code class="literal">check-target-builds</code> allows you + to conditionally use different properties depending on whether some + metatarget builds, or not. This is similar to functionality of configure + script in autotools projects. The function signature is: + </p> +<pre class="programlisting"> +rule check-target-builds ( target message ? : true-properties * : false-properties * ) + </pre> +<p>This function can only be used when passing requirements or usage + requirements to a metatarget rule. For example, to make an application link + to a library if it's avavailable, one has use the following:</p> +<pre class="programlisting"> +exe app : app.cpp : [ check-target-builds has_foo "System has foo" : <library>foo : <define>FOO_MISSING=1 ] ; + </pre> +<p>For another example, the alias rule can be used to consolidate configuraiton + choices and make them available to other metatargets, like so:</p> +<pre class="programlisting"> +alias foobar : : : : [ check-target-builds has_foo "System has foo" : <library>foo : <library>bar ] ; + </pre> +</dd> <dt><span class="term"><code class="literal">obj</code></span></dt> <dd><p>Creates an object file. Useful when a single source file must be compiled with special properties.</p></dd> @@ -234,7 +259,7 @@ path-constant DATA : data/a.txt ; <p>This section documents the features that are built-in into Boost.Build. For features with a fixed set of values, that set is provided, with the default value listed first.</p> -<a class="indexterm" name="id4000384"></a><div class="variablelist"><dl> +<a class="indexterm" name="idp548093776"></a><div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">variant</code></span></dt> <dd> <p> @@ -418,7 +443,7 @@ path-constant DATA : data/a.txt ; <dd> The <code class="computeroutput"><warnings></code> feature controls the warning level of compilers. It has the following values: - <div class="itemizedlist"><ul class="itemizedlist" type="disc"> + <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p><code class="computeroutput">off</code> - disables all warnings.</p></li> <li class="listitem"><p><code class="computeroutput">on</code> - enables default warning level for the tool.</p></li> <li class="listitem"><p><code class="computeroutput">all</code> - enables all warnings.</p></li> @@ -443,7 +468,7 @@ path-constant DATA : data/a.txt ; target in configurations where the build is known to fail. </p> </dd> -<dt><span class="term"><code class="literal">tag</code></span></dt> +<dt><span class="term"><a name="bbv2.builtin.features.tag"></a><code class="literal">tag</code></span></dt> <dd> <p>The <code class="literal">tag</code> feature is used to customize the name of the generated files. The value should have the form: @@ -478,6 +503,17 @@ path-constant DATA : data/a.txt ; specified by the user. The most common usage is to build release variant with debugging information.</p> </dd> +<dt><span class="term"><code class="literal">runtime-debugging</code></span></dt> +<dd> +<p><span class="bold"><strong>Allowed values:</strong></span> <code class="literal">on</code>, <code class="literal">off</code>.</p> +<p>The <code class="literal">runtime-debugging</code> feature specifies if + produced object files, executables and libraries should include + behaviour useful only for debugging, such as asserts. + Typically, the value of this feature is implicitly set by the + <code class="literal">variant</code> feature, but it can be explicitly + specified by the user. The most common usage is to build + release variant with debugging output.</p> +</dd> <dt><span class="term"><code class="literal">target-os</code></span></dt> <dd> <a name="bbv2.reference.features.target-os"></a><p> @@ -539,7 +575,7 @@ path-constant DATA : data/a.txt ; </p> <p> <span class="bold"><strong>Note:</strong></span> Due to some internal details - in the current Boost Build implementation it is not possible to have + in the current Boost.Build implementation it is not possible to have features whose valid values are all positive integer. As a workaround a large set of allowed values has been defined for this feature and, if a different one is needed, user can easily add it by @@ -548,7 +584,7 @@ path-constant DATA : data/a.txt ; </dd> <dt><span class="term"><code class="literal">embed-manifest</code></span></dt> <dd> -<a class="indexterm" name="id4001621"></a><a class="indexterm" name="id4001630"></a><p> +<a class="indexterm" name="idp548240592"></a><a class="indexterm" name="idp548241696"></a><p> <span class="bold"><strong>Allowed values:</strong></span> on, off. </p> <p>This feature is specific to the msvc toolset (see @@ -559,15 +595,25 @@ path-constant DATA : data/a.txt ; under <span class="guimenu">Configuration Properties</span> → <span class="guisubmenu">Manifest Tool</span> → <span class="guisubmenu">Input and Output</span> → <span class="guimenuitem">Embed manifest</span>. </p> </dd> +<dt><span class="term"><code class="literal">embed-manifest-file</code></span></dt> +<dd> +<a class="indexterm" name="idp548249872"></a><a class="indexterm" name="idp548250976"></a><p>This feature is specific to the msvc toolset (see + <a class="xref" href="reference.html#bbv2.reference.tools.compiler.msvc" title="Microsoft Visual C++">the section called “Microsoft Visual C++”</a>), + and controls which manifest files should be embedded inside + executables and shared libraries. This + feature corresponds to the IDE option found in the project settings dialog, + under <span class="guimenu">Configuration Properties</span> → <span class="guisubmenu">Manifest Tool</span> → <span class="guisubmenu">Input and Output</span> → <span class="guimenuitem">Additional Manifest Files</span>. + </p> +</dd> </dl></div> </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.reference.tools"></a>Builtin tools</h3></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="reference.html#bbv2.reference.tools.compilers">C++ Compilers</a></span></dt> -<dt><span class="section"><a href="reference.html#id4004575">Third-party libraries</a></span></dt> -<dt><span class="section"><a href="reference.html#id4004688">Documentation tools</a></span></dt> +<dt><span class="section"><a href="reference.html#idp548567088">Third-party libraries</a></span></dt> +<dt><span class="section"><a href="reference.html#idp548603088">Documentation tools</a></span></dt> </dl></div> <p>Boost.Build comes with support for a large number of C++ compilers, and other tools. This section documents how to use those tools.</p> @@ -587,7 +633,7 @@ using gcc : 4.0 : g++-4.0 ; <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.tools.compilers"></a>C++ Compilers</h4></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.gcc">GNU C++</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.darwin">Apple Darwin gcc</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.tools.compiler.msvc">Microsoft Visual C++</a></span></dt> @@ -627,7 +673,7 @@ using gcc : [<span class="optional"><em class="replaceable"><code>version</code> option. If the command is not specified, the <span class="command"><strong>g++</strong></span> binary will be searched in <code class="envar">PATH</code>.</p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">cflags</code></span></dt> <dd><p>Specifies additional compiler flags that will be used when compiling C sources.</p></dd> @@ -656,7 +702,7 @@ using gcc : [<span class="optional"><em class="replaceable"><code>version</code> be either <code class="computeroutput">windres</code> for msvc resource compiler, or <code class="computeroutput">rc</code> for borland's resource compiler.</p></dd> </dl></div> -<a class="indexterm" name="id4002312"></a> +<a class="indexterm" name="idp548295680"></a> In order to compile 64-bit applications, you have to specify <code class="computeroutput">address-model=64</code>, and the <code class="computeroutput">instruction-set</code> @@ -673,7 +719,7 @@ using gcc : [<span class="optional"><em class="replaceable"><code>version</code> to that of the gcc module. </p> <p> - <a class="indexterm" name="id4002383"></a> + <a class="indexterm" name="idp548304144"></a> The darwin toolset can generate so called "fat" binaries—binaries that can run support more than one architecture, or address mode. To build a binary that can run both @@ -691,7 +737,7 @@ using gcc : [<span class="optional"><em class="replaceable"><code>version</code> <a href="http://msdn.microsoft.com/visualc/" target="_top">Microsoft Visual C++</a> command-line tools on Microsoft Windows. The supported products and versions of command line tools are listed below:</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>Visual Studio 2010—10.0</p></li> <li class="listitem"><p>Visual Studio 2008—9.0</p></li> <li class="listitem"><p>Visual Studio 2005—8.0</p></li> @@ -715,7 +761,7 @@ using msvc : [<span class="optional"><em class="replaceable"><code>version</code <p>The compiler command should be specified using forward slashes, and quoted.</p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">cflags</code></span></dt> <dd><p>Specifies additional compiler flags that will be used when compiling C sources.</p></dd> @@ -783,14 +829,14 @@ using msvc : [<span class="optional"><em class="replaceable"><code>version</code <div class="section"> <div class="titlepage"><div><div><h6 class="title"> <a name="v2.reference.tools.compiler.msvc.64"></a>64-bit support</h6></div></div></div> -<a class="indexterm" name="id4002860"></a><p>Starting with version 8.0, Microsoft Visual Studio can +<a class="indexterm" name="idp548359120"></a><p>Starting with version 8.0, Microsoft Visual Studio can generate binaries for 64-bit processor, both 64-bit flavours of x86 (codenamed AMD64/EM64T), and Itanium (codenamed IA64). In addition, compilers that are itself run in 64-bit mode, for better performance, are provided. The complete list of compiler configurations are as follows (we abbreviate AMD64/EM64T to just AMD64):</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>32-bit x86 host, 32-bit x86 target</p></li> <li class="listitem"><p>32-bit x86 host, 64-bit AMD64 target</p></li> <li class="listitem"><p>32-bit x86 host, 64-bit IA64 target</p></li> @@ -827,6 +873,42 @@ using msvc : [<span class="optional"><em class="replaceable"><code>version</code options depending on the value of the<code class="computeroutput">instruction-set</code> feature.</p> </div> +<div class="section"> +<div class="titlepage"><div><div><h6 class="title"> +<a name="v2.reference.tools.compiler.msvc.winrt"></a>Windows Runtime support</h6></div></div></div> +<a class="indexterm" name="idp548375696"></a><p> + Starting with version 11.0, Microsoft Visual Studio can + produce binaries for Windows Store and Phone in addition to + traditional Win32 desktop. To specify which Windows API set + to target, use the <code class="literal">windows-api</code> feature. + Available options are <code class="literal">desktop</code>, + <code class="literal">store</code>, or <code class="literal">phone</code>. If not + specified, <code class="literal">desktop</code> will be used. + </p> +<p> + When using <code class="literal">store</code> or <code class="literal">phone</code> + the specified toolset determines what Windows version is + targeted. The following options are available: + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"><p>Windows 8.0: toolset=msvc-11.0 windows-api=store</p></li> +<li class="listitem"><p>Windows 8.1: toolset=msvc-12.0 windows-api=store</p></li> +<li class="listitem"><p>Windows Phone 8.0: toolset=msvc-11.0 windows-api=phone</p></li> +<li class="listitem"><p>Windows Phone 8.1: toolset=msvc-12.0 windows-api=phone</p></li> +</ul></div> +<p> + For example use the following to build for Windows Store 8.1 + with the ARM architecture: + </p> +<pre class="programlisting"> +.\b2 toolset=msvc=12.0 windows-api=store architecture=arm</pre> +<p> + Note that when targeting Windows Phone 8.1, version 12.0 didn't + include the vcvars phone setup scripts. They can be separately + downloaded from + <a href="http://blogs.msdn.com/b/vcblog/archive/2014/07/18/using-boost-libraries-in-windows-store-and-phone-applications.aspx" target="_top">here</a>. + </p> +</div> </div> <div class="section"> <div class="titlepage"><div><div><h5 class="title"> @@ -849,7 +931,7 @@ using intel-win : [<span class="optional"><em class="replaceable"><code>version< (on Linux), or <span class="command"><strong>icc.exe</strong></span> (on Windows). </p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">cflags</code></span></dt> <dd><p>Specifies additional compiler flags that will be used when compiling C sources.</p></dd> @@ -864,7 +946,7 @@ using intel-win : [<span class="optional"><em class="replaceable"><code>version< passed to the linker.</p></dd> </dl></div> <p>The Linux version supports the following additional options:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">root</code></span></dt> <dd><p>Specifies root directory of the compiler installation. This option is necessary only if it is not possible to detect this @@ -887,7 +969,7 @@ using acc : [<span class="optional"><em class="replaceable"><code>version</code> If the command is not specified, the <span class="command"><strong>aCC</strong></span> binary will be searched in <code class="envar">PATH</code>.</p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">cflags</code></span></dt> <dd><p>Specifies additional compiler flags that will be used when compiling C sources.</p></dd> @@ -911,7 +993,7 @@ using acc : [<span class="optional"><em class="replaceable"><code>version</code> product and earlier version of it, running on Microsoft Windows.</p> <p>The supported products are listed below. The version reported by the command lines tools is also listed for reference.:</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>C++ Builder 2006—5.8.2</p></li> <li class="listitem"><p>CBuilderX—5.6.5, 5.6.4 (depending on release)</p></li> <li class="listitem"><p>CBuilder6—5.6.4</p></li> @@ -924,7 +1006,7 @@ using borland : [<span class="optional"><em class="replaceable"><code>version</c <p>If the command is not specified, Boost.Build will search for a binary named <span class="command"><strong>bcc32</strong></span> in <code class="envar">PATH</code>.</p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">cflags</code></span></dt> <dd><p>Specifies additional compiler flags that will be used when compiling C sources.</p></dd> @@ -954,7 +1036,7 @@ using como-linux : [<span class="optional"><em class="replaceable"><code>version a binary named <span class="command"><strong>como</strong></span> in <code class="envar">PATH</code>.</p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">cflags</code></span></dt> <dd><p>Specifies additional compiler flags that will be used when compiling C sources.</p></dd> @@ -991,7 +1073,7 @@ using cw : [<span class="optional"><em class="replaceable"><code>version</code>< binary named <span class="command"><strong>mwcc</strong></span> in default installation paths and in <code class="envar">PATH</code>.</p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">cflags</code></span></dt> <dd><p>Specifies additional compiler flags that will be used when compiling C sources.</p></dd> @@ -1041,7 +1123,7 @@ using dmc : [<span class="optional"><em class="replaceable"><code>version</code> a binary named <span class="command"><strong>dmc</strong></span> in <code class="envar">PATH</code>.</p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">cflags</code></span></dt> <dd><p>Specifies additional compiler flags that will be used when compiling C sources.</p></dd> @@ -1069,7 +1151,7 @@ using hp_cxx : [<span class="optional"><em class="replaceable"><code>version</co <p>If the command is not specified, Boost.Build will search for a binary named <span class="command"><strong>hp_cxx</strong></span> in <code class="envar">PATH</code>.</p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">cflags</code></span></dt> <dd><p>Specifies additional compiler flags that will be used when compiling C sources.</p></dd> @@ -1109,7 +1191,7 @@ using sun : [<span class="optional"><em class="replaceable"><code>version</code> <p> See the <a href="http://blogs.sun.com/sga/entry/command_line_options" target="_top"> Sun C++ Frontend Tales</a> for details.</p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">cflags</code></span></dt> <dd><p>Specifies additional compiler flags that will be used when compiling C sources.</p></dd> @@ -1123,7 +1205,7 @@ using sun : [<span class="optional"><em class="replaceable"><code>version</code> <dd><p>Specifies additional command line options that will be passed to the linker.</p></dd> </dl></div> -<a class="indexterm" name="id4004493"></a> +<a class="indexterm" name="idp548557872"></a> Starting with Sun Studio 12, you can create 64-bit applications by using the <code class="computeroutput">address-model=64</code> property. @@ -1148,14 +1230,17 @@ using vacpp ;</pre> </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id4004575"></a>Third-party libraries</h4></div></div></div> -<div class="toc"><dl><dt><span class="section"><a href="reference.html#bbv2.reference.tools.libraries.stlport">STLport library</a></span></dt></dl></div> +<a name="idp548567088"></a>Third-party libraries</h4></div></div></div> +<div class="toc"><dl class="toc"> +<dt><span class="section"><a href="reference.html#bbv2.reference.tools.libraries.stlport">STLport library</a></span></dt> +<dt><span class="section"><a href="reference.html#bbv2.reference.tools.libraries.zlib">zlib</a></span></dt> +</dl></div> <p>Boost.Build provides special support for some third-party C++ libraries, documented below.</p> <div class="section"> <div class="titlepage"><div><div><h5 class="title"> <a name="bbv2.reference.tools.libraries.stlport"></a>STLport library</h5></div></div></div> -<a class="indexterm" name="id4004597"></a><p>The <a href="http://stlport.org" target="_top">STLport</a> library +<a class="indexterm" name="idp548569424"></a><p>The <a href="http://stlport.org" target="_top">STLport</a> library is an alternative implementation of C++ runtime library. Boost.Build supports using that library on Windows platfrom. Linux is hampered by different naming of libraries in each STLport @@ -1181,11 +1266,61 @@ using stlport : [<span class="optional"><em class="replaceable"><code>version</c requesting <code class="literal">stdlib=stlport</code> on the command line. </p> </div> +<div class="section"> +<div class="titlepage"><div><div><h5 class="title"> +<a name="bbv2.reference.tools.libraries.zlib"></a>zlib</h5></div></div></div> +<a class="indexterm" name="idp548580384"></a><p>Provides support for the + <a href="http://www.zlib.net" target="_top">zlib</a> library. zlib + can be configured either to use precompiled binaries or to + build the library from source.</p> +<p>zlib can be initialized using the following syntax</p> +<pre class="programlisting"> +using zlib : [<span class="optional"><em class="replaceable"><code>version</code></em></span>] : [<span class="optional"><em class="replaceable"><code>options</code></em></span>] : [<span class="optional"><em class="replaceable"><code>condition</code></em></span>] : [<span class="optional"><em class="replaceable"><code>is-default</code></em></span>] ; + </pre> +<p>Options for using a prebuilt library:</p> +<div class="variablelist"><dl class="variablelist"> +<dt><span class="term"><code class="literal">search</code></span></dt> +<dd><p>The directory containing the zlib binaries.</p></dd> +<dt><span class="term"><code class="literal">name</code></span></dt> +<dd><p>Overrides the default library name.</p></dd> +<dt><span class="term"><code class="literal">include</code></span></dt> +<dd><p>The directory containing the zlib headers.</p></dd> +</dl></div> +<p>If none of these options is specified, then the environmental + variables ZLIB_LIBRARY_PATH, ZLIB_NAME, and ZLIB_INCLUDE will be + used instead.</p> +<p>Options for building zlib from source:</p> +<div class="variablelist"><dl class="variablelist"> +<dt><span class="term"><code class="literal">source</code></span></dt> +<dd><p>The zlib source directory. Defaults to the + environmental variable ZLIB_SOURCE.</p></dd> +<dt><span class="term"><code class="literal">tag</code></span></dt> +<dd><p>Sets the <a class="link" href="reference.html#bbv2.builtin.features.tag">tag</a> + property to adjust the file name of the library. Ignored + when using precompiled binaries.</p></dd> +<dt><span class="term"><code class="literal">build-name</code></span></dt> +<dd><p>The base name to use for the compiled library. + Ignored when using precompiled binaries.</p></dd> +</dl></div> +<p>Examples:</p> +<pre class="programlisting"> +# Find zlib in the default system location +using zlib ; +# Build zlib from source +using zlib : 1.2.7 : <source>/home/steven/zlib-1.2.7 ; +# Find zlib in /usr/local +using zlib : 1.2.7 : <include>/usr/local/include <search>/usr/local/lib ; +# Build zlib from source for msvc and find +# prebuilt binaries for gcc. +using zlib : 1.2.7 : <source>C:/Devel/src/zlib-1.2.7 : <toolset>msvc ; +using zlib : 1.2.7 : : <toolset>gcc ; +</pre> +</div> </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> -<a name="id4004688"></a>Documentation tools</h4></div></div></div> -<div class="toc"><dl> +<a name="idp548603088"></a>Documentation tools</h4></div></div></div> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="reference.html#bbv2.reference.tools.doc.xsltproc">xsltproc</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.tools.doc.boostbook">boostbook</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.tools.doc.doxygen">doxygen</a></span></dt> @@ -1198,7 +1333,7 @@ using stlport : [<span class="optional"><em class="replaceable"><code>version</c <div class="section"> <div class="titlepage"><div><div><h5 class="title"> <a name="bbv2.reference.tools.doc.xsltproc"></a>xsltproc</h5></div></div></div> -<a class="indexterm" name="id4004709"></a><p>To use xsltproc, you first need to configure it using the following syntax:</p> +<a class="indexterm" name="idp548605440"></a><p>To use xsltproc, you first need to configure it using the following syntax:</p> <pre class="programlisting"> using xsltproc : [<span class="optional"><em class="replaceable"><code>xsltproc</code></em></span>] ; </pre> @@ -1209,7 +1344,7 @@ using xsltproc : [<span class="optional"><em class="replaceable"><code>xsltproc< Otherwise, xsltproc will be searched for in PATH. </p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">xsl:param</code></span></dt> <dd><p>Values should have the form <em class="replaceable"><code>name</code></em>=<em class="replaceable"><code>value</code></em></p></dd> @@ -1222,7 +1357,7 @@ using xsltproc : [<span class="optional"><em class="replaceable"><code>xsltproc< these operate on jam targets and are intended to be used by another toolset, such as boostbook, rather than directly by users. </p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">xslt</code></span></dt> <dd> <pre class="programlisting"> @@ -1246,7 +1381,7 @@ rule xslt-dir ( target : source stylesheet : properties * : dirname ) <div class="section"> <div class="titlepage"><div><div><h5 class="title"> <a name="bbv2.reference.tools.doc.boostbook"></a>boostbook</h5></div></div></div> -<a class="indexterm" name="id4004934"></a><p>To use boostbook, you first need to configure it using the following syntax:</p> +<a class="indexterm" name="idp548631440"></a><p>To use boostbook, you first need to configure it using the following syntax:</p> <pre class="programlisting"> using boostbook : [<span class="optional"><em class="replaceable"><code>docbook-xsl-dir</code></em></span>] : [<span class="optional"><em class="replaceable"><code>docbook-dtd-dir</code></em></span>] : [<span class="optional"><em class="replaceable"><code>boostbook-dir</code></em></span>] ; </pre> @@ -1270,7 +1405,7 @@ using boostbook : [<span class="optional"><em class="replaceable"><code>docbook- it also depends on fop. </p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">format</code></span></dt> <dd> <p> @@ -1287,7 +1422,7 @@ using boostbook : [<span class="optional"><em class="replaceable"><code>docbook- </dl></div> <p>The boostbook module defines a rule for creating a target following the common syntax.</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">boostbook</code></span></dt> <dd> <pre class="programlisting"> @@ -1300,7 +1435,7 @@ rule boostbook ( target-name : sources * : requirements * : default-build * ) <div class="section"> <div class="titlepage"><div><div><h5 class="title"> <a name="bbv2.reference.tools.doc.doxygen"></a>doxygen</h5></div></div></div> -<a class="indexterm" name="id4005236"></a><p>To use doxygen, you first need to configure it using the following syntax:</p> +<a class="indexterm" name="idp548666912"></a><p>To use doxygen, you first need to configure it using the following syntax:</p> <pre class="programlisting"> using doxygen : [<span class="optional"><em class="replaceable"><code>name</code></em></span>] ; </pre> @@ -1312,7 +1447,7 @@ using doxygen : [<span class="optional"><em class="replaceable"><code>name</code generating BoostBook XML. </p> <p>The following options can be provided, using <code class="literal"><<em class="replaceable"><code>option-name</code></em>><em class="replaceable"><code>option-value</code></em></code> syntax:</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">doxygen:param</code></span></dt> <dd><p>All the values of <code class="literal">doxygen:param</code> are added to the doxyfile.</p></dd> @@ -1343,7 +1478,7 @@ using doxygen : [<span class="optional"><em class="replaceable"><code>name</code </dl></div> <p>The doxygen module defines a rule for creating a target following the common syntax.</p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">doxygen</code></span></dt> <dd> <pre class="programlisting"> @@ -1359,7 +1494,7 @@ rule doxygen ( target : sources * : requirements * : default-build * : usage-req <div class="section"> <div class="titlepage"><div><div><h5 class="title"> <a name="bbv2.reference.tools.doc.quickbook"></a>quickbook</h5></div></div></div> -<a class="indexterm" name="id4005460"></a><p>The quickbook module provides a generator to convert from +<a class="indexterm" name="idp548692480"></a><p>The quickbook module provides a generator to convert from Quickbook to BoostBook XML.</p> <p>To use quickbook, you first need to configure it using the following syntax:</p> <pre class="programlisting"> @@ -1375,7 +1510,7 @@ using quickbook : [<span class="optional"><em class="replaceable"><code>command< <div class="section"> <div class="titlepage"><div><div><h5 class="title"> <a name="bbv2.reference.tools.doc.fop"></a>fop</h5></div></div></div> -<a class="indexterm" name="id4005507"></a><p>The fop module provides generators to convert from +<a class="indexterm" name="idp548697824"></a><p>The fop module provides generators to convert from XSL formatting objects to Postscript and PDF.</p> <p>To use fop, you first need to configure it using the following syntax:</p> <pre class="programlisting"> @@ -1397,9 +1532,11 @@ using fop : [<span class="optional"><em class="replaceable"><code>fop-command</c <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.reference.modules"></a>Builtin modules</h3></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="reference.html#bbv2.reference.modules.modules">modules</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.modules.path">path</a></span></dt> +<dt><span class="section"><a href="reference.html#bbv2.reference.modules.regex">regex</a></span></dt> +<dt><span class="section"><a href="reference.html#bbv2.reference.modules.sequence">sequence</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.modules.type">type</a></span></dt> </dl></div> <p> @@ -1410,7 +1547,7 @@ using fop : [<span class="optional"><em class="replaceable"><code>fop-command</c <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.modules.modules"></a>modules</h4></div></div></div> -<a class="indexterm" name="id4005594"></a><p> +<a class="indexterm" name="idp548707552"></a><p> The <code class="computeroutput">modules</code> module defines basic functionality for handling modules. </p> @@ -1460,7 +1597,7 @@ using fop : [<span class="optional"><em class="replaceable"><code>fop-command</c </p> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"> -<a name="bbv2.reference.modules.modules.binding"></a><a class="indexterm" name="id4005686"></a><code class="computeroutput"><span class="keyword">rule</span> binding <span class="special">(</span> module-name <span class="special">)</span></code><p>Returns the filesystem binding of the given module.</p> +<a name="bbv2.reference.modules.modules.binding"></a><a class="indexterm" name="idp548717376"></a><code class="computeroutput"><span class="keyword">rule</span> binding <span class="special">(</span> module-name <span class="special">)</span></code><p>Returns the filesystem binding of the given module.</p> <p>For example, a module can get its own location with: </p> <pre class="programlisting">me <span class="special">=</span> <span class="special">[</span> modules.binding $(__name__) <span class="special">]</span> <span class="special">;</span></pre> @@ -1468,7 +1605,7 @@ using fop : [<span class="optional"><em class="replaceable"><code>fop-command</c </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.modules.poke"></a><a class="indexterm" name="id4005761"></a><code class="computeroutput"><span class="keyword">rule</span> poke <span class="special">(</span> module-name ? <span class="special">:</span> variables + <span class="special">:</span> value * <span class="special">)</span></code><p>Sets the module-local value of a variable.</p> +<a name="bbv2.reference.modules.modules.poke"></a><a class="indexterm" name="idp548726192"></a><code class="computeroutput"><span class="keyword">rule</span> poke <span class="special">(</span> module-name ? <span class="special">:</span> variables + <span class="special">:</span> value * <span class="special">)</span></code><p>Sets the module-local value of a variable.</p> <p>For example, to set a variable in the global module: </p> <pre class="programlisting">modules.poke <span class="special">:</span> ZLIB_INCLUDE <span class="special">:</span> /usr/local/include <span class="special">;</span></pre> @@ -1476,7 +1613,7 @@ using fop : [<span class="optional"><em class="replaceable"><code>fop-command</c </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.modules.peek"></a><a class="indexterm" name="id4005842"></a><code class="computeroutput"><span class="keyword">rule</span> peek <span class="special">(</span> module-name ? <span class="special">:</span> variables + <span class="special">)</span></code><p>Returns the module-local value of a variable.</p> +<a name="bbv2.reference.modules.modules.peek"></a><a class="indexterm" name="idp548735728"></a><code class="computeroutput"><span class="keyword">rule</span> peek <span class="special">(</span> module-name ? <span class="special">:</span> variables + <span class="special">)</span></code><p>Returns the module-local value of a variable.</p> <p> For example, to read a variable from the global module: </p> @@ -1485,7 +1622,7 @@ using fop : [<span class="optional"><em class="replaceable"><code>fop-command</c </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.modules.call-in"></a><a class="indexterm" name="id4005932"></a><code class="computeroutput"><span class="keyword">rule</span> call-in <span class="special">(</span> module-name ? <span class="special">:</span> rule-name args * <span class="special">:</span> * <span class="special">)</span> </code><p>Call the given rule locally in the given module. Use +<a name="bbv2.reference.modules.modules.call-in"></a><a class="indexterm" name="idp548746480"></a><code class="computeroutput"><span class="keyword">rule</span> call-in <span class="special">(</span> module-name ? <span class="special">:</span> rule-name args * <span class="special">:</span> * <span class="special">)</span> </code><p>Call the given rule locally in the given module. Use this for rules accepting rule names as arguments, so that the passed rule may be invoked in the context of the rule's caller (for example, if the rule accesses module globals or @@ -1520,23 +1657,23 @@ using fop : [<span class="optional"><em class="replaceable"><code>fop-command</c </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.modules.load"></a><a class="indexterm" name="id4006156"></a><code class="computeroutput"><span class="keyword">rule</span> load <span class="special">(</span> module-name <span class="special">:</span> filename ? <span class="special">:</span> search * <span class="special">)</span></code><p>Load the indicated module if it is not already loaded.</p> -<div class="variablelist"><dl> +<a name="bbv2.reference.modules.modules.load"></a><a class="indexterm" name="idp548773152"></a><code class="computeroutput"><span class="keyword">rule</span> load <span class="special">(</span> module-name <span class="special">:</span> filename ? <span class="special">:</span> search * <span class="special">)</span></code><p>Load the indicated module if it is not already loaded.</p> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">module-name</code></span></dt> <dd><p>Name of module to load.</p></dd> </dl></div> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">filename</code></span></dt> <dd><p>(partial) path to file; Defaults to <code class="computeroutput">$(module-name).jam</code></p></dd> </dl></div> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">search</code></span></dt> <dd><p>Directories in which to search for filename. Defaults to <code class="computeroutput">$(BOOST_BUILD_PATH)</code>.</p></dd> </dl></div> </li> <li class="listitem"> -<a name="bbv2.reference.modules.modules.import"></a><a class="indexterm" name="id4006277"></a><code class="computeroutput"><span class="keyword">rule</span> import <span class="special">(</span> module-names + <span class="special">:</span> rules-opt * <span class="special">:</span> rename-opt * <span class="special">)</span></code><p>Load the indicated module and import rule names into the +<a name="bbv2.reference.modules.modules.import"></a><a class="indexterm" name="idp548787344"></a><code class="computeroutput"><span class="keyword">rule</span> import <span class="special">(</span> module-names + <span class="special">:</span> rules-opt * <span class="special">:</span> rename-opt * <span class="special">)</span></code><p>Load the indicated module and import rule names into the current module. Any members of <code class="computeroutput">rules-opt</code> will be available without qualification in the caller's module. Any members of <code class="computeroutput">rename-opt</code> will be taken as the names @@ -1565,7 +1702,7 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.modules.clone-rules"></a><a class="indexterm" name="id4006435"></a><code class="computeroutput"><span class="keyword">rule</span> clone-rules <span class="special">(</span> source-module target-module <span class="special">)</span></code><p>Define exported copies in <code class="computeroutput">$(target-module)</code> +<a name="bbv2.reference.modules.modules.clone-rules"></a><a class="indexterm" name="idp548805760"></a><code class="computeroutput"><span class="keyword">rule</span> clone-rules <span class="special">(</span> source-module target-module <span class="special">)</span></code><p>Define exported copies in <code class="computeroutput">$(target-module)</code> of all rules exported from <code class="computeroutput">$(source-module)</code>. Also make them available in the global module with qualification, so that it is just as though the rules were defined originally @@ -1576,12 +1713,12 @@ import path <span class="special">:</span> native make <span class="special">:</ <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.modules.path"></a>path</h4></div></div></div> -<a class="indexterm" name="id4006505"></a><p> +<a class="indexterm" name="idp548813904"></a><p> Performs various path manipulations. Paths are always in a 'normalized' representation. In it, a path may be either: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p><code class="computeroutput">'.'</code>, or</p></li> <li class="listitem"><p> <code class="computeroutput">['/'] [ ( '..' '/' )* (token '/')* token ]</code> @@ -1595,25 +1732,25 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"> -<a name="bbv2.reference.modules.path.make"></a><a class="indexterm" name="id4006567"></a><code class="computeroutput"><span class="keyword">rule</span> make <span class="special">(</span> native <span class="special">)</span></code><p>Converts the native path into normalized form.</p> +<a name="bbv2.reference.modules.path.make"></a><a class="indexterm" name="idp548821264"></a><code class="computeroutput"><span class="keyword">rule</span> make <span class="special">(</span> native <span class="special">)</span></code><p>Converts the native path into normalized form.</p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.native"></a><a class="indexterm" name="id4006617"></a><code class="computeroutput"><span class="keyword">rule</span> native <span class="special">(</span> path <span class="special">)</span></code><p>Builds the native representation of the path.</p> +<a name="bbv2.reference.modules.path.native"></a><a class="indexterm" name="idp548827040"></a><code class="computeroutput"><span class="keyword">rule</span> native <span class="special">(</span> path <span class="special">)</span></code><p>Builds the native representation of the path.</p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.is-rooted"></a><a class="indexterm" name="id4006662"></a><code class="computeroutput"><span class="keyword">rule</span> is-rooted <span class="special">(</span> path <span class="special">)</span></code><p>Tests if a path is rooted.</p> +<a name="bbv2.reference.modules.path.is-rooted"></a><a class="indexterm" name="idp548832336"></a><code class="computeroutput"><span class="keyword">rule</span> is-rooted <span class="special">(</span> path <span class="special">)</span></code><p>Tests if a path is rooted.</p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.has-parent"></a><a class="indexterm" name="id4006709"></a><code class="computeroutput"><span class="keyword">rule</span> has-parent <span class="special">(</span> path <span class="special">)</span></code><p>Tests if a path has a parent.</p> +<a name="bbv2.reference.modules.path.has-parent"></a><a class="indexterm" name="idp548837744"></a><code class="computeroutput"><span class="keyword">rule</span> has-parent <span class="special">(</span> path <span class="special">)</span></code><p>Tests if a path has a parent.</p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.basename"></a><a class="indexterm" name="id4006754"></a><code class="computeroutput"><span class="keyword">rule</span> basename <span class="special">(</span> path <span class="special">)</span></code><p>Returns the path without any directory components.</p> +<a name="bbv2.reference.modules.path.basename"></a><a class="indexterm" name="idp548843152"></a><code class="computeroutput"><span class="keyword">rule</span> basename <span class="special">(</span> path <span class="special">)</span></code><p>Returns the path without any directory components.</p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.parent"></a><a class="indexterm" name="id4006800"></a><code class="computeroutput"><span class="keyword">rule</span> parent <span class="special">(</span> path <span class="special">)</span></code><p>Returns the parent directory of the path. If no parent exists, an error is issued.</p> +<a name="bbv2.reference.modules.path.parent"></a><a class="indexterm" name="idp548848512"></a><code class="computeroutput"><span class="keyword">rule</span> parent <span class="special">(</span> path <span class="special">)</span></code><p>Returns the parent directory of the path. If no parent exists, an error is issued.</p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.reverse"></a><a class="indexterm" name="id4006847"></a><code class="computeroutput"><span class="keyword">rule</span> reverse <span class="special">(</span> path <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.path.reverse"></a><a class="indexterm" name="idp548853904"></a><code class="computeroutput"><span class="keyword">rule</span> reverse <span class="special">(</span> path <span class="special">)</span></code><p> Returns <code class="computeroutput">path2</code> such that <code class="computeroutput"><span class="special">[</span> join path path2 <span class="special">]</span> <span class="special">=</span> "."</code>. The path may not contain <code class="computeroutput">".."</code> @@ -1621,30 +1758,30 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.join"></a><a class="indexterm" name="id4006926"></a><code class="computeroutput"><span class="keyword">rule</span> join <span class="special">(</span> elements + <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.path.join"></a><a class="indexterm" name="idp548863360"></a><code class="computeroutput"><span class="keyword">rule</span> join <span class="special">(</span> elements + <span class="special">)</span></code><p> Concatenates the passed path elements. Generates an error if any element other than the first one is rooted. Skips any empty or undefined path elements. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.root"></a><a class="indexterm" name="id4006975"></a><code class="computeroutput"><span class="keyword">rule</span> root <span class="special">(</span> path root <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.path.root"></a><a class="indexterm" name="idp548868928"></a><code class="computeroutput"><span class="keyword">rule</span> root <span class="special">(</span> path root <span class="special">)</span></code><p> If <code class="computeroutput">path</code> is relative, it is rooted at <code class="computeroutput">root</code>. Otherwise, it is unchanged. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.pwd"></a><a class="indexterm" name="id4007032"></a><code class="computeroutput"><span class="keyword">rule</span> pwd <span class="special">(</span> <span class="special">)</span></code><p>Returns the current working directory.</p> +<a name="bbv2.reference.modules.path.pwd"></a><a class="indexterm" name="idp548875664"></a><code class="computeroutput"><span class="keyword">rule</span> pwd <span class="special">(</span> <span class="special">)</span></code><p>Returns the current working directory.</p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.glob"></a><a class="indexterm" name="id4007078"></a><code class="computeroutput"><span class="keyword">rule</span> glob <span class="special">(</span> dirs * <span class="special">:</span> patterns + <span class="special">:</span> exclude-patterns * <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.path.glob"></a><a class="indexterm" name="idp548881056"></a><code class="computeroutput"><span class="keyword">rule</span> glob <span class="special">(</span> dirs * <span class="special">:</span> patterns + <span class="special">:</span> exclude-patterns * <span class="special">)</span></code><p> Returns the list of files matching the given pattern in the specified directory. Both directories and patterns are supplied as portable paths. Each pattern should be a non-absolute path, and can't contain "." or ".." elements. Each slash separated element of a pattern can contain the following special characters: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p>'?' matches any character</p></li> <li class="listitem"><p>'*' matches an arbitrary number of characters</p></li> </ul></div> @@ -1662,7 +1799,7 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.glob-tree"></a><a class="indexterm" name="id4007200"></a><code class="computeroutput"><span class="keyword">rule</span> glob-tree <span class="special">(</span> roots * <span class="special">:</span> patterns + <span class="special">:</span> exclude-patterns * <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.path.glob-tree"></a><a class="indexterm" name="idp548895120"></a><code class="computeroutput"><span class="keyword">rule</span> glob-tree <span class="special">(</span> roots * <span class="special">:</span> patterns + <span class="special">:</span> exclude-patterns * <span class="special">)</span></code><p> Recursive version of <a class="link" href="reference.html#bbv2.reference.modules.path.glob">glob</a>. Builds the glob of files while also searching in the subdirectories of the given roots. An optional set of exclusion patterns @@ -1672,10 +1809,10 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.exists"></a><a class="indexterm" name="id4007271"></a><code class="computeroutput"><span class="keyword">rule</span> exists <span class="special">(</span> file <span class="special">)</span></code><p>Returns true if the specified file exists.</p> +<a name="bbv2.reference.modules.path.exists"></a><a class="indexterm" name="idp548902992"></a><code class="computeroutput"><span class="keyword">rule</span> exists <span class="special">(</span> file <span class="special">)</span></code><p>Returns true if the specified file exists.</p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.all-parents"></a><a class="indexterm" name="id4007317"></a><code class="computeroutput"><span class="keyword">rule</span> all-parents <span class="special">(</span> path <span class="special">:</span> upper_limit ? <span class="special">:</span> cwd ? <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.path.all-parents"></a><a class="indexterm" name="idp548908352"></a><code class="computeroutput"><span class="keyword">rule</span> all-parents <span class="special">(</span> path <span class="special">:</span> upper_limit ? <span class="special">:</span> cwd ? <span class="special">)</span></code><p> Find out the absolute name of path and return the list of all the parents, starting with the immediate one. Parents are returned as relative names. If <code class="computeroutput">upper_limit</code> is specified, directories above it @@ -1683,7 +1820,7 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.glob-in-parents"></a><a class="indexterm" name="id4007384"></a><code class="computeroutput"><span class="keyword">rule</span> glob-in-parents <span class="special">(</span> dir <span class="special">:</span> patterns + <span class="special">:</span> upper-limit ? <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.path.glob-in-parents"></a><a class="indexterm" name="idp548916032"></a><code class="computeroutput"><span class="keyword">rule</span> glob-in-parents <span class="special">(</span> dir <span class="special">:</span> patterns + <span class="special">:</span> upper-limit ? <span class="special">)</span></code><p> Search for <code class="computeroutput">patterns</code> in parent directories of <code class="computeroutput">dir</code>, up to and including <code class="computeroutput">upper_limit</code>, if it is specified, or @@ -1691,23 +1828,23 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.relative"></a><a class="indexterm" name="id4007461"></a><code class="computeroutput"><span class="keyword">rule</span> relative <span class="special">(</span> child parent <span class="special">:</span> no-error ? <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.path.relative"></a><a class="indexterm" name="idp548925088"></a><code class="computeroutput"><span class="keyword">rule</span> relative <span class="special">(</span> child parent <span class="special">:</span> no-error ? <span class="special">)</span></code><p> Assuming <code class="computeroutput">child</code> is a subdirectory of <code class="computeroutput">parent</code>, return the relative path from <code class="computeroutput">parent</code> to <code class="computeroutput">child</code>. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.relative-to"></a><a class="indexterm" name="id4007537"></a><code class="computeroutput"><span class="keyword">rule</span> relative-to <span class="special">(</span> path1 path2 <span class="special">)</span></code><p>Returns the minimal path to path2 that is relative path1.</p> +<a name="bbv2.reference.modules.path.relative-to"></a><a class="indexterm" name="idp548934048"></a><code class="computeroutput"><span class="keyword">rule</span> relative-to <span class="special">(</span> path1 path2 <span class="special">)</span></code><p>Returns the minimal path to path2 that is relative path1.</p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.programs-path"></a><a class="indexterm" name="id4007583"></a><code class="computeroutput"><span class="keyword">rule</span> programs-path <span class="special">(</span> <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.path.programs-path"></a><a class="indexterm" name="idp548939536"></a><code class="computeroutput"><span class="keyword">rule</span> programs-path <span class="special">(</span> <span class="special">)</span></code><p> Returns the list of paths which are used by the operating system for looking up programs. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.path.mkdirs"></a><a class="indexterm" name="id4007630"></a><code class="computeroutput"><span class="keyword">rule</span> makedirs <span class="special">(</span> path <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.path.mkdirs"></a><a class="indexterm" name="idp548945008"></a><code class="computeroutput"><span class="keyword">rule</span> makedirs <span class="special">(</span> path <span class="special">)</span></code><p> Creates a directory and all parent directories that do not already exist. </p> @@ -1716,14 +1853,182 @@ import path <span class="special">:</span> native make <span class="special">:</ </div> <div class="section"> <div class="titlepage"><div><div><h4 class="title"> +<a name="bbv2.reference.modules.regex"></a>regex</h4></div></div></div> +<a class="indexterm" name="idp548951088"></a><p> + Contains rules for string processing using regular expressions. + </p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> +<li class="listitem"><p> + <code class="computeroutput">"x*"</code> matches the pattern + <code class="computeroutput">"x"</code> zero or more times. + </p></li> +<li class="listitem"><p> + <code class="computeroutput">"x+"</code> matches <code class="computeroutput">"x"</code> + one or more times. + </p></li> +<li class="listitem"><p> + <code class="computeroutput">"x?"</code> matches <code class="computeroutput">"x"</code> + zero or one time. + </p></li> +<li class="listitem"><p> + <code class="computeroutput">"[abcd]"</code> matches any of the characters, + <code class="computeroutput">"a"</code>, <code class="computeroutput">"b"</code>, + <code class="computeroutput">"c"</code>, and <code class="computeroutput">"d"</code>. + A character range such as <code class="computeroutput">"[a-z]"</code> matches + any character between <code class="computeroutput">"a"</code> and + <code class="computeroutput">"z"</code>. <code class="computeroutput">"[^abc]"</code> + matches any character which is not <code class="computeroutput">"a"</code>, + <code class="computeroutput">"b"</code>, or <code class="computeroutput">"c"</code>. + </p></li> +<li class="listitem"><p> + <code class="computeroutput">"x|y"</code> matches either pattern + <code class="computeroutput">"x"</code> or pattern <code class="computeroutput">"y"</code> + </p></li> +<li class="listitem"><p> + <code class="computeroutput">(x)</code> matches <code class="computeroutput">"x"</code> + and captures it. + </p></li> +<li class="listitem"><p> + <code class="computeroutput">"^"</code> matches the beginning of the string. + </p></li> +<li class="listitem"><p> + <code class="computeroutput">"$"</code> matches the end of the string. + </p></li> +<li class="listitem"><p> + "\<" matches the beginning of a word. + </p></li> +<li class="listitem"><p> + "\>" matches the end of a word. + </p></li> +</ul></div> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> +<a name="bbv2.reference.modules.regex.split"></a><a class="indexterm" name="idp548978176"></a><code class="computeroutput"><span class="keyword">rule</span> split <span class="special">(</span> string separator <span class="special">)</span></code><p>Returns a list of the following substrings: + </p> +<div class="orderedlist"><ol class="orderedlist" type="a"> +<li class="listitem"><p>from beginning till the first occurrence of + <code class="computeroutput">separator</code> or till the end, + </p></li> +<li class="listitem"><p>between each occurrence of + <code class="computeroutput">separator</code> and the next occurrence, + </p></li> +<li class="listitem"><p>from the last occurrence of + <code class="computeroutput">separator</code> till the end. + </p></li> +</ol></div> +<p> + If no separator is present, the result will contain only one element. + </p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.regex.split-list"></a><a class="indexterm" name="idp548988864"></a><code class="computeroutput"><span class="keyword">rule</span> split-list <span class="special">(</span> list * <span class="special">:</span> separator <span class="special">)</span></code><p>Returns the concatenated results of applying + <a class="link" href="reference.html#bbv2.reference.modules.regex.split">regex.split</a> + to every element of the list using the separator pattern.</p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.regex.match"></a><a class="indexterm" name="idp548996304"></a><code class="computeroutput"><span class="keyword">rule</span> match <span class="special">(</span> pattern <span class="special">:</span> string <span class="special">:</span> indices * <span class="special">)</span></code><p>Match <code class="computeroutput">string</code> against + <code class="computeroutput">pattern</code>, and return the elements + indicated by <code class="computeroutput">indices</code>. + </p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.regex.transform"></a><a class="indexterm" name="idp549005616"></a><code class="computeroutput"><span class="keyword">rule</span> transform <span class="special">(</span> list * <span class="special">:</span> pattern <span class="special">:</span> indices * <span class="special">)</span></code><p>Matches all elements of <code class="computeroutput">list</code> against + the <code class="computeroutput">pattern</code> and returns a list of elements + indicated by <code class="computeroutput">indices</code> of all successful + matches. If <code class="computeroutput">indices</code> is omitted returns a list + of first parenthesized groups of all successful matches.</p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.regex.escape"></a><a class="indexterm" name="idp549015760"></a><code class="computeroutput"><span class="keyword">rule</span> escape <span class="special">(</span> string <span class="special">:</span> symbols <span class="special">:</span> escape-symbol <span class="special">)</span></code><p>Escapes all of the characters in <code class="computeroutput">symbols</code> + using the escape symbol <code class="computeroutput">escape-symbol</code> for + the given string, and returns the escaped string.</p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.regex.replace"></a><a class="indexterm" name="idp549024400"></a><code class="computeroutput"><span class="keyword">rule</span> replace <span class="special">(</span> string match replacement <span class="special">)</span></code><p>Replaces occurrences of a match string in a given string and + returns the new string. The match string can be a regex expression.</p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.regex.replace-list"></a><a class="indexterm" name="idp549030320"></a><code class="computeroutput"><span class="keyword">rule</span> replace-list <span class="special">(</span> list * <span class="special">:</span> match <span class="special">:</span> replacement <span class="special">)</span></code><p>Replaces occurrences of a match string in a given list of strings + and returns a list of new strings. The match string can be a regex + expression. + </p> +</li> +</ol></div> +<p>See also: <a class="link" href="../jam/language.html#jam.language.rules.builtins.utility._match__" title="MATCH">MATCH</a></p> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> +<a name="bbv2.reference.modules.sequence"></a>sequence</h4></div></div></div> +<a class="indexterm" name="idp549039360"></a><p> + Various useful list functions. Note that algorithms in this module + execute largely in the caller's module namespace, so that local + rules can be used as function objects. Also note that most predicates + can be multi-element lists. In that case, all but the first element + are prepended to the first argument which is passed to the rule named + by the first element. + </p> +<div class="orderedlist"><ol class="orderedlist" type="1"> +<li class="listitem"> +<a name="bbv2.reference.modules.sequence.filter"></a><a class="indexterm" name="idp549043136"></a><code class="computeroutput"><span class="keyword">rule</span> filter <span class="special">(</span> predicate + <span class="special">:</span> sequence * <span class="special">)</span></code><p>Return the elements <code class="computeroutput">e</code> of + <code class="computeroutput">$(sequence)</code> for which + <code class="computeroutput"><span class="special">[</span> $(predicate) e <span class="special">]</span></code> has a non-null value. + </p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.sequence.transform"></a><a class="indexterm" name="idp549052816"></a><code class="computeroutput"><span class="keyword">rule</span> transform <span class="special">(</span> function + <span class="special">:</span> sequence * <span class="special">)</span></code><p>Return a new sequence consisting of + <code class="computeroutput"><span class="special">[</span> $(function) $(e) <span class="special">]</span></code> for each element + <code class="computeroutput">e</code> of <code class="computeroutput">$(sequence)</code>. + </p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.sequence.reverse"></a><a class="indexterm" name="idp549062496"></a><code class="computeroutput"><span class="keyword">rule</span> reverse <span class="special">(</span> s * <span class="special">)</span></code><p>Returns the elements of <code class="computeroutput">s</code> in + reverse order.</p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.sequence.insertion-sort"></a><a class="indexterm" name="idp549069088"></a><code class="computeroutput"><span class="keyword">rule</span> insertion-sort <span class="special">(</span> s * <span class="special">:</span> ordered * <span class="special">)</span></code><p>Insertion-sort <code class="computeroutput">s</code> using the + BinaryPredicate <code class="computeroutput">ordered</code>.</p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.sequence.merge"></a><a class="indexterm" name="idp549076992"></a><code class="computeroutput"><span class="keyword">rule</span> merge <span class="special">(</span> s1 * <span class="special">:</span> s2 * <span class="special">:</span> ordered * <span class="special">)</span></code><p>Merge two ordered sequences using the BinaryPredicate + <code class="computeroutput">ordered</code>.</p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.sequence.join"></a><a class="indexterm" name="idp549084912"></a><code class="computeroutput"><span class="keyword">rule</span> join <span class="special">(</span> s * <span class="special">:</span> joint ? <span class="special">)</span></code><p>Join the elements of <code class="computeroutput">s</code> into one + long string. If <code class="computeroutput">joint</code> is supplied, it + is used as a separator.</p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.sequence.length"></a><a class="indexterm" name="idp549092800"></a><code class="computeroutput"><span class="keyword">rule</span> length <span class="special">(</span> s * <span class="special">)</span></code><p>Find the length of any sequence.</p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.sequence.unique"></a><a class="indexterm" name="idp549098560"></a><code class="computeroutput"><span class="keyword">rule</span> unique <span class="special">(</span> list * <span class="special">:</span> stable ? <span class="special">)</span></code><p>Removes duplicates from <code class="computeroutput">list</code>. + If <code class="computeroutput">stable</code> is passed, then the order + of the elements will be unchanged.</p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.sequence.max-element"></a><a class="indexterm" name="idp549106608"></a><code class="computeroutput"><span class="keyword">rule</span> max-element <span class="special">(</span> elements + <span class="special">:</span> ordered ? <span class="special">)</span></code><p>Returns the maximum number in <code class="computeroutput">elements</code>. + Uses <code class="computeroutput">ordered</code> for comparisons or + <a class="link" href="../">numbers.less</a> + if none is provided.</p> +</li> +<li class="listitem"> +<a name="bbv2.reference.modules.sequence.select-highest-ranked"></a><a class="indexterm" name="idp549115568"></a><code class="computeroutput"><span class="keyword">rule</span> select-highest-ranked <span class="special">(</span> elements * <span class="special">:</span> ranks * <span class="special">)</span></code><p>Returns all of <code class="computeroutput">elements</code> for which + the corresponding element in the parallel list + <code class="computeroutput">rank</code> is equal to the maximum value in + <code class="computeroutput">rank</code>.</p> +</li> +</ol></div> +</div> +<div class="section"> +<div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.modules.type"></a>type</h4></div></div></div> -<a class="indexterm" name="id4007681"></a><p> +<a class="indexterm" name="idp549124960"></a><p> Deals with target type declaration and defines target class which supports typed targets. </p> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"> -<a name="bbv2.reference.modules.type.register"></a><a class="indexterm" name="id4007712"></a><code class="computeroutput"><span class="keyword">rule</span> register <span class="special">(</span> type <span class="special">:</span> suffixes * <span class="special">:</span> base-type ? <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.register"></a><a class="indexterm" name="idp549128512"></a><code class="computeroutput"><span class="keyword">rule</span> register <span class="special">(</span> type <span class="special">:</span> suffixes * <span class="special">:</span> base-type ? <span class="special">)</span></code><p> Registers a target type, possible derived from a <code class="computeroutput">base-type</code>. Providing a list of suffixes here is a shortcut for separately calling the @@ -1734,7 +2039,7 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.register-suffixes"></a><a class="indexterm" name="id4007800"></a><code class="computeroutput"><span class="keyword">rule</span> register-suffixes <span class="special">(</span> suffixes + <span class="special">:</span> type <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.register-suffixes"></a><a class="indexterm" name="idp549138704"></a><code class="computeroutput"><span class="keyword">rule</span> register-suffixes <span class="special">(</span> suffixes + <span class="special">:</span> type <span class="special">)</span></code><p> Specifies that files with suffix from <code class="computeroutput">suffixes</code> be recognized as targets of type <code class="computeroutput">type</code>. Issues an error if a different type is already specified for any @@ -1742,47 +2047,47 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.registered"></a><a class="indexterm" name="id4007865"></a><code class="computeroutput"><span class="keyword">rule</span> registered <span class="special">(</span> type <span class="special">)</span></code><p>Returns true iff type has been registered.</p> +<a name="bbv2.reference.modules.type.registered"></a><a class="indexterm" name="idp549146208"></a><code class="computeroutput"><span class="keyword">rule</span> registered <span class="special">(</span> type <span class="special">)</span></code><p>Returns true iff type has been registered.</p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.validate"></a><a class="indexterm" name="id4007912"></a><code class="computeroutput"><span class="keyword">rule</span> validate <span class="special">(</span> type <span class="special">)</span></code><p>Issues an error if <code class="computeroutput">type</code> is unknown.</p> +<a name="bbv2.reference.modules.type.validate"></a><a class="indexterm" name="idp549151568"></a><code class="computeroutput"><span class="keyword">rule</span> validate <span class="special">(</span> type <span class="special">)</span></code><p>Issues an error if <code class="computeroutput">type</code> is unknown.</p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.set-scanner"></a><a class="indexterm" name="id4007964"></a><code class="computeroutput"><span class="keyword">rule</span> set-scanner <span class="special">(</span> type <span class="special">:</span> scanner <span class="special">)</span></code><p>Sets a scanner class that will be used for this type.</p> +<a name="bbv2.reference.modules.type.set-scanner"></a><a class="indexterm" name="idp549157616"></a><code class="computeroutput"><span class="keyword">rule</span> set-scanner <span class="special">(</span> type <span class="special">:</span> scanner <span class="special">)</span></code><p>Sets a scanner class that will be used for this type.</p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.get-scanner"></a><a class="indexterm" name="id4008016"></a><code class="computeroutput"><span class="keyword">rule</span> get-scanner <span class="special">(</span> type <span class="special">:</span> property-set <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.get-scanner"></a><a class="indexterm" name="idp549163728"></a><code class="computeroutput"><span class="keyword">rule</span> get-scanner <span class="special">(</span> type <span class="special">:</span> property-set <span class="special">)</span></code><p> Returns a scanner instance appropriate to <code class="computeroutput">type</code> and <code class="computeroutput">property-set</code>. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.base"></a><a class="indexterm" name="id4008080"></a><code class="computeroutput"><span class="keyword">rule</span> base <span class="special">(</span> type <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.base"></a><a class="indexterm" name="idp549171152"></a><code class="computeroutput"><span class="keyword">rule</span> base <span class="special">(</span> type <span class="special">)</span></code><p> Returns a base type for the given type or nothing in case the given type is not derived. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.all-bases"></a><a class="indexterm" name="id4008127"></a><code class="computeroutput"><span class="keyword">rule</span> all-bases <span class="special">(</span> type <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.all-bases"></a><a class="indexterm" name="idp549176576"></a><code class="computeroutput"><span class="keyword">rule</span> all-bases <span class="special">(</span> type <span class="special">)</span></code><p> Returns the given type and all of its base types in order of their distance from type. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.all-derived"></a><a class="indexterm" name="id4008174"></a><code class="computeroutput"><span class="keyword">rule</span> all-derived <span class="special">(</span> type <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.all-derived"></a><a class="indexterm" name="idp549181936"></a><code class="computeroutput"><span class="keyword">rule</span> all-derived <span class="special">(</span> type <span class="special">)</span></code><p> Returns the given type and all of its derived types in order of their distance from type. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.is-derived"></a><a class="indexterm" name="id4008222"></a><code class="computeroutput"><span class="keyword">rule</span> is-derived <span class="special">(</span> type base <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.is-derived"></a><a class="indexterm" name="idp549187424"></a><code class="computeroutput"><span class="keyword">rule</span> is-derived <span class="special">(</span> type base <span class="special">)</span></code><p> Returns true if <code class="computeroutput">type</code> is equal to <code class="computeroutput">base</code> or has <code class="computeroutput">base</code> as its direct or indirect base. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.set-generated-target-suffix"></a><a class="indexterm" name="id4008285"></a><code class="computeroutput"><span class="keyword">rule</span> set-generated-target-suffix <span class="special">(</span> type <span class="special">:</span> properties * <span class="special">:</span> suffix <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.set-generated-target-suffix"></a><a class="indexterm" name="idp549194960"></a><code class="computeroutput"><span class="keyword">rule</span> set-generated-target-suffix <span class="special">(</span> type <span class="special">:</span> properties * <span class="special">:</span> suffix <span class="special">)</span></code><p> Sets a file suffix to be used when generating a target of <code class="computeroutput">type</code> with the specified properties. Can be called with no properties if no suffix has already been specified for the <code class="computeroutput">type</code>. The <code class="computeroutput">suffix</code> parameter can be an empty @@ -1799,19 +2104,19 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.change-generated-target-suffix"></a><a class="indexterm" name="id4008399"></a><code class="computeroutput"><span class="keyword">rule</span> change-generated-target-suffix <span class="special">(</span> type <span class="special">:</span> properties * <span class="special">:</span> suffix <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.change-generated-target-suffix"></a><a class="indexterm" name="idp549207840"></a><code class="computeroutput"><span class="keyword">rule</span> change-generated-target-suffix <span class="special">(</span> type <span class="special">:</span> properties * <span class="special">:</span> suffix <span class="special">)</span></code><p> Change the suffix previously registered for this type/properties combination. If suffix is not yet specified, sets it. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.generated-target-suffix"></a><a class="indexterm" name="id4008460"></a><code class="computeroutput"><span class="keyword">rule</span> generated-target-suffix <span class="special">(</span> type <span class="special">:</span> property-set <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.generated-target-suffix"></a><a class="indexterm" name="idp549214928"></a><code class="computeroutput"><span class="keyword">rule</span> generated-target-suffix <span class="special">(</span> type <span class="special">:</span> property-set <span class="special">)</span></code><p> Returns the suffix used when generating a file of <code class="computeroutput">type</code> with the given properties. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.set-generated-target-prefix"></a><a class="indexterm" name="id4008520"></a><code class="computeroutput"><span class="keyword">rule</span> set-generated-target-prefix <span class="special">(</span> type <span class="special">:</span> properties * <span class="special">:</span> prefix <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.set-generated-target-prefix"></a><a class="indexterm" name="idp549221792"></a><code class="computeroutput"><span class="keyword">rule</span> set-generated-target-prefix <span class="special">(</span> type <span class="special">:</span> properties * <span class="special">:</span> prefix <span class="special">)</span></code><p> Sets a target prefix that should be used when generating targets of <code class="computeroutput">type</code> with the specified properties. Can be called with empty properties if no prefix for @@ -1828,19 +2133,19 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.change-generated-target-prefix"></a><a class="indexterm" name="id4008619"></a><code class="computeroutput"><span class="keyword">rule</span> change-generated-target-prefix <span class="special">(</span> type <span class="special">:</span> properties * <span class="special">:</span> prefix <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.change-generated-target-prefix"></a><a class="indexterm" name="idp549233328"></a><code class="computeroutput"><span class="keyword">rule</span> change-generated-target-prefix <span class="special">(</span> type <span class="special">:</span> properties * <span class="special">:</span> prefix <span class="special">)</span></code><p> Change the prefix previously registered for this type/properties combination. If prefix is not yet specified, sets it. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.generated-target-prefix"></a><a class="indexterm" name="id4008680"></a><code class="computeroutput"><span class="keyword">rule</span> generated-target-prefix <span class="special">(</span> type <span class="special">:</span> property-set <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.generated-target-prefix"></a><a class="indexterm" name="idp549240352"></a><code class="computeroutput"><span class="keyword">rule</span> generated-target-prefix <span class="special">(</span> type <span class="special">:</span> property-set <span class="special">)</span></code><p> Returns the prefix used when generating a file of <code class="computeroutput">type</code> with the given properties. </p> </li> <li class="listitem"> -<a name="bbv2.reference.modules.type.type"></a><a class="indexterm" name="id4008740"></a><code class="computeroutput"><span class="keyword">rule</span> type <span class="special">(</span> filename <span class="special">)</span></code><p> +<a name="bbv2.reference.modules.type.type"></a><a class="indexterm" name="idp549247168"></a><code class="computeroutput"><span class="keyword">rule</span> type <span class="special">(</span> filename <span class="special">)</span></code><p> Returns file type given its name. If there are several dots in filename, tries each suffix. E.g. for name of "file.so.1.2" suffixes "2", "1", and "so" will be tried. @@ -1852,7 +2157,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.reference.class"></a>Builtin classes</h3></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="reference.html#bbv2.reference.class.abstract-target">Class abstract-target</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.class.project-target">Class project-target</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.class.main-target">Class main-target</a></span></dt> @@ -1863,7 +2168,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.class.abstract-target"></a>Class abstract-target</h4></div></div></div> -<a class="indexterm" name="id4008809"></a><p> +<a class="indexterm" name="idp549255104"></a><p> Base class for all abstract targets. </p> <pre class="programlisting"> @@ -1879,7 +2184,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <p> Classes derived from <a class="link" href="reference.html#bbv2.reference.class.abstract-target" title="Class abstract-target">abstract-target</a>: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><a class="link" href="reference.html#bbv2.reference.class.project-target" title="Class project-target">project-target</a></li> <li class="listitem"><a class="link" href="reference.html#bbv2.reference.class.main-target" title="Class main-target">main-target</a></li> <li class="listitem"><a class="link" href="reference.html#bbv2.reference.class.project-target" title="Class project-target">basic-target</a></li> @@ -1890,7 +2195,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <li class="listitem"> <a name="bbv2.reference.class.abstract-target.__init__"></a><code class="computeroutput"><span class="keyword">rule</span> __init__ <span class="special">(</span> name <span class="special">:</span> project <span class="special">)</span></code><p> </p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">name</code></span></dt> <dd><p>The name of the target in the Jamfile.</p></dd> <dt><span class="term"><code class="literal">project</code></span></dt> @@ -1900,19 +2205,19 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.abstract-target.name"></a><a class="indexterm" name="id4009146"></a><code class="computeroutput"><span class="keyword">rule</span> name <span class="special">(</span> <span class="special">)</span></code><p>Returns the name of this target.</p> +<a name="bbv2.reference.class.abstract-target.name"></a><a class="indexterm" name="idp549294944"></a><code class="computeroutput"><span class="keyword">rule</span> name <span class="special">(</span> <span class="special">)</span></code><p>Returns the name of this target.</p> </li> <li class="listitem"> -<a name="bbv2.reference.class.abstract-target.project"></a><a class="indexterm" name="id4009194"></a><code class="computeroutput"><span class="keyword">rule</span> project <span class="special">(</span> <span class="special">)</span></code><p>Returns the <a class="link" href="reference.html#bbv2.reference.class.project-target" title="Class project-target">project</a> for this target.</p> +<a name="bbv2.reference.class.abstract-target.project"></a><a class="indexterm" name="idp549300624"></a><code class="computeroutput"><span class="keyword">rule</span> project <span class="special">(</span> <span class="special">)</span></code><p>Returns the <a class="link" href="reference.html#bbv2.reference.class.project-target" title="Class project-target">project</a> for this target.</p> </li> <li class="listitem"> -<a name="bbv2.reference.class.abstract-target.location"></a><a class="indexterm" name="id4009249"></a><code class="computeroutput"><span class="keyword">rule</span> location <span class="special">(</span> <span class="special">)</span></code><p>Returns the location where the target was declared.</p> +<a name="bbv2.reference.class.abstract-target.location"></a><a class="indexterm" name="idp549307200"></a><code class="computeroutput"><span class="keyword">rule</span> location <span class="special">(</span> <span class="special">)</span></code><p>Returns the location where the target was declared.</p> </li> <li class="listitem"> -<a name="bbv2.reference.class.abstract-target.full-name"></a><a class="indexterm" name="id4009298"></a><code class="computeroutput"><span class="keyword">rule</span> full-name <span class="special">(</span> <span class="special">)</span></code><p>Returns a user-readable name for this target.</p> +<a name="bbv2.reference.class.abstract-target.full-name"></a><a class="indexterm" name="idp549312784"></a><code class="computeroutput"><span class="keyword">rule</span> full-name <span class="special">(</span> <span class="special">)</span></code><p>Returns a user-readable name for this target.</p> </li> <li class="listitem"> -<a name="bbv2.reference.class.abstract-target.generate"></a><a class="indexterm" name="id4009346"></a><code class="computeroutput"><span class="keyword">rule</span> generate <span class="special">(</span> property-set <span class="special">)</span></code><p> +<a name="bbv2.reference.class.abstract-target.generate"></a><a class="indexterm" name="idp549318528"></a><code class="computeroutput"><span class="keyword">rule</span> generate <span class="special">(</span> property-set <span class="special">)</span></code><p> Generates virtual targets for this abstract target using the specified properties, unless a different value of some feature is required by the target. This is an abstract method which must be overriden by derived @@ -1921,7 +2226,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <p> On success, returns: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem">a property-set with the usage requirements to be applied to dependents</li> <li class="listitem">a list of produced virtual targets, which may be empty.</li> </ul></div> @@ -1935,7 +2240,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.class.project-target"></a>Class project-target</h4></div></div></div> -<a class="indexterm" name="id4009428"></a><pre class="programlisting"> +<a class="indexterm" name="idp549327792"></a><pre class="programlisting"> <span class="keyword">class</span> project-target <span class="special">:</span> <a class="link" href="reference.html#bbv2.reference.class.abstract-target" title="Class abstract-target">abstract-target</a> <span class="special">{</span> <span class="keyword">rule</span> <a class="link" href="reference.html#bbv2.reference.class.project-target.generate">generate</a> <span class="special">(</span> property-set <span class="special">)</span> <span class="keyword">rule</span> <a class="link" href="reference.html#bbv2.reference.class.project-target.build-dir">build-dir</a> <span class="special">(</span> <span class="special">)</span> @@ -1953,14 +2258,14 @@ import path <span class="special">:</span> native make <span class="special">:</ <p> This class has the following responsibilities: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> Maintaining a list of main targets in this project and building them. </p></li></ul></div> <p> </p> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"> -<a name="bbv2.reference.class.project-target.generate"></a><a class="indexterm" name="id4009743"></a><code class="computeroutput"><span class="keyword">rule</span> generate <span class="special">(</span> property-set <span class="special">)</span></code><p> +<a name="bbv2.reference.class.project-target.generate"></a><a class="indexterm" name="idp549365216"></a><code class="computeroutput"><span class="keyword">rule</span> generate <span class="special">(</span> property-set <span class="special">)</span></code><p> Overrides <a class="link" href="reference.html#bbv2.reference.class.abstract-target.generate">abstract-target.generate</a>. @@ -1969,7 +2274,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <p> On success, returns: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem">a property-set with the usage requirements to be applied to dependents</li> <li class="listitem">a list of produced virtual targets, which may be empty.</li> </ul></div> @@ -1977,26 +2282,26 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.project-target.build-dir"></a><a class="indexterm" name="id4009817"></a><code class="computeroutput"><span class="keyword">rule</span> build-dir <span class="special">(</span> <span class="special">)</span></code><p> +<a name="bbv2.reference.class.project-target.build-dir"></a><a class="indexterm" name="idp549373648"></a><code class="computeroutput"><span class="keyword">rule</span> build-dir <span class="special">(</span> <span class="special">)</span></code><p> Returns the root build directory of the project. </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.project-target.main-target"></a><a class="indexterm" name="id4009865"></a><code class="computeroutput"><span class="keyword">rule</span> main-target <span class="special">(</span> name <span class="special">)</span></code><p> +<a name="bbv2.reference.class.project-target.main-target"></a><a class="indexterm" name="idp549379360"></a><code class="computeroutput"><span class="keyword">rule</span> main-target <span class="special">(</span> name <span class="special">)</span></code><p> Returns a <a class="link" href="reference.html#bbv2.reference.class.main-target" title="Class main-target">main-target</a> class instance corresponding to <code class="literal">name</code>. Can only be called after the project has been fully loaded. </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.project-target.has-main-target"></a><a class="indexterm" name="id4009928"></a><code class="computeroutput"><span class="keyword">rule</span> has-main-target <span class="special">(</span> name <span class="special">)</span></code><p> +<a name="bbv2.reference.class.project-target.has-main-target"></a><a class="indexterm" name="idp549386720"></a><code class="computeroutput"><span class="keyword">rule</span> has-main-target <span class="special">(</span> name <span class="special">)</span></code><p> Returns whether a <a class="link" href="reference.html#bbv2.reference.class.main-target" title="Class main-target">main-target</a> with the specified name exists. Can only be called after the project has been fully loaded. </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.project-target.find"></a><a class="indexterm" name="id4009988"></a><code class="computeroutput"><span class="keyword">rule</span> find <span class="special">(</span> id <span class="special">:</span> no-error ? <span class="special">)</span></code><p> +<a name="bbv2.reference.class.project-target.find"></a><a class="indexterm" name="idp549393392"></a><code class="computeroutput"><span class="keyword">rule</span> find <span class="special">(</span> id <span class="special">:</span> no-error ? <span class="special">)</span></code><p> Find and return the target with the specified id, treated relative to self. Id may specify either a target or a file name with the target taking priority. May report an error or return nothing if the target is not found @@ -2008,7 +2313,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.class.main-target"></a>Class main-target</h4></div></div></div> -<a class="indexterm" name="id4010058"></a><pre class="programlisting"> +<a class="indexterm" name="idp549401376"></a><pre class="programlisting"> <span class="keyword">class</span> main-target <span class="special">:</span> <a class="link" href="reference.html#bbv2.reference.class.abstract-target" title="Class abstract-target">abstract-target</a> <span class="special">{</span> <span class="keyword">rule</span> <a class="link" href="reference.html#bbv2.reference.class.main-target.generate">generate</a> <span class="special">(</span> property-set <span class="special">)</span> @@ -2024,7 +2329,7 @@ import path <span class="special">:</span> native make <span class="special">:</ represents a named top-level target in a Jamfile. </p> <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"> -<a name="bbv2.reference.class.main-target.generate"></a><a class="indexterm" name="id4010262"></a><code class="computeroutput"><span class="keyword">rule</span> generate <span class="special">(</span> property-set <span class="special">)</span></code><p> +<a name="bbv2.reference.class.main-target.generate"></a><a class="indexterm" name="idp549425504"></a><code class="computeroutput"><span class="keyword">rule</span> generate <span class="special">(</span> property-set <span class="special">)</span></code><p> Overrides <a class="link" href="reference.html#bbv2.reference.class.abstract-target.generate">abstract-target.generate</a>. @@ -2037,7 +2342,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <p> On success, returns: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem">a property-set with the usage requirements to be applied to dependents</li> <li class="listitem">a list of produced virtual targets, which may be empty.</li> </ul></div> @@ -2048,7 +2353,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.class.basic-target"></a>Class basic-target</h4></div></div></div> -<a class="indexterm" name="id4010361"></a><pre class="programlisting"> +<a class="indexterm" name="idp549436480"></a><pre class="programlisting"> <span class="keyword">class</span> basic-target <span class="special">:</span> <a class="link" href="reference.html#bbv2.reference.class.abstract-target" title="Class abstract-target">abstract-target</a> <span class="special">{</span> <span class="keyword">rule</span> <a class="link" href="reference.html#bbv2.reference.class.basic-target.__init__">__init__</a> <span class="special">(</span> name <span class="special">:</span> project <span class="special">:</span> sources * <span class="special">:</span> requirements * <span class="special">:</span> default-build * <span class="special">:</span> usage-requirements * <span class="special">)</span> <span class="keyword">rule</span> <a class="link" href="reference.html#bbv2.reference.class.basic-target.generate">generate</a> <span class="special">(</span> property-set <span class="special">)</span> @@ -2071,7 +2376,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <li class="listitem"> <a name="bbv2.reference.class.basic-target.__init__"></a><code class="computeroutput"><span class="keyword">rule</span> __init__ <span class="special">(</span> name <span class="special">:</span> project <span class="special">:</span> sources * <span class="special">:</span> requirements * <span class="special">:</span> default-build * <span class="special">:</span> usage-requirements * <span class="special">)</span></code><p> </p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">name</code></span></dt> <dd><p>The name of the target</p></dd> <dt><span class="term"><code class="literal">project</code></span></dt> @@ -2084,7 +2389,7 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.basic-target.generate"></a><a class="indexterm" name="id4010752"></a><code class="computeroutput"><span class="keyword">rule</span> generate <span class="special">(</span> property-set <span class="special">)</span></code><p> +<a name="bbv2.reference.class.basic-target.generate"></a><a class="indexterm" name="idp549482896"></a><code class="computeroutput"><span class="keyword">rule</span> generate <span class="special">(</span> property-set <span class="special">)</span></code><p> Overrides <a class="link" href="reference.html#bbv2.reference.class.abstract-target.generate">abstract-target.generate</a>. @@ -2095,7 +2400,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <p> On success, returns: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem">a property-set with the usage requirements to be applied to dependents</li> <li class="listitem">a list of produced virtual targets, which may be empty.</li> </ul></div> @@ -2103,7 +2408,7 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.basic-target.construct"></a><a class="indexterm" name="id4010834"></a><code class="computeroutput"><span class="keyword">rule</span> construct <span class="special">(</span> name <span class="special">:</span> source-targets * <span class="special">:</span> property-set <span class="special">)</span></code><p> +<a name="bbv2.reference.class.basic-target.construct"></a><a class="indexterm" name="idp549492192"></a><code class="computeroutput"><span class="keyword">rule</span> construct <span class="special">(</span> name <span class="special">:</span> source-targets * <span class="special">:</span> property-set <span class="special">)</span></code><p> Constructs virtual targets for this abstract target. Returns a usage-requirements property-set and a list of virtual targets. Should be overriden in derived classes. @@ -2114,7 +2419,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.class.typed-target"></a>Class typed-target</h4></div></div></div> -<a class="indexterm" name="id4010903"></a><pre class="programlisting"> +<a class="indexterm" name="idp549500112"></a><pre class="programlisting"> <span class="keyword">class</span> typed-target <span class="special">:</span> <a class="link" href="reference.html#bbv2.reference.class.basic-target" title="Class basic-target">basic-target</a> <span class="special">{</span> <span class="keyword">rule</span> <a class="link" href="reference.html#bbv2.reference.class.typed-target.__init__">__init__</a> <span class="special">(</span> name <span class="special">:</span> project <span class="special">:</span> type <span class="special">:</span> sources * <span class="special">:</span> requirements * <span class="special">:</span> default-build * <span class="special">:</span> usage-requirements * <span class="special">)</span> <span class="keyword">rule</span> <a class="link" href="reference.html#bbv2.reference.class.typed-target.type">type</a> <span class="special">(</span> <span class="special">)</span> @@ -2139,7 +2444,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <li class="listitem"> <a name="bbv2.reference.class.typed-target.__init__"></a><code class="computeroutput"><span class="keyword">rule</span> __init__ <span class="special">(</span> name <span class="special">:</span> project <span class="special">:</span> type <span class="special">:</span> sources * <span class="special">:</span> requirements * <span class="special">:</span> default-build * <span class="special">:</span> usage-requirements * <span class="special">)</span></code><p> </p> -<div class="variablelist"><dl> +<div class="variablelist"><dl class="variablelist"> <dt><span class="term"><code class="literal">name</code></span></dt> <dd><p>The name of the target</p></dd> <dt><span class="term"><code class="literal">project</code></span></dt> @@ -2157,13 +2462,13 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.typed-target.type"></a><a class="indexterm" name="id4011377"></a><code class="computeroutput"><span class="keyword">rule</span> type <span class="special">(</span> <span class="special">)</span></code><p> +<a name="bbv2.reference.class.typed-target.type"></a><a class="indexterm" name="idp549556176"></a><code class="computeroutput"><span class="keyword">rule</span> type <span class="special">(</span> <span class="special">)</span></code><p> Returns the <a class="link" href="reference.html#bbv2.reference.modules.type" title="type">type</a> of the target. </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.typed-target.construct"></a><a class="indexterm" name="id4011433"></a><code class="computeroutput"><span class="keyword">rule</span> construct <span class="special">(</span> name <span class="special">:</span> source-targets * <span class="special">:</span> property-set <span class="special">)</span></code><p> +<a name="bbv2.reference.class.typed-target.construct"></a><a class="indexterm" name="idp549562640"></a><code class="computeroutput"><span class="keyword">rule</span> construct <span class="special">(</span> name <span class="special">:</span> source-targets * <span class="special">:</span> property-set <span class="special">)</span></code><p> Implements <a class="link" href="reference.html#bbv2.reference.class.basic-target.construct"> basic-target.construct</a>. Attempts to create a target of the correct type using generators appropriate for the given @@ -2192,7 +2497,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.class.property-set"></a>Class property-set</h4></div></div></div> -<a class="indexterm" name="id4011545"></a><p>Class for storing a set of properties.</p> +<a class="indexterm" name="idp549575120"></a><p>Class for storing a set of properties.</p> <pre class="programlisting"> <span class="keyword">class</span> property-set <span class="special">{</span> <span class="keyword">rule</span> <a class="link" href="reference.html#bbv2.reference.class.property-set.raw">raw</a> <span class="special">(</span> <span class="special">)</span> @@ -2211,20 +2516,20 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> <div class="orderedlist"><ol class="orderedlist" type="1"> <li class="listitem"> -<a name="bbv2.reference.class.property-set.raw"></a><a class="indexterm" name="id4011774"></a><code class="computeroutput"><span class="keyword">rule</span> raw <span class="special">(</span> <span class="special">)</span></code><p>Returns a Jam list of the stored properties.</p> +<a name="bbv2.reference.class.property-set.raw"></a><a class="indexterm" name="idp549602688"></a><code class="computeroutput"><span class="keyword">rule</span> raw <span class="special">(</span> <span class="special">)</span></code><p>Returns a Jam list of the stored properties.</p> </li> <li class="listitem"> -<a name="bbv2.reference.class.property-set.str"></a><a class="indexterm" name="id4011822"></a><code class="computeroutput"><span class="keyword">rule</span> str <span class="special">(</span> <span class="special">)</span></code><p>Returns the string repesentation of the stored properties.</p> +<a name="bbv2.reference.class.property-set.str"></a><a class="indexterm" name="idp549608304"></a><code class="computeroutput"><span class="keyword">rule</span> str <span class="special">(</span> <span class="special">)</span></code><p>Returns the string repesentation of the stored properties.</p> </li> <li class="listitem"> -<a name="bbv2.reference.class.property-set.propagated"></a><a class="indexterm" name="id4011870"></a><code class="computeroutput"><span class="keyword">rule</span> propagated <span class="special">(</span> <span class="special">)</span></code><p> +<a name="bbv2.reference.class.property-set.propagated"></a><a class="indexterm" name="idp549613952"></a><code class="computeroutput"><span class="keyword">rule</span> propagated <span class="special">(</span> <span class="special">)</span></code><p> Returns a <a class="link" href="reference.html#bbv2.reference.class.property-set" title="Class property-set">property-set</a> containing all the <a class="link" href="reference.html#bbv2.reference.features.attributes.propagated">propagated</a> properties in this <a class="link" href="reference.html#bbv2.reference.class.property-set" title="Class property-set">property-set</a>. </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.property-set.add"></a><a class="indexterm" name="id4011942"></a><code class="computeroutput"><span class="keyword">rule</span> add <span class="special">(</span> ps <span class="special">)</span></code><p> +<a name="bbv2.reference.class.property-set.add"></a><a class="indexterm" name="idp549622176"></a><code class="computeroutput"><span class="keyword">rule</span> add <span class="special">(</span> ps <span class="special">)</span></code><p> Returns a new <a class="link" href="reference.html#bbv2.reference.class.property-set" title="Class property-set"> property-set</a> containing the union of the properties in this <a class="link" href="reference.html#bbv2.reference.class.property-set" title="Class property-set"> @@ -2246,7 +2551,7 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.property-set.add-raw"></a><a class="indexterm" name="id4012036"></a><code class="computeroutput"><span class="keyword">rule</span> add-raw <span class="special">(</span> properties * <span class="special">)</span></code><p> +<a name="bbv2.reference.class.property-set.add-raw"></a><a class="indexterm" name="idp549632768"></a><code class="computeroutput"><span class="keyword">rule</span> add-raw <span class="special">(</span> properties * <span class="special">)</span></code><p> Link <a class="link" href="reference.html#bbv2.reference.class.property-set.add"> add</a>, except that it takes a list of properties instead of a <a class="link" href="reference.html#bbv2.reference.class.property-set" title="Class property-set"> @@ -2254,7 +2559,7 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.property-set.refine"></a><a class="indexterm" name="id4012101"></a><code class="computeroutput"><span class="keyword">rule</span> refine <span class="special">(</span> ps <span class="special">)</span></code><p> +<a name="bbv2.reference.class.property-set.refine"></a><a class="indexterm" name="idp549640288"></a><code class="computeroutput"><span class="keyword">rule</span> refine <span class="special">(</span> ps <span class="special">)</span></code><p> Refines properties by overriding any non-free and non-conditional properties for which a different value is specified in <code class="literal">ps</code>. Returns the resulting @@ -2262,7 +2567,7 @@ import path <span class="special">:</span> native make <span class="special">:</ </p> </li> <li class="listitem"> -<a name="bbv2.reference.class.property-set.get"></a><a class="indexterm" name="id4012165"></a><code class="computeroutput"><span class="keyword">rule</span> get <span class="special">(</span> feature <span class="special">)</span></code><p> +<a name="bbv2.reference.class.property-set.get"></a><a class="indexterm" name="idp549647584"></a><code class="computeroutput"><span class="keyword">rule</span> get <span class="special">(</span> feature <span class="special">)</span></code><p> Returns all the values of <code class="literal">feature</code>. </p> </li> @@ -2272,7 +2577,7 @@ import path <span class="special">:</span> native make <span class="special">:</ <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.reference.buildprocess"></a>Build process</h3></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="reference.html#bbv2.reference.buildprocess.alternatives">Alternative selection</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.buildprocess.common">Determining common properties</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.buildprocess.targetpath">Target Paths</a></span></dt> @@ -2374,7 +2679,7 @@ exe a : a.cpp <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.buildprocess.targetpath"></a>Target Paths</h4></div></div></div> -<p>Several factors determine the location of a concrete +<a class="indexterm" name="idp549678256"></a><p>Several factors determine the location of a concrete file target. All files in a project are built under the directory bin unless this is overriden by the build-dir project attribute. Under bin is a path that depends on the properties @@ -2413,7 +2718,7 @@ exe a : a.cpp <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.reference.definitions"></a>Definitions</h3></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="reference.html#bbv2.reference.features">Features and properties</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.variants.proprefine">Property refinement</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.variants.propcond">Conditional properties</a></span></dt> @@ -2422,7 +2727,7 @@ exe a : a.cpp <div class="section"> <div class="titlepage"><div><div><h4 class="title"> <a name="bbv2.reference.features"></a>Features and properties</h4></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="reference.html#bbv2.reference.features.validity">Property Validity</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.features.attributes">Feature Attributes</a></span></dt> <dt><span class="section"><a href="reference.html#bbv2.reference.features.declaration">Feature Declaration</a></span></dt> @@ -2487,7 +2792,7 @@ exe a : a.cpp that an <span class="emphasis"><em>incidental</em></span> property, for example, is one whose feature has the <span class="emphasis"><em>incidental</em></span> attribute.</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> <p><span class="emphasis"><em>incidental</em></span></p> <p>Incidental features are assumed not to affect build @@ -2677,7 +2982,7 @@ directory-name -> path This grammar allows some elements to be recognized as either </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> project id (at this point, all project ids start with slash). </li> @@ -2708,7 +3013,7 @@ lib/b.cpp -- regular file </p> <p><span class="bold"><strong>Rationale:</strong></span>Target is separated from project by special separator (not just slash), because:</p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"> It emphasises that projects and targets are different things. </li> @@ -2745,7 +3050,7 @@ requested-properties -> property-path </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> -<td align="right"><div class="copyright-footer">Copyright © 2006-2009 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. +<td align="right"><div class="copyright-footer">Copyright © 2006-2009, 2014 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> diff --git a/doc/html/bbv2/tasks.html b/doc/html/bbv2/tasks.html index b8300bb4e0..29460c4115 100644 --- a/doc/html/bbv2/tasks.html +++ b/doc/html/bbv2/tasks.html @@ -3,9 +3,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Common tasks</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../bbv2.html" title="Chapter 39. Boost.Build V2 User Manual"> +<link rel="up" href="../bbv2.html" title="Chapter 43. Boost.Build V2 User Manual"> <link rel="prev" href="overview.html" title="Overview"> <link rel="next" href="reference.html" title="Reference"> </head> @@ -25,7 +25,7 @@ <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="bbv2.tasks"></a>Common tasks</h2></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="tasks.html#bbv2.tasks.programs">Programs</a></span></dt> <dt><span class="section"><a href="tasks.html#bbv2.tasks.libraries">Libraries</a></span></dt> <dt><span class="section"><a href="tasks.html#bbv2.tasks.alias">Alias</a></span></dt> @@ -44,7 +44,7 @@ <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.tasks.programs"></a>Programs</h3></div></div></div> -<a class="indexterm" name="id3997762"></a><p> +<a class="indexterm" name="idp547776640"></a><p> Programs are created using the <code class="computeroutput">exe</code> rule, which follows the <a class="link" href="overview.html#bbv2.main-target-rule-syntax">common syntax</a>. For example: @@ -80,7 +80,7 @@ exe hello : hello.cpp some_library.lib /some_project//library <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.tasks.libraries"></a>Libraries</h3></div></div></div> -<a class="indexterm" name="id3997834"></a><p> +<a class="indexterm" name="idp547785104"></a><p> Library targets are created using the <code class="computeroutput">lib</code> rule, which follows the <a class="link" href="overview.html#bbv2.main-target-rule-syntax">common syntax </a>. For example: @@ -97,7 +97,7 @@ lib helpers : helpers.cpp ; <p> Library targets can represent: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p> Libraries that should be built from source, as in the example above. @@ -307,7 +307,7 @@ exe main : main.cpp static_libraries ; files. </p> <h4> -<a name="id3998370"></a>Basic install</h4> +<a name="idp547844240"></a>Basic install</h4> <p> For installing a built target you should use the <code class="computeroutput">install</code> rule, which follows the <a class="link" href="overview.html#bbv2.main-target-rule-syntax"> @@ -346,7 +346,7 @@ install dist2 : hello helpers : <location>$(DIST) ; variables</a> </p> <h4> -<a name="id3998482"></a>Installing with all dependencies</h4> +<a name="idp547856960"></a>Installing with all dependencies</h4> <p> Specifying the names of all libraries to install can be boring. The <code class="computeroutput">install</code> allows you to specify only the top-level executable @@ -370,8 +370,8 @@ install dist : hello otherwise, all found target will be installed. </p> <h4> -<a name="id3998535"></a>Preserving Directory Hierarchy</h4> -<a class="indexterm" name="id3998538"></a><p> +<a name="idp547862352"></a>Preserving Directory Hierarchy</h4> +<a class="indexterm" name="idp547862736"></a><p> By default, the <code class="computeroutput">install</code> rule will strip paths from its sources. So, if sources include <code class="filename">a/b/c.hpp</code>, the <code class="filename">a/b</code> part will be ignored. To make the @@ -395,7 +395,7 @@ install headers an entire directory tree. </p> <h4> -<a name="id3998614"></a>Installing into Several Directories</h4> +<a name="idp547871120"></a>Installing into Several Directories</h4> <p> The <a class="link" href="tasks.html#bbv2.tasks.alias" title="Alias"><code class="computeroutput">alias</code></a> rule can be used when targets need to be installed into several directories: @@ -409,7 +409,7 @@ install install-lib : helper : /usr/lib ; </p> <p> Because the <code class="computeroutput">install</code> rule just copies targets, most free - features <sup>[<a name="id3998650" href="#ftn.id3998650" class="footnote">12</a>]</sup> have no + features <a href="#ftn.idp547875056" class="footnote" name="idp547875056"><sup class="footnote">[15]</sup></a> have no effect when used in requirements of the <code class="computeroutput">install</code> rule. The only two that matter are <a class="link" href="reference.html#bbv2.builtin.features.dependency"> <code class="varname">dependency</code></a> and, on Unix, <a class="link" href="reference.html#bbv2.reference.features.dll-path"><code class="varname">dll-path</code> @@ -450,26 +450,6 @@ unit-test helpers_test : helpers_test.cpp helpers ; not miss a unit test failure. </p> <p> - By default, the executable is run directly. Sometimes, it is desirable to - run the executable using some helper command. You should use the <code class="literal"> - testing.launcher</code> property to specify the name of the helper - command. For example, if you write: -</p> -<pre class="programlisting"> -unit-test helpers_test - : helpers_test.cpp helpers - : <span class="bold"><strong><testing.launcher>valgrind</strong></span> - ; -</pre> -<p> - The command used to run the executable will be: -</p> -<pre class="screen"> -<span class="bold"><strong>valgrind</strong></span> bin/$toolset/debug/helpers_test -</pre> -<p> - </p> -<p> There are few specialized testing rules, listed below: </p> <pre class="programlisting"> @@ -502,8 +482,8 @@ rule run ( sources + : args * : input-files * : requirements * : target-name ? <code class="varname">args</code> and <code class="varname">input-files</code> as command-line arguments. The <code class="varname">args</code> parameter is passed verbatim and the values of the <code class="varname">input-files</code> parameter are treated as - paths relative to containing Jamfile, and are adjusted if <span class="command"><strong>bjam - </strong></span> is invoked from a different directory. The + paths relative to containing Jamfile, and are adjusted if <span class="command"><strong>b2</strong></span> + is invoked from a different directory. The <code class="computeroutput">run-fail</code> rule is identical to the <code class="computeroutput">run</code> rule, except that it expects that the run fails. </p> @@ -518,7 +498,7 @@ rule run ( sources + : args * : input-files * : requirements * : target-name ? target-name</code></em>.output</code>. </p> <p> - <a class="indexterm" name="id3998973"></a> + <a class="indexterm" name="idp547906256"></a> If the <code class="literal">preserve-test-targets</code> feature has the value <code class="literal">off</code>, then <code class="computeroutput">run</code> and the <code class="computeroutput">run-fail</code> rules will remove the executable after running it. This somewhat decreases @@ -542,6 +522,60 @@ boost-test(<em class="replaceable"><code>test-type</code></em>) <em class="repla files created when test passes into human-readable status table of tests. Such processing utilities are not included in Boost.Build. </p> +<p>The following features adjust behaviour of the testing metatargets.</p> +<div class="variablelist"><dl class="variablelist"> +<dt><span class="term"><code class="literal">testing.arg</code></span></dt> +<dd> +<p> + Defines an argument to be passed to the target when it is executed + before the list of input files. + </p> +<p> +</p> +<pre class="programlisting"> +unit-test helpers_test + : helpers_test.cpp helpers + : <span class="bold"><strong><testing.arg>"--foo bar"</strong></span> + ; +</pre> +<p> + </p> +</dd> +<dt><span class="term"><code class="literal">testing.input-file</code></span></dt> +<dd><p> + Specifies a file to be passed to the executable on the command line + after the arguments. All files must be specified in alphabetical + order due to constrainsts in the current implementation. + </p></dd> +<dt><span class="term"><code class="literal">testing.launcher</code></span></dt> +<dd> +<p> + By default, the executable is run directly. Sometimes, it is + desirable to run the executable using some helper command. You + should use the this property to specify the name of the helper + command. For example, if you write: +</p> +<pre class="programlisting"> +unit-test helpers_test + : helpers_test.cpp helpers + : <span class="bold"><strong><testing.launcher>valgrind</strong></span> + ; +</pre> +<p> + The command used to run the executable will be: +</p> +<pre class="screen"> +<span class="bold"><strong>valgrind</strong></span> bin/$toolset/debug/helpers_test +</pre> +<p> + </p> +</dd> +<dt><span class="term"><code class="literal">test-info</code></span></dt> +<dd><p> + A description of the test. This is displayed as part of the + <code class="literal">--dump-tests</code> command-line option. + </p></dd> +</dl></div> </div> <div class="section"> <div class="titlepage"><div><div><h3 class="title"> @@ -680,7 +714,7 @@ exe main : main.cpp pch ; <p> Please note the following: </p> -<div class="itemizedlist"><ul class="itemizedlist" type="disc"> +<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> <li class="listitem"><p> The inclusion of the precompiled header must be the first thing in a source file, before any code or preprocessor directives. @@ -748,7 +782,7 @@ exe app : app.cpp : <implicit-dependency>parser ; <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.tasks.crosscompile"></a>Cross-compilation</h3></div></div></div> -<a class="indexterm" name="id3999554"></a><p>Boost.Build supports cross compilation with the gcc and msvc +<a class="indexterm" name="idp547988592"></a><p>Boost.Build supports cross compilation with the gcc and msvc toolsets.</p> <p> When using gcc, you first need to specify your cross compiler @@ -786,13 +820,13 @@ b2 toolset=gcc-mingw <span class="bold"><strong>target-os=windows</strong></span </p> </div> <div class="footnotes"> -<br><hr width="100" align="left"> -<div class="footnote"><p><sup>[<a id="ftn.id3998650" href="#id3998650" class="para">12</a>] </sup>see the definition of "free" in <a class="xref" href="reference.html#bbv2.reference.features.attributes" title="Feature Attributes">the section called “Feature Attributes”</a>.</p></div> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.idp547875056" class="footnote"><p><a href="#idp547875056" class="para"><sup class="para">[15] </sup></a>see the definition of "free" in <a class="xref" href="reference.html#bbv2.reference.features.attributes" title="Feature Attributes">the section called “Feature Attributes”</a>.</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"><div class="copyright-footer">Copyright © 2006-2009 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. +<td align="right"><div class="copyright-footer">Copyright © 2006-2009, 2014 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> diff --git a/doc/html/bbv2/tutorial.html b/doc/html/bbv2/tutorial.html index 4a1fb9fd19..982d91d1c7 100644 --- a/doc/html/bbv2/tutorial.html +++ b/doc/html/bbv2/tutorial.html @@ -3,9 +3,9 @@ <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Tutorial</title> <link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> +<meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> -<link rel="up" href="../bbv2.html" title="Chapter 39. Boost.Build V2 User Manual"> +<link rel="up" href="../bbv2.html" title="Chapter 43. Boost.Build V2 User Manual"> <link rel="prev" href="installation.html" title="Installation"> <link rel="next" href="overview.html" title="Overview"> </head> @@ -25,7 +25,7 @@ <div class="section"> <div class="titlepage"><div><div><h2 class="title" style="clear: both"> <a name="bbv2.tutorial"></a>Tutorial</h2></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="tutorial.html#bbv2.tutorial.hello">Hello, world</a></span></dt> <dt><span class="section"><a href="tutorial.html#bbv2.tutorial.properties">Properties</a></span></dt> <dt><span class="section"><a href="tutorial.html#bbv2.tutorial.hierarchy">Project Hierarchies</a></span></dt> @@ -111,7 +111,7 @@ b2 --clean hello2 <div class="section"> <div class="titlepage"><div><div><h3 class="title"> <a name="bbv2.tutorial.properties"></a>Properties</h3></div></div></div> -<div class="toc"><dl> +<div class="toc"><dl class="toc"> <dt><span class="section"><a href="tutorial.html#bbv2.tutorial.properties.requirements">Build Requests and Target Requirements</a></span></dt> <dt><span class="section"><a href="tutorial.html#bbv2.tutorial.properties.project_attributes">Project Attributes</a></span></dt> </dl></div> @@ -203,7 +203,7 @@ exe hello requirements, the target requirements usually override (or, in the case of “free”” features like <code class="varname"><include></code>, - <sup>[<a name="id3992490" href="#ftn.id3992490" class="footnote">10</a>]</sup> + <a href="#ftn.idp547188496" class="footnote" name="idp547188496"><sup class="footnote">[13]</sup></a> augments) the build request. </p> <div class="tip"><table border="0" summary="Tip"> @@ -315,7 +315,7 @@ top/ in its requirements, then all of its subprojects will have it in their requirements, too. Of course, any project can add - include paths to those specified by its parents. <sup>[<a name="id3992753" href="#ftn.id3992753" class="footnote">11</a>]</sup> + include paths to those specified by its parents. <a href="#ftn.idp547216640" class="footnote" name="idp547216640"><sup class="footnote">[14]</sup></a> More details can be found in <a class="xref" href="overview.html#bbv2.overview.projects" title="Projects">the section called “Projects”</a>. </p> @@ -600,13 +600,13 @@ exe app <span class="special">:</span> app.cpp core <span class="special">;</spa </p> <pre class="programlisting"> lib network <span class="special">:</span> network.cpp - <span class="special">:</span> <span class="bold"><strong><link>shared:<define>NEWORK_LIB_SHARED</strong></span> + <span class="special">:</span> <span class="bold"><strong><link>shared:<define>NETWORK_LIB_SHARED</strong></span> <variant>release:<define>EXTRA_FAST <span class="special">;</span></pre> <p> In the example above, whenever <code class="filename">network</code> is built with - <code class="computeroutput"><link>shared</code>, <code class="computeroutput"><define>NEWORK_LIB_SHARED + <code class="computeroutput"><link>shared</code>, <code class="computeroutput"><define>NETWORK_LIB_SHARED </code> will be in its properties, too. Also, whenever its release variant is built, <code class="computeroutput"><define>EXTRA_FAST</code> will appear in its properties. @@ -711,11 +711,11 @@ lib pythonlib <span class="special">:</span> <span class="special">:</span> < </p> </div> <div class="footnotes"> -<br><hr width="100" align="left"> -<div class="footnote"><p><sup>[<a id="ftn.id3992490" href="#id3992490" class="para">10</a>] </sup> +<br><hr style="width:100; text-align:left;margin-left: 0"> +<div id="ftn.idp547188496" class="footnote"><p><a href="#idp547188496" class="para"><sup class="para">[13] </sup></a> See <a class="xref" href="reference.html#bbv2.reference.features.attributes" title="Feature Attributes">the section called “Feature Attributes”</a> </p></div> -<div class="footnote"><p><sup>[<a id="ftn.id3992753" href="#id3992753" class="para">11</a>] </sup>Many +<div id="ftn.idp547216640" class="footnote"><p><a href="#idp547216640" class="para"><sup class="para">[14] </sup></a>Many features will be overridden, rather than added-to, in subprojects. See <a class="xref" href="reference.html#bbv2.reference.features.attributes" title="Feature Attributes">the section called “Feature Attributes”</a> for more information</p></div> @@ -723,7 +723,7 @@ lib pythonlib <span class="special">:</span> <span class="special">:</span> < </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> -<td align="right"><div class="copyright-footer">Copyright © 2006-2009 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. +<td align="right"><div class="copyright-footer">Copyright © 2006-2009, 2014 Vladimir Prus<p>Distributed under the Boost Software License, Version 1.0. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> |