summaryrefslogtreecommitdiff
path: root/doc/html/bbv2/advanced/differences_to_v1.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/bbv2/advanced/differences_to_v1.html')
-rw-r--r--doc/html/bbv2/advanced/differences_to_v1.html138
1 files changed, 138 insertions, 0 deletions
diff --git a/doc/html/bbv2/advanced/differences_to_v1.html b/doc/html/bbv2/advanced/differences_to_v1.html
new file mode 100644
index 0000000000..715fa28afc
--- /dev/null
+++ b/doc/html/bbv2/advanced/differences_to_v1.html
@@ -0,0 +1,138 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Differences to Boost.Build V1</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
+<style type="text/css">
+body { background-image: url('http://docbook.sourceforge.net/release/images/draft.png');
+ background-repeat: no-repeat;
+ background-position: top left;
+ /* The following properties make the watermark "fixed" on the page. */
+ /* I think that's just a bit too distracting for the reader... */
+ /* background-attachment: fixed; */
+ /* background-position: center center; */
+ }</style>
+<link rel="start" href="../../index.html" title="The Boost C++ Libraries">
+<link rel="up" href="../advanced.html" title="Chapter 24. User documentation">
+<link rel="prev" href="builtins/features.html" title="Builtin features">
+<link rel="next" href="../extender.html" title="Chapter 25. Extender Manual">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%">
+<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../../../boost.png"></td>
+<td align="center"><a href="../../../../index.htm">Home</a></td>
+<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
+<td align="center"><a href="../../../../people/people.htm">People</a></td>
+<td align="center"><a href="../../../../more/faq.htm">FAQ</a></td>
+<td align="center"><a href="../../../../more/index.htm">More</a></td>
+</table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="builtins/features.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../advanced.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../extender.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="bbv2.advanced.differences_to_v1"></a>Differences to Boost.Build V1</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="differences_to_v1.html#bbv2.advanced.differences_to_v1.configuration">Configuration</a></span></dt>
+<dt><span class="section"><a href="differences_to_v1.html#bbv2.advanced.differences_to_v1.jamfiles">Writing Jamfiles</a></span></dt>
+<dt><span class="section"><a href="differences_to_v1.html#bbv2.advanced.differences_to_v1.build_process">Build process</a></span></dt>
+</dl></div>
+<p>While Boost.Build V2 is based on the same ideas as Boost.Build V1,
+ some of the syntax was changed, and some new important features were
+ added. This chapter describes most of the changes.</p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bbv2.advanced.differences_to_v1.configuration"></a>Configuration</h3></div></div></div>
+<p>In V1, there were two methods to configure a toolset. One was to
+ set some environment variable, or use the <code class="option">-s</code> command line option to set
+ a variable inside BJam.
+
+ Another method was to create a new toolset module that would set
+ the variables and then invoke the base toolset. Neither method
+ is necessary now: the <code class="computeroutput">using</code> rule provides a consistent way to
+ initialize a toolset,
+
+ including several versions. See <a href="../advanced.html#bbv2.advanced.configuration" title="Configuration">the section called &#8220;Configuration&#8221;</a> for details.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bbv2.advanced.differences_to_v1.jamfiles"></a>Writing Jamfiles</h3></div></div></div>
+<p>Probably one of the most important differences in V2 Jamfiles is
+ the use of project requirements. In V1, if several targets had the same
+ requirements (for example, a common <code class="computeroutput">#include</code> path), it was necessary to
+ manually write the requirements or use a helper rule or template target. In V2, the
+ common properties can be specified with the <code class="computeroutput">requirements</code> project
+ attribute, as documented in <a href="jamfiles.html#bbv2.advanced.projects" title="Projects">the section called &#8220;Projects&#8221;</a>.
+ </p>
+<p><a href="../tutorial/libs.html" title="Dependent Targets">Usage requirements</a>
+ also help to simplify Jamfiles.
+
+ If a library requires
+ all clients to use specific <code class="computeroutput">#include</code> paths or macros when compiling
+ code that depends on the library, that information can be cleanly
+ represented.</p>
+<p>The difference between <code class="computeroutput">lib</code> and <code class="computeroutput">dll</code> targets in V1 is completely
+ eliminated in V2. There's only one library target type, <code class="computeroutput">lib</code>, which can create
+ either static or shared libraries depending on the value of the
+ <a href="builtins/features.html#bbv2.advanced.builtins.features.link"><code class="varname">&lt;link&gt;</code>
+ feature</a>. If your target should be only built in one way, you
+ can add <code class="computeroutput">&lt;link&gt;shared</code> or <code class="computeroutput">&lt;link&gt;static</code> to its requirements.
+ </p>
+<p>The syntax for referring to other targets was changed a bit. While
+ in V1 one would use:
+</p>
+<pre class="programlisting">
+exe a : a.cpp &lt;lib&gt;../foo/bar ;
+</pre>
+<p>
+ the V2 syntax is:
+</p>
+<pre class="programlisting">
+exe a : a.cpp ../foo//bar ;
+</pre>
+<p>
+ Note that you don't need to specify the type of other target, but the
+ last element should be separated from the others by a double slash to indicate that
+ you're referring to target <code class="filename">bar</code> in project <code class="filename">../foo</code>, and not to
+ project <code class="filename">../foo/bar</code>.
+ </p>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="bbv2.advanced.differences_to_v1.build_process"></a>Build process</h3></div></div></div>
+<p>The command line syntax in V2 is completely different. For example
+</p>
+<pre class="programlisting">
+bjam -sTOOLS=msvc -sBUILD=release some_target
+</pre>
+<p>
+ now becomes:
+</p>
+<pre class="programlisting">
+bjam toolset=msvc variant=release some_target
+</pre>
+<p>
+ or, using implicit features, just:
+</p>
+<pre class="programlisting">
+bjam msvc release some_target
+</pre>
+<p>
+ See <a href="../reference.html#bbv2.reference.commandline" title="Command line">the reference</a> for a
+ complete description of the syntax.
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><small></small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="builtins/features.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../advanced.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../extender.html"><img src="../../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>