2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-21 02:52:12 +00:00

Marge from trunk.

[SVN r33805]
This commit is contained in:
Vladimir Prus
2006-04-25 10:13:39 +00:00
parent d8173f8fd5
commit 66b2d00cc2
6 changed files with 77 additions and 76 deletions

View File

@@ -42,7 +42,7 @@
</para>
<para>So, to be able to successfully use Boost.Build, you need to know only
three things:
four things:
<itemizedlist>
<listitem>
<para><link linkend="bbv2.advanced.configuration">
@@ -57,7 +57,7 @@
How the build process works</link></para>
</listitem>
<listitem>
<para>Some Basics about the Boost.Jam language. See the
<para>Some Basics about the Boost.Jam language. See also the
<ulink
url="http://www.boost.org/tools/jam/index.html">Boost.Jam</ulink>
documentation.
@@ -150,8 +150,8 @@ x = [ helper 1 : 2 : 3 ] ;</programlisting>
result of the call must be used inside some expression, you need to add
brackets around the call, like shown on the second line.
<programlisting>
if cond { statements } [ else statement ]</programlisting>
Regular if-statement. The condition is composed of:
if cond { statements } [ else { statements } ]</programlisting>
This is a regular if-statement. The condition is composed of:
<itemizedlist>
<listitem><para>Literals (true if at least one string is not empty)</para></listitem>
<listitem><para>Comparisons: <code>a
@@ -184,11 +184,11 @@ return values ;
rule test ( )
{
if 1 = 1 {
return "resonable" ;
return "reasonable" ;
}
return "strange" ;
}</programlisting> will return <literal>strange</literal>, not
<literal>resonable</literal>.
<literal>reasonable</literal>.
</para></warning>
<programlisting>
@@ -251,8 +251,8 @@ actions create-file-from-another
<title>Configuration</title>
<para>The Boost.Build configuration is specified in the file
<filename>user-config.jam</filename>. You can edit the one in top-level
directory of Boost.Build installation create a copy in your home directory
<filename>user-config.jam</filename>. You can edit the one in the top-level
directory of Boost.Build installation or create a copy in your home directory
and edit that. (See <xref linkend="bbv2.reference.init.config"/> for the
exact search paths.) The primary function of that file is to declare which
compilers and other tools are available. The simplest syntax to configure
@@ -452,7 +452,7 @@ bjam optimization=space
<listitem>
<para>Changes build directories for all project roots being built. When
this option is specified, all Jamroot files should declare project name.
The build directory for the project root will be computed by contanating
The build directory for the project root will be computed by concatanating
the value of the <option>--build-dir</option> option, the project name
specified in Jamroot, and the build dir specified in Jamroot
(or <literal>bin</literal>, if none is specified).
@@ -699,7 +699,7 @@ exe c : c.cpp /boost/program_options//program_options ;
</section>
<section>
<section id="bbv2.advanced.targets.requirements">
<title>Requirements</title>
<para>Requirements are the properties that should always be present when
building a target. Typically, they are includes and defines:
@@ -964,7 +964,7 @@ project tennis
<entry><literal>build-dir</literal></entry>
<entry>Empty if the parent has no build directory set.
Otherwise, the parent's build directory with with the
Otherwise, the parent's build directory with the
relative path from parent to the current project
appended to it.
</entry>
@@ -998,7 +998,7 @@ project tennis
called <filename>Jamroot</filename> rather than
<filename>Jamfile</filename>. When loading a project,
Boost.Build looks for either <filename>Jamroot</filename> or
<code>Jamfile</code>. They are handled indentically, except
<code>Jamfile</code>. They are handled identically, except
that if the file is called <filename>Jamroot</filename>, the
search for a parent project is not performed.
</para>
@@ -1171,7 +1171,7 @@ bjam app1 lib1//lib1 gcc debug optimization=full
<section><title>Building a main target</title>
<para>When you request, directly or indirectly, a build of a main target
with specific requirements, the following steps are made. Some brief
with specific requirements, the following steps are done. Some brief
explanation is provided, and more details are given in <xref
linkend="bbv2.reference.buildprocess"/>.
<orderedlist>
@@ -1406,7 +1406,7 @@ lib aux : : &lt;name&gt;aux ;
</programlisting>
</para>
<para>When a library uses another library you should put that another
<para>When a library uses another library you should put that other
library in the list of sources. This will do the right thing in all
cases. For portability, you should specify library dependencies even
for searched and prebuilt libraries, othewise, static linking on
@@ -1477,15 +1477,15 @@ lib a : a.cpp : &lt;use&gt;b : : &lt;library&gt;b ;
<para>
The <functionname>alias</functionname> rule gives alternative name to
a group of targets. For example, to give name
a group of targets. For example, to give the name
<filename>core</filename> to a group of three other targets with the
following code:
<programlisting>
alias core : im reader writer ;</programlisting>
Using <filename>core</filename> on the command line, or in source list
Using <filename>core</filename> on the command line, or in the source list
of any other target is the same as explicitly using
<filename>im</filename>, <filename>reader</filename>, and
<filename>writer</filename>, just more convenient.
<filename>writer</filename>, but it is just more convenient.
</para>
@@ -1539,7 +1539,7 @@ install dist : hello helpers : &lt;location&gt;/usr/bin ;
</programlisting>
While you can achieve the same effect by changing the target name to
<filename>/usr/bin</filename>, using the <code>location</code>
property is better, because it allows you to use a memnonic target
property is better, because it allows you to use a mnemonic target
name.
</para>
@@ -1565,7 +1565,7 @@ install dist : hello
;
</programlisting>
will find all targets that <code>hello</code> depends on, and install
all of the which are either executables or libraries. More
all of those which are either executables or libraries. More
specifically, for each target, other targets that were specified as
sources or as dependency properties, will be recursively found. One
exception is that targets referred with the <link
@@ -1580,7 +1580,7 @@ install dist : hello
rule can be used when targets must be installed into several
directories:
<programlisting>
install install : install-bin install-lib ;
alias install : install-bin install-lib ;
install install-bin : applications : /usr/bin ;
install install-lib : helper : /usr/lib ;
</programlisting>
@@ -1589,7 +1589,7 @@ install install-lib : helper : /usr/lib ;
<para>Because the <code>install</code> rule just copies targets, most
free features <footnote><para>see the definition of "free" in <xref
linkend="bbv2.reference.features.attributes"/>.</para></footnote>
have no effect when used in requirements of the <code>install</code>.
have no effect when used in requirements of the <code>install</code> rule.
The only two which matter are
<link linkend="bbv2.builtin.features.dependency">
<varname>dependency</varname></link> and, on Unix,
@@ -1895,9 +1895,9 @@ actions echo
<listitem>
<simpara>
The value of those features is passed without modification to the
corresponding tools. For <code>cflags</code> that's both C and C++
compilers, for <code>cxxflags</code> that's C++ compiler and for
<code>linkflags</code> that's linker. The features are handy when
corresponding tools. For <code>cflags</code> that's both the C and C++
compilers, for <code>cxxflags</code> that's the C++ compiler and for
<code>linkflags</code> that's the linker. The features are handy when
you're trying to do something special that cannot be achieved by
higher-level feature in Boost.Build.
</simpara>
@@ -1908,7 +1908,7 @@ actions echo
<listitem>
<simpara>
The <code>&lt;warnings&gt;</code> feature controls warning level of compilers. It has the following values:
The <code>&lt;warnings&gt;</code> feature controls the warning level of compilers. It has the following values:
<itemizedlist>
<listitem><para><code>off</code> - disables all warnings.</para></listitem>
<listitem><para><code>on</code> - enables default warning level for the tool.</para></listitem>
@@ -1923,8 +1923,8 @@ actions echo
<listitem>
<simpara>
The <code>&lt;warnings-as-errors&gt;</code> makes it possible treat warnings as errors and abort
compilation on warning. The value <code>on</code> enables this behaviour. The default value is
The <code>&lt;warnings-as-errors&gt;</code> makes it possible to treat warnings as errors and abort
compilation on a warning. The value <code>on</code> enables this behaviour. The default value is
<code>off</code>.
</simpara>
</listitem>

View File

@@ -160,8 +160,8 @@ type.register PLUGIN : : SHARED_LIB ;
properties of the base type - in particular generators and suffix.
Typically, you'll change the new type in some way. For example, using
<code>type.set-generated-target-suffix</code> you can set the suffix for
the new type. Or you can write special generator for the new type. For
example, it can generate additional metainformation for plugin.
the new type. Or you can write special a generator for the new type. For
example, it can generate additional metainformation for the plugin.
In either way, the <code>PLUGIN</code> type can be used whenever
<code>SHARED_LIB</code> can. For example, you can directly link plugins
to an application.
@@ -195,7 +195,7 @@ class verbatim-scanner : common-scanner
All the complex logic is in the <code>common-scanner</code>
class, and you only need to override the method that returns
the regular expression to be used for scanning. The
paranthethis in the regular expression indicate which part
parentheses in the regular expression indicate which part
of the string is the name of the included file. Only the
first parenthesized group in the regular expression will be
recognized; if you can't express everything you want that
@@ -212,7 +212,7 @@ scanner.register verbatim-scanner : include ;
of paths that should be searched for the included files.
</para>
<para>Finally, we assign the new scaner to the <code>VERBATIM</code>
<para>Finally, we assign the new scanner to the <code>VERBATIM</code>
target type:
<programlisting>
type.set-scanner VERBATIM : verbatim-scanner ;
@@ -233,7 +233,7 @@ type.set-scanner VERBATIM : verbatim-scanner ;
<para>For each additional tool, a Boost.Build object called generator
must be created. That object has specific types of targets that it
accepts an produces. Using that information, Boost.Build is able
accepts and produces. Using that information, Boost.Build is able
to automatically invoke the generator. For example, if you declare a
generator that takes a target of the type <literal>D</literal> and
produces a target of the type <literal>OBJ</literal>, when placing a
@@ -270,7 +270,7 @@ actions inline-file
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,
in above example, the "inline-file" actions block will be use to
in above example, the "inline-file" actions block will be used to
convert the source into the target.
</para>
@@ -293,7 +293,7 @@ generators.register-composing mex.mex : CPP LIB : MEX ;
is a composing generator corresponding to the proper linker.
</para>
<para>You should also know about two specific function for registering
<para>You should also know about two specific functions for registering
generators: <code>generators.register-c-compiler</code> and
<code>generators.register-linker</code>. The first sets up header
dependecy scanning for C files, and the seconds handles various
@@ -306,7 +306,7 @@ generators.register-composing mex.mex : CPP LIB : MEX ;
<bridgehead>Custom generator classes</bridgehead>
<para>The standard generators allows you to specify source and target
types, action, and a set of flags. If you need anything more complex,
types, an action, and a set of flags. If you need anything more complex,
<!-- What sort of flags? Command-line flags? What does the system do with them? -->
you need to create a new generator class with your own logic. Then,
you have to create an instance of that class and register it. Here's
@@ -332,7 +332,7 @@ generators.register
<para>There are two methods of interest. The <code>run</code> method is
responsible for the overall process - it takes a number of source targets,
converts them the the right types, and creates the result. The
converts them to the right types, and creates the result. The
<code>generated-targets</code> method is called when all sources are
converted to the right types to actually create the result.
</para>
@@ -344,7 +344,7 @@ generators.register
suppose you have a program analysis tool that should be given a
name of executable and the list of all sources. Naturally, you
don't want to list all source files manually. Here's how the
<code>generated-target</code> method can find the list of
<code>generated-targets</code> method can find the list of
sources automatically:
<programlisting>
class itrace-generator : generator {
@@ -375,13 +375,13 @@ generators.register [ new itrace-generator nm.itrace : EXE : ITRACE ] ;
</para>
<para>The <code>run</code> method can be overriden to completely
customize the way generator works. In particular, the conversion of
customize the way the generator works. In particular, the conversion of
sources to the desired types can be completely customized. Here's
another real example. Tests for the Boost Python library usually
consist of two parts: a Python program and a C++ file. The C++ file is
compiled to Python extension that is loaded by the Python
program. But in the likely case that both files have the same name,
the created Python extension must be renamed. Otherwise, Python
the created Python extension must be renamed. Otherwise, the Python
program will import itself, not the extension. Here's how it can be
done:
<programlisting>
@@ -462,7 +462,7 @@ actions inline-file
We first define a new feature. Then, the <code>flags</code> invocation
says that whenever verbatin.inline-file action is run, the value of
the <code>verbatim-options</code> feature will be added to the
<code>OPTIONS</code> variable, an can be used inside the action body.
<code>OPTIONS</code> variable, and can be used inside the action body.
You'd need to consult online help (--help) to find all the features of
the <code>toolset.flags</code> rule.
<!-- It's been a while since I wrote these notes, so I don't
@@ -534,7 +534,7 @@ actions inline-file
<itemizedlist>
<listitem><para>if a feature has several values<!-- what do you mean by that?? --> and
significally affects the build, make it “propagated,” so that the
significantly affects the build, make it “propagated,” so that the
whole project is built with the same value by
default</para></listitem>
@@ -635,7 +635,7 @@ actions link bind DEF_FILE
targets in general, only source files." I'm not sure
what I meant by that; maybe you can figure it out. -->
<para>
We've almost done, but should stop for a small workaround. Add the following
We are almost done, but we should stop for a small workaround. Add the following
code to msvc.jam
<programlisting>
@@ -655,7 +655,7 @@ rule link
<bridgehead>Variants and composite features.</bridgehead>
<para>Sometimes you want to create a shorcut for some set of
<para>Sometimes you want to create a shortcut for some set of
features. For example, <code>release</code> is a value of
<code>&lt;variant&gt;</code> and is a shortcut for a set of features.
</para>
@@ -685,7 +685,7 @@ feature.compose &lt;parallelism&gt;fake : &lt;library&gt;/mpi//fake/&lt;parallel
</programlisting>
<!-- The use of the <library>/mpi//mpi/<parallelism>none construct
above is at best confusing and unexplained -->
This will allow you to specify value of feature
This will allow you to specify the value of feature
<code>parallelism</code>, which will expand to link to the necessary
library.
</para>
@@ -807,7 +807,7 @@ time g++
<!-- Is this meant to be a single command? If not, insert "or" -->
</programlisting>
as the command. Second, while some tools have a logical
"installation root", it's better if user doesn't have to remember whether
"installation root", it's better if the user doesn't have to remember whether
a specific tool requires a full command or a path.
<!-- But many tools are really collections: e.g. a
compiler, a linker, and others. The idea that the

View File

@@ -46,7 +46,7 @@ boost-build build-system ;
definitions, loads two files, which can be provided/customised by
user: <filename>site-config.jam</filename> and <filename>user-config.jam</filename>.</para>
<para>Locations where those files a search are summarized below:</para>
<para>Locations where those files are searched are summarized below:</para>
<table id="bbv2.reference.init.config">
<title>Search paths for configuration files</title>
@@ -175,7 +175,7 @@ borland/runtime-link=static,dynamic
taking all possible combinations
<!-- Be specific. Do you mean the cross-product? -->
of the property sets. Each split
part should have the either the form
part should have either the form
<programlisting>
<emphasis>feature-name</emphasis>=<emphasis>feature-value1</emphasis>[","<emphasis>feature-valueN</emphasis>]*
@@ -288,17 +288,17 @@ exe app : app.cpp : &lt;implicit-dependency&gt;parser ;
<listitem><para>selecting the main target alternative to use,
</para></listitem>
<listitem><para>determining "common" properties</para></listitem>
<listitem><para>determining "common" properties,</para></listitem>
<listitem><para>building targets referred by the sources list and
dependency properties</para></listitem>
dependency properties,</para></listitem>
<listitem><para>adding the usage requirements produces when building
dependencies to the "common" properties</para></listitem>
dependencies to the "common" properties,</para></listitem>
<listitem><para>building the target using generators</para></listitem>
<listitem><para>building the target using generators,</para></listitem>
<listitem><para>computing the usage requirements to be returned</para></listitem>
<listitem><para>computing the usage requirements to be returned.</para></listitem>
</orderedlist>
</para>
@@ -330,10 +330,10 @@ exe app : app.cpp : &lt;implicit-dependency&gt;parser ;
<simpara>
If there's one viable alternative, it's choosen. Otherwise,
an attempt is made to find one best alternative. An alternative
a is better than another alternative b, iff set of properties
in b's condition is strict subset of the set of properities of
a is better than another alternative b, iff the set of properties
in b's condition is a strict subset of the set of properities of
'a's condition. If there's one viable alternative, which is
better than all other, it's selected. Otherwise, an error is
better than all others, it's selected. Otherwise, an error is
reported.
</simpara>
</listitem>

View File

@@ -537,7 +537,7 @@ exe e10 : e10.cpp foo ;</programlisting>
<tip>
<para>
When one library uses another, you put the second library is
When one library uses another, you put the second library in
the source list of the first. For example:
<programlisting>
lib utils : utils.cpp /boost/filesystem//fs ;
@@ -550,7 +550,7 @@ exe app : app.cpp core ;</programlisting>
as a static library, its dependency on <filename>utils</filename> is passed along to
<filename>core</filename>'s dependents, causing
<filename>app</filename> to be linked with both
<filename>core</filename> and <filename>utils</filename>."
<filename>core</filename> and <filename>utils</filename>.
</para>
</tip>

View File

@@ -26,11 +26,12 @@ cd doc
/home/ghost/Work/boost-rc/tools/jam/src/bin.linuxx86/bjam --v2
/home/ghost/Work/boost-rc/tools/jam/src/bin.linuxx86/bjam --v2 pdf
cp `find bin -name "*.pdf"` ../..
mv ../../standalone.pdf ../../userman.pdf
rm -rf bin
cd ..
# Get the boost logo.
wget http://boost.org/boost-build2/boost.png
wget http://boost.sf.net/boost-build2/boost.png
# Adjust the links, so they work with the standalone package
perl -pi -e 's%../../../boost.png%boost.png%' index.html

View File

@@ -2,6 +2,7 @@
# (C) Copyright Christof Meerwald 2003.
# (C) Copyright Aleksey Gurtovoy 2004.
# (C) Copyright Arjan Knepper 2006.
#
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
@@ -56,16 +57,23 @@ generators.register-c-compiler dmc.compile.c : C : OBJ : <toolset>dmc ;
# Declare flags
# FIXME: what's this 'debug-store'?
#flags dmc.compile OPTIONS <debug-symbols>on/<debug-store>object : -g ;
flags dmc.compile OPTIONS <debug-symbols>on : -g ;
flags dmc.link <debug-symbols>on : -co ;
# dmc optlink has some limitation on the amount of debug-info included. Therefore only linenumbers are enabled in debug builds.
# flags dmc.compile OPTIONS <debug-symbols>on : -g ;
flags dmc.compile OPTIONS <debug-symbols>on : -gl ;
flags dmc.link OPTIONS <debug-symbols>on : /CO /NOPACKF /DEBUGLI ;
flags dmc.link OPTIONS <debug-symbols>off : /PACKF ;
flags dmc.compile OPTIONS <optimization>off : -S -o+none ;
flags dmc.compile OPTIONS <optimization>speed : -o+time ;
flags dmc.compile OPTIONS <optimization>space : -o+space ;
flags dmc.compile OPTIONS <exception-handling>on : -Ae ;
flags dmc.compile OPTIONS <rtti>on : -Ar ;
# FIXME:
# Compiling sources to be linked into a shared lib (dll) the -WD cflag should be used
# Compiling sources to be linked into a static lib (lib) or executable the -WA cflag should be used
# But for some reason the -WD cflag is always in use.
# flags dmc.compile OPTIONS <link>shared : -WD ;
# flags dmc.compile OPTIONS <link>static : -WA ;
# Note that these two options actually imply multithreading support on DMC
# because there is no single-threaded dynamic runtime library. Specifying
@@ -94,16 +102,9 @@ flags dmc LIBRARIES <library-file> ;
flags dmc FINDLIBS <find-library-sa> ;
flags dmc FINDLIBS <find-library-st> ;
# FIXME: what's this?
# flags msvc STDHDRS : $(DMC_ROOT)$(SLASH)include ;
# FIXME: how one action handles both linking of executables and
# shared libraries? Does it work for shared libraries at all?
actions together link bind LIBRARIES
{
"$(.root)link" $(OPTIONS) -delexecutable -noi -implib:"$(<[2])" "$(>)" $(LIBRARIES) , "$(<[1])" , NUL , user32.lib kernel32.lib "$(FINDLIBS:S=.lib)" , "$(<[2]:B).def"
"$(.root)link" $(OPTIONS) /NOI /DE /XN "$(>)" , "$(<[1])" ,, $(LIBRARIES) user32.lib kernel32.lib "$(FINDLIBS:S=.lib)" , "$(<[2]:B).def"
}
actions together link.dll bind LIBRARIES
@@ -112,10 +113,9 @@ actions together link.dll bind LIBRARIES
echo DESCRIPTION 'A Library' >> $(<[2]:B).def
echo EXETYPE NT >> $(<[2]:B).def
echo SUBSYSTEM WINDOWS >> $(<[2]:B).def
echo CODE SHARED EXECUTE >> $(<[2]:B).def
echo DATA WRITE >> $(<[2]:B).def
"$(.root)link" $(OPTIONS) -delexecutable -noi -implib:"$(<[2])" "$(>)" $(LIBRARIES) , "$(<[1])" , NUL , user32.lib kernel32.lib "$(FINDLIBS:S=.lib)" , "$(<[2]:B).def"
echo CODE EXECUTE READ >> $(<[2]:B).def
echo DATA READ WRITE >> $(<[2]:B).def
"$(.root)link" $(OPTIONS) /NOI /DE /XN /ENTRY:_DllMainCRTStartup /IMPLIB:"$(<[2])" "$(>)" $(LIBRARIES) , "$(<[1])" ,, user32.lib kernel32.lib "$(FINDLIBS:S=.lib)" , "$(<[2]:B).def"
}
actions compile.c
@@ -125,10 +125,10 @@ actions compile.c
actions compile.c++
{
"$(.root)dmc" -cpp -c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o"$(<)" "$(>)"
"$(.root)dmc" -cpp -c -Ab $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -o"$(<)" "$(>)"
}
actions together piecemeal archive
{
"$(.root)lib" $(OPTIONS) -c -n -p128 "$(<)" "$(>)"
"$(.root)lib" $(OPTIONS) -c -n -p256 "$(<)" "$(>)"
}