From 66b2d00cc2beb55e1fcef8b8e400f7eb8abccf66 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Tue, 25 Apr 2006 10:13:39 +0000 Subject: [PATCH] Marge from trunk. [SVN r33805] --- v2/doc/src/advanced.xml | 54 ++++++++++++++++++++-------------------- v2/doc/src/extending.xml | 36 +++++++++++++-------------- v2/doc/src/reference.xml | 20 +++++++-------- v2/doc/src/tutorial.xml | 4 +-- v2/roll.sh | 3 ++- v2/tools/dmc.jam | 36 +++++++++++++-------------- 6 files changed, 77 insertions(+), 76 deletions(-) diff --git a/v2/doc/src/advanced.xml b/v2/doc/src/advanced.xml index 553e85377..8187a1f9e 100644 --- a/v2/doc/src/advanced.xml +++ b/v2/doc/src/advanced.xml @@ -42,7 +42,7 @@ So, to be able to successfully use Boost.Build, you need to know only - three things: + four things: @@ -57,7 +57,7 @@ How the build process works - Some Basics about the Boost.Jam language. See the + Some Basics about the Boost.Jam language. See also the Boost.Jam documentation. @@ -150,8 +150,8 @@ x = [ helper 1 : 2 : 3 ] ; result of the call must be used inside some expression, you need to add brackets around the call, like shown on the second line. -if cond { statements } [ else statement ] - Regular if-statement. The condition is composed of: +if cond { statements } [ else { statements } ] + This is a regular if-statement. The condition is composed of: Literals (true if at least one string is not empty) Comparisons: a @@ -184,11 +184,11 @@ return values ; rule test ( ) { if 1 = 1 { - return "resonable" ; + return "reasonable" ; } return "strange" ; } will return strange, not -resonable. +reasonable. @@ -251,8 +251,8 @@ actions create-file-from-another Configuration The Boost.Build configuration is specified in the file - user-config.jam. You can edit the one in top-level - directory of Boost.Build installation create a copy in your home directory + user-config.jam. 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 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 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, the project name specified in Jamroot, and the build dir specified in Jamroot (or bin, if none is specified). @@ -699,7 +699,7 @@ exe c : c.cpp /boost/program_options//program_options ; -
+
Requirements 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 build-dir 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. @@ -998,7 +998,7 @@ project tennis called Jamroot rather than Jamfile. When loading a project, Boost.Build looks for either Jamroot or - Jamfile. They are handled indentically, except + Jamfile. They are handled identically, except that if the file is called Jamroot, the search for a parent project is not performed. @@ -1171,7 +1171,7 @@ bjam app1 lib1//lib1 gcc debug optimization=full
Building a main target 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 . @@ -1406,7 +1406,7 @@ lib aux : : <name>aux ; - When a library uses another library you should put that another + 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 : <use>b : : <library>b ; The alias rule gives alternative name to - a group of targets. For example, to give name + a group of targets. For example, to give the name core to a group of three other targets with the following code: alias core : im reader writer ; - Using core on the command line, or in source list + Using core on the command line, or in the source list of any other target is the same as explicitly using im, reader, and - writer, just more convenient. + writer, but it is just more convenient. @@ -1539,7 +1539,7 @@ install dist : hello helpers : <location>/usr/bin ; While you can achieve the same effect by changing the target name to /usr/bin, using the location - 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. @@ -1565,7 +1565,7 @@ install dist : hello ; will find all targets that hello 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 -install install : install-bin install-lib ; +alias install : install-bin install-lib ; install install-bin : applications : /usr/bin ; install install-lib : helper : /usr/lib ; @@ -1589,7 +1589,7 @@ install install-lib : helper : /usr/lib ; Because the install rule just copies targets, most free features see the definition of "free" in . - have no effect when used in requirements of the install. + have no effect when used in requirements of the install rule. The only two which matter are dependency and, on Unix, @@ -1895,9 +1895,9 @@ actions echo The value of those features is passed without modification to the - corresponding tools. For cflags that's both C and C++ - compilers, for cxxflags that's C++ compiler and for - linkflags that's linker. The features are handy when + corresponding tools. For cflags that's both the C and C++ + compilers, for cxxflags that's the C++ compiler and for + linkflags 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. @@ -1908,7 +1908,7 @@ actions echo - The <warnings> feature controls warning level of compilers. It has the following values: + The <warnings> feature controls the warning level of compilers. It has the following values: off - disables all warnings. on - enables default warning level for the tool. @@ -1923,8 +1923,8 @@ actions echo - The <warnings-as-errors> makes it possible treat warnings as errors and abort - compilation on warning. The value on enables this behaviour. The default value is + The <warnings-as-errors> makes it possible to treat warnings as errors and abort + compilation on a warning. The value on enables this behaviour. The default value is off. diff --git a/v2/doc/src/extending.xml b/v2/doc/src/extending.xml index de0ba2a3b..34e1893d9 100644 --- a/v2/doc/src/extending.xml +++ b/v2/doc/src/extending.xml @@ -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 type.set-generated-target-suffix 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 PLUGIN type can be used whenever SHARED_LIB 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 common-scanner 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. - Finally, we assign the new scaner to the VERBATIM + Finally, we assign the new scanner to the VERBATIM target type: type.set-scanner VERBATIM : verbatim-scanner ; @@ -233,7 +233,7 @@ type.set-scanner VERBATIM : verbatim-scanner ; 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 D and produces a target of the type OBJ, 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. @@ -293,7 +293,7 @@ generators.register-composing mex.mex : CPP LIB : MEX ; is a composing generator corresponding to the proper linker. - You should also know about two specific function for registering + You should also know about two specific functions for registering generators: generators.register-c-compiler and generators.register-linker. 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 ; Custom generator classes 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, 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 There are two methods of interest. The run 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 generated-targets method is called when all sources are converted to the right types to actually create the result. @@ -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 - generated-target method can find the list of + generated-targets method can find the list of sources automatically: class itrace-generator : generator { @@ -375,13 +375,13 @@ generators.register [ new itrace-generator nm.itrace : EXE : ITRACE ] ; The run 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: @@ -462,7 +462,7 @@ actions inline-file We first define a new feature. Then, the flags invocation says that whenever verbatin.inline-file action is run, the value of the verbatim-options feature will be added to the - OPTIONS variable, an can be used inside the action body. + OPTIONS variable, and can be used inside the action body. You'd need to consult online help (--help) to find all the features of the toolset.flags rule. 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 @@ -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. --> - 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 @@ -655,7 +655,7 @@ rule link Variants and composite features. - Sometimes you want to create a shorcut for some set of + Sometimes you want to create a shortcut for some set of features. For example, release is a value of <variant> and is a shortcut for a set of features. @@ -685,7 +685,7 @@ feature.compose <parallelism>fake : <library>/mpi//fake/<parallel - This will allow you to specify value of feature + This will allow you to specify the value of feature parallelism, which will expand to link to the necessary library. @@ -807,7 +807,7 @@ time g++ 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. of the property sets. Each split - part should have the either the form + part should have either the form feature-name=feature-value1[","feature-valueN]* @@ -288,17 +288,17 @@ exe app : app.cpp : <implicit-dependency>parser ; selecting the main target alternative to use, - determining "common" properties + determining "common" properties, building targets referred by the sources list and - dependency properties + dependency properties, adding the usage requirements produces when building - dependencies to the "common" properties + dependencies to the "common" properties, - building the target using generators + building the target using generators, - computing the usage requirements to be returned + computing the usage requirements to be returned. @@ -330,10 +330,10 @@ exe app : app.cpp : <implicit-dependency>parser ; 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. diff --git a/v2/doc/src/tutorial.xml b/v2/doc/src/tutorial.xml index 998335a91..10b7a1c99 100644 --- a/v2/doc/src/tutorial.xml +++ b/v2/doc/src/tutorial.xml @@ -537,7 +537,7 @@ exe e10 : e10.cpp foo ; - 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: lib utils : utils.cpp /boost/filesystem//fs ; @@ -550,7 +550,7 @@ exe app : app.cpp core ; as a static library, its dependency on utils is passed along to core's dependents, causing app to be linked with both - core and utils." + core and utils. diff --git a/v2/roll.sh b/v2/roll.sh index 4f20fa3b1..2f206b883 100644 --- a/v2/roll.sh +++ b/v2/roll.sh @@ -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 diff --git a/v2/tools/dmc.jam b/v2/tools/dmc.jam index caa610f04..8af8725a8 100644 --- a/v2/tools/dmc.jam +++ b/v2/tools/dmc.jam @@ -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 : dmc ; # Declare flags -# FIXME: what's this 'debug-store'? -#flags dmc.compile OPTIONS on/object : -g ; -flags dmc.compile OPTIONS on : -g ; -flags dmc.link 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 on : -g ; +flags dmc.compile OPTIONS on : -gl ; +flags dmc.link OPTIONS on : /CO /NOPACKF /DEBUGLI ; +flags dmc.link OPTIONS off : /PACKF ; flags dmc.compile OPTIONS off : -S -o+none ; flags dmc.compile OPTIONS speed : -o+time ; flags dmc.compile OPTIONS space : -o+space ; flags dmc.compile OPTIONS on : -Ae ; flags dmc.compile OPTIONS 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 shared : -WD ; +# flags dmc.compile OPTIONS 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 ; flags dmc FINDLIBS ; flags dmc FINDLIBS ; - -# 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 "$(<)" "$(>)" }