|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r79846 - in trunk/tools/build/v2: . doc/src
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-02 06:24:47
Author: jurko
Date: 2012-08-02 06:24:46 EDT (Thu, 02 Aug 2012)
New Revision: 79846
URL: http://svn.boost.org/trac/boost/changeset/79846
Log:
Minor stylistic code & comment changes.
Text files modified:
trunk/tools/build/v2/build-system.jam | 10 +-
trunk/tools/build/v2/build_system.py | 70 +++++++++---------
trunk/tools/build/v2/doc/src/overview.xml | 142 ++++++++++++++++++++--------------------
3 files changed, 112 insertions(+), 110 deletions(-)
Modified: trunk/tools/build/v2/build-system.jam
==============================================================================
--- trunk/tools/build/v2/build-system.jam (original)
+++ trunk/tools/build/v2/build-system.jam 2012-08-02 06:24:46 EDT (Thu, 02 Aug 2012)
@@ -2,7 +2,8 @@
# Copyright 2006, 2007 Rene Rivera
# Copyright 2003, 2004, 2005, 2006 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
# This file is part of Boost Build version 2. You can think of it as forming the
# main() routine. It is invoked by the bootstrapping code in bootstrap.jam.
@@ -805,7 +806,8 @@
# constituent action fails and regenerate the xml on every bjam run.
INCLUDES $(xml-file) : $(constituents) ;
ALWAYS $(xml-file) ;
- __ACTION_RULE__ on $(xml-file) = build-system.out-xml.generate-action ;
+ __ACTION_RULE__ on $(xml-file) =
+ build-system.out-xml.generate-action ;
out-xml.generate $(xml-file) ;
}
@@ -973,8 +975,8 @@
{
$(.post-build-hook) $(ok) ;
}
- # Prevent automatic update of the 'all' target, now that
- # we have explicitly updated what we wanted.
+ # Prevent automatic update of the 'all' target, now that we have
+ # explicitly updated what we wanted.
UPDATE ;
}
else
Modified: trunk/tools/build/v2/build_system.py
==============================================================================
--- trunk/tools/build/v2/build_system.py (original)
+++ trunk/tools/build/v2/build_system.py 2012-08-02 06:24:46 EDT (Thu, 02 Aug 2012)
@@ -2,12 +2,12 @@
# and some FIXME.
# Base revision: 64351
-# Copyright 2003, 2005 Dave Abrahams
-# Copyright 2006 Rene Rivera
-# Copyright 2003, 2004, 2005, 2006, 2007 Vladimir Prus
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
-
+# Copyright 2003, 2005 Dave Abrahams
+# Copyright 2006 Rene Rivera
+# Copyright 2003, 2004, 2005, 2006, 2007 Vladimir Prus
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
from b2.build.engine import Engine
@@ -94,7 +94,7 @@
default_toolset = toolset
default_toolset_version = version
-
+
pre_build_hook = []
def add_pre_build_hook(callable):
@@ -188,7 +188,7 @@
if where:
where = os.path.realpath(where)
-
+
if debug_config:
print "notice: Loading '%s' configuration file '%s' from '%s'." \
% (module_name, filename, where)
@@ -200,7 +200,7 @@
attributes = get_manager().projects().attributes(module_name) ;
attributes.set('source-location', os.path.dirname(where), True)
get_manager().projects().load_standalone(module_name, where)
-
+
else:
msg = "Configuration file '%s' not found in '%s'." % (filename, path)
if must_find:
@@ -215,16 +215,16 @@
#
# -- test-config --
# Loaded only if specified on the command-line using the --test-config
-# command-line parameter. It is ok for this file not to exist even if specified.
-# If this configuration file is loaded, regular site and user configuration
-# files will not be. If a relative path is specified, file is searched for in
-# the current folder.
+# command-line parameter. It is ok for this file not to exist even if
+# specified. If this configuration file is loaded, regular site and user
+# configuration files will not be. If a relative path is specified, file is
+# searched for in the current folder.
#
# -- site-config --
# Always named site-config.jam. Will only be found if located on the system
-# root path (Windows), /etc (non-Windows), user's home folder or the Boost Build
-# path, in that order. Not loaded in case the test-config configuration file is
-# loaded or the --ignore-site-config command-line option is specified.
+# root path (Windows), /etc (non-Windows), user's home folder or the Boost
+# Build path, in that order. Not loaded in case the test-config configuration
+# file is loaded or the --ignore-site-config command-line option is specified.
#
# -- user-config --
# Named user-config.jam by default or may be named explicitly using the
@@ -240,7 +240,7 @@
# internal unit testing system but may be used freely in other places as well.
#
def load_configuration_files():
-
+
# Flag indicating that site configuration should not be loaded.
ignore_site_config = "--ignore-site-config" in sys.argv
@@ -287,12 +287,12 @@
if user_config is None:
user_config = os.getenv("BOOST_BUILD_USER_CONFIG")
-
+
# Special handling for the case when the OS does not strip the quotes
# around the file name, as is the case when using Cygwin bash.
user_config = b2.util.unquote(user_config)
explicitly_requested = user_config
-
+
if user_config is None:
user_config = "user-config.jam"
@@ -300,18 +300,18 @@
if explicitly_requested:
user_config = os.path.abspath(user_config)
-
+
if debug_config:
print "notice: Loading explicitly specified user configuration file:"
print " " + user_config
-
+
load_config('user-config', os.path.basename(user_config), [os.path.dirname(user_config)], True)
else:
load_config('user-config', os.path.basename(user_config), user_path)
else:
if debug_config:
print "notice: User configuration file loading explicitly disabled."
-
+
# We look for project-config.jam from "." upward.
# I am not sure this is 100% right decision, we might as well check for
# it only alonside the Jamroot file. However:
@@ -343,7 +343,7 @@
for e in option.split(',')]
for t in option_toolsets + feature_toolsets:
-
+
# Parse toolset-version/properties.
(toolset_version, toolset, version) = re.match("(([^-/]+)-?([^/]+)?)/?.*", t).groups()
@@ -447,7 +447,7 @@
debug_config = "--debug-configuration" in sys.argv
out_xml = any(re.match("^--out-xml=(.*)$", a) for a in sys.argv)
-
+
engine = Engine()
global_build_dir = option.get("build-dir")
@@ -490,11 +490,11 @@
dt = "gcc"
if os.name == 'nt':
dt = "msvc"
- # FIXME:
+ # FIXME:
#else if [ os.name ] = MACOSX
#{
# default-toolset = darwin ;
- #}
+ #}
print "warning: No toolsets are configured."
print "warning: Configuring default toolset '%s'." % dt
@@ -573,13 +573,13 @@
targets = [projects.target(projects.module_name("."))]
# FIXME: put this BACK.
-
- ## if [ option.get dump-generators : : true ]
+
+ ## if [ option.get dump-generators : : true ]
## {
## generators.dump ;
## }
-
+
# We wish to put config.log in the build directory corresponding
# to Jamroot, so that the location does not differ depending on
# directory where we do build. The amount of indirection necessary
@@ -601,7 +601,7 @@
# and any of their dependants.
for p in expanded:
manager.set_command_line_free_features(property_set.create(p.free()))
-
+
for t in targets:
try:
g = t.generate(p)
@@ -610,7 +610,7 @@
virtual_targets.extend(g.targets())
except ExceptionWithUserContext, e:
e.report()
- except Exception:
+ except Exception:
raise
# Convert collected virtual targets into actual raw Jam targets.
@@ -791,7 +791,7 @@
## __ACTION_RULE__ = build-system.out-xml.collect
## [ modules.peek build-system : .out-xml ] ;
## }
-
+
## IMPORT
## build-system :
## out-xml.collect
@@ -805,7 +805,7 @@
j = option.get("jobs")
if j:
bjam.call("set-variable", PARALLELISM, j)
-
+
k = option.get("keep-going", "true", "true")
if k in ["on", "yes", "true"]:
bjam.call("set-variable", "KEEP_GOING", "1")
@@ -814,7 +814,7 @@
else:
print "error: Invalid value for the --keep-going option"
sys.exit()
-
+
# The 'all' pseudo target is not strictly needed expect in the case when we
# use it below but people often assume they always have this target
# available and do not declare it themselves before use which may cause
@@ -851,7 +851,7 @@
if post_build_hook:
post_build_hook(ok)
# Prevent automatic update of the 'all' target, now that
- # we have explicitly updated what we wanted.
+ # we have explicitly updated what we wanted.
bjam.call("UPDATE")
if manager.errors().count() == 0:
Modified: trunk/tools/build/v2/doc/src/overview.xml
==============================================================================
--- trunk/tools/build/v2/doc/src/overview.xml (original)
+++ trunk/tools/build/v2/doc/src/overview.xml 2012-08-02 06:24:46 EDT (Thu, 02 Aug 2012)
@@ -21,7 +21,7 @@
<orderedlist>
<listitem>
<para>
- 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 <xref linkend=
"bbv2.reference.init"/>
</para>
@@ -98,11 +98,11 @@
g++ -o a.o -g a.c
</programlisting>
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.
</para>
<para>
- 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:
<programlisting>
add_program ("a", "a.c")
@@ -112,7 +112,7 @@
different command lines may be used. However, <code>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.
</para>
<para>
@@ -121,7 +121,7 @@
<indexterm> <primary>main target</primary> <see>metataget</see> </indexterm>
<firstterm>metatarget</firstterm>—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.
</para>
<para>
@@ -154,7 +154,7 @@
<para>
The final concept is <indexterm><primary>property</primary><secondary>propagation</secondary></indexterm>
<firstterm>property propagation</firstterm>. 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 <xref linkend="bbv2.overview.targets.requirements"/>).
@@ -163,10 +163,10 @@
maybe in turn modify build properties and have dependencies of their own.
</para>
- <para>For a more in-depth treatment of the requirements and concepts, you may refer
+ <para>For a more in-depth treatment of the requirements and concepts, you may refer
to <ulink url="http://syrcose.ispras.ru/2009/files/04_paper.pdf">SYRCoSE 2009 Boost.Build article</ulink>.
</para>
-
+
</section>
<section id="bbv2.overview.jam_language">
@@ -384,7 +384,7 @@
<title>Configuration</title>
<para>
- On startup, Boost.Build searches and reads two configuration files:
+ On startup, Boost.Build searches and reads two configuration files:
<filename>site-config.jam</filename> and <filename>user-config.jam</filename>.
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
@@ -392,49 +392,49 @@
directory and edit the copy. The following table explains where both files
are searched.
</para>
-
+
<table id="bbv2.reference.init.config">
<title>Search paths for configuration files</title>
-
+
<tgroup cols="3">
<thead>
-
+
<row>
<entry></entry>
-
+
<entry>site-config.jam</entry>
-
+
<entry>user-config.jam</entry>
</row>
-
+
</thead>
<tbody>
-
+
<row>
<entry>Linux</entry>
-
+
<entry>
<simpara><code>/etc</code></simpara>
<simpara><code>$HOME</code></simpara>
<simpara><code>$BOOST_BUILD_PATH</code></simpara>
</entry>
-
+
<entry>
<simpara><code>$HOME</code></simpara>
<simpara><code>$BOOST_BUILD_PATH</code></simpara>
</entry>
</row>
-
+
<row>
<entry>Windows</entry>
-
+
<entry>
<simpara><code>%SystemRoot%</code></simpara>
<simpara><code>%HOMEDRIVE%%HOMEPATH%</code></simpara>
<simpara><code>%HOME%</code></simpara>
<simpara><code>%BOOST_BUILD_PATH%</code></simpara>
</entry>
-
+
<entry>
<simpara><code>%HOMEDRIVE%%HOMEPATH%</code></simpara>
<simpara><code>%HOME%</code></simpara>
@@ -444,8 +444,8 @@
</tbody>
</tgroup>
</table>
-
- <tip>
+
+ <tip>
<para>
You can use the <command>--debug-configuration</command> option to
find which configuration files are actually loaded.
@@ -552,7 +552,7 @@
Many of toolsets have an <parameter class="function">options</parameter>
parameter to fine-tune the configuration. All of
Boost.Build's standard compiler toolsets accept four options
- <varname>cflags</varname>, <varname>cxxflags</varname>,
+ <varname>cflags</varname>, <varname>cxxflags</varname>,
<varname>compileflags</varname> and <varname>linkflags</varname> as <parameter
class="function">options</parameter> specifying flags that will be
always passed to the corresponding tools. Values of the
@@ -604,7 +604,7 @@
<varlistentry>
<term>target</term>
- <listitem><para>All tokens that are neither options nor properties specify
+ <listitem><para>All tokens that are neither options nor properties specify
what targets to build. The available targets entirely depend on the project
you are building.</para></listitem>
</varlistentry>
@@ -612,7 +612,7 @@
<section id="bbv2.overview.invocation.examples">
<title>Examples</title>
-
+
<para>To build all targets defined in the Jamfile in the current directory with the default properties, run:
<screen>
b2
@@ -635,7 +635,7 @@
<section id="bbv2.overview.invocation.options">
<title>Options</title>
-
+
<para>Boost.Build recognizes the following command line options.</para>
<variablelist>
@@ -649,7 +649,7 @@
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term><option>--clean</option></term>
<listitem>
@@ -659,7 +659,7 @@
together with target names to clean specific targets.</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term><option>--clean-all</option></term>
<listitem>
@@ -669,7 +669,7 @@
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term><option>--build-dir</option></term>
<listitem>
@@ -680,13 +680,13 @@
specified in Jamroot, and the build dir specified in Jamroot
(or <literal>bin</literal>, if none is specified).
</para>
-
+
<para>The option is primarily useful when building from read-only
media, when you can't modify Jamroot.
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term><option>--version</option></term>
<listitem>
@@ -724,7 +724,7 @@
<para>Run up to <replaceable>N</replaceable> commands in parallel.</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term><option>--debug-configuration</option></term>
<listitem>
@@ -732,7 +732,7 @@
and toolset files.</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term><option>--debug-building</option></term>
<listitem>
@@ -740,7 +740,7 @@
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term><option>--debug-generators</option></term>
<listitem>
@@ -749,7 +749,7 @@
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term><option>-d0</option></term>
<listitem>
@@ -760,7 +760,7 @@
<varlistentry>
<term><option>-d <replaceable>N</replaceable></option></term>
<listitem>
- <para>Enable cummulative debugging levels from 1 to n. Values are:
+ <para>Enable cummulative debugging levels from 1 to n. Values are:
<orderedlist>
<listitem>Show the actions taken for building targets, as they are executed (the default).</listitem>
<listitem>Show "quiet" actions and display all action text, as they are executed.</listitem>
@@ -814,53 +814,53 @@
<para>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
<command><replaceable>feature</replaceable>=<replaceable>value</replaceable></command>.
- The complete list of features can be found in <xref linkend="bbv2.overview.builtins.features"/>.
+ The complete list of features can be found in <xref linkend="bbv2.overview.builtins.features"/>.
The most common features are summarized below.</para>
<table>
<tgroup cols="3">
<thead>
-
+
<row>
<entry>Feature</entry>
-
+
<entry>Allowed values</entry>
-
+
<entry>Notes</entry>
</row>
-
+
</thead>
<tbody>
-
+
<row>
<entry>variant</entry>
-
+
<entry>debug,release</entry>
-
+
<entry></entry>
</row>
<row>
<entry>link</entry>
-
+
<entry>shared,static</entry>
-
+
<entry>Determines if Boost.Build creates shared or static libraries</entry>
</row>
<row>
<entry>threading</entry>
-
+
<entry>single,multi</entry>
-
+
<entry>Cause the produced binaries to be thread-safe. This requires proper support in the source code itself.</entry>
</row>
<row>
<entry>address-model</entry>
-
+
<entry>32,64</entry>
-
+
<entry>Explicitly request either 32-bit or 64-bit code generation. This typically
requires that your compiler is appropriately configured. Please refer to
<xref linkend="bbv2.reference.tools.compilers"/> and your compiler documentation
@@ -869,75 +869,75 @@
<row>
<entry>toolset</entry>
-
+
<entry>(Depends on configuration)</entry>
-
+
<entry>The C++ compiler to use. See <xref linkend="bbv2.reference.tools.compilers"/> for a detailed list.</entry>
</row>
<row>
<entry>include</entry>
-
+
<entry>(Arbitrary string)</entry>
-
+
<entry>Additional include paths for C and C++ compilers.</entry>
</row>
<row>
<entry>define</entry>
-
+
<entry>(Arbitrary string)</entry>
-
+
<entry>Additional macro definitions for C and C++ compilers. The string should be either
<code>SYMBOL</code> or <code>SYMBOL=VALUE</code></entry>
</row>
<row>
<entry>cxxflags</entry>
-
+
<entry>(Arbitrary string)</entry>
-
+
<entry>Custom options to pass to the C++ compiler.</entry>
</row>
<row>
<entry>cflags</entry>
-
+
<entry>(Arbitrary string)</entry>
-
+
<entry>Custom options to pass to the C compiler.</entry>
</row>
<row>
<entry>linkflags</entry>
-
+
<entry>(Arbitrary string)</entry>
-
+
<entry>Custom options to pass to the C++ linker.</entry>
</row>
<row>
<entry>runtime-link</entry>
-
+
<entry>shared,static</entry>
-
+
<entry>Determines if shared or static version of C and C++ runtimes should be used.</entry>
</row>
-
+
</tbody>
- </tgroup>
+ </tgroup>
</table>
<para>If you have more than one version of a given C++ toolset (e.g. configured in
<filename>user-config.jam</filename>, or autodetected, as happens with msvc), you can
- request the specific version by passing
+ request the specific version by passing
<code><replaceable>toolset</replaceable>-<replaceable>version</replaceable></code> as
the value of the <code>toolset</code> feature, for example <code>toolset=msvc-8.0</code>.
</para>
<para>
- 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. <!-- define 'base' and link to it -->
In which case, everything will be built several times --
once for each specified value of a feature. For example, if you use
@@ -946,7 +946,7 @@
b2 link=static link=shared threading=single threading=multi
</screen>
<para>
- 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:
</para>
@@ -960,7 +960,7 @@
b2 include=static,shared
</screen>
<para>is not treated specially.</para>
-
+
</section>
<section id="bbv2.overview.invocation.targets">
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk