diff options
| author | Christoph Berg <myon@debian.org> | 2018-12-19 22:58:32 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2018-12-19 22:58:32 +0100 |
| commit | e0737c56c1e384e05064a0c6e1ac46979371041b (patch) | |
| tree | a0123d694a2d36c43dabdf0a3907392fce11d457 /boost/tools/build/doc | |
| parent | b4aebf2d137b892f53503b13785ecae900062ff7 (diff) | |
New upstream version 2.0.0+repackupstream/2.0.0+repack
Diffstat (limited to 'boost/tools/build/doc')
101 files changed, 13888 insertions, 0 deletions
diff --git a/boost/tools/build/doc/bjam.qbk b/boost/tools/build/doc/bjam.qbk new file mode 100644 index 00000000..27adf472 --- /dev/null +++ b/boost/tools/build/doc/bjam.qbk @@ -0,0 +1,1732 @@ +[article Boost.Jam + [quickbook 1.3] + [version: 3.1.19] + [authors [Rivera, Rene], [Abrahams, David], [Prus, Vladimir]] + [copyright 2003 2004 2005 2006 2007 Rene Rivera, David Abrahams, Vladimir Prus] + [category tool-build] + [id jam] + [dirname jam] + [purpose + Jam is a make(1) replacement that makes building simple things simple + and building complicated things manageable. + ] + [license + 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]) + ] +] + +[/ QuickBook Document version 1.3 ] + +[/ Shortcuts ] + +[def :version: 3.1.19] + +[/ Images ] + +[def :NOTE: [$images/note.png]] +[def :ALERT: [$images/caution.png]] +[def :DETAIL: [$images/note.png]] +[def :TIP: [$images/tip.png]] + +[/ Links ] + +[def :Boost: [@http://www.boost.org Boost]] +[def :Perforce_Jam: [@http://www.perforce.com/jam/jam.html Perforce Jam]] + +[/ Templates ] + +[template literal[text]'''<literallayout><literal>'''[text]'''</literal></literallayout>'''] +[template list[items]'''<itemizedlist>'''[items]'''</itemizedlist>'''] +[template orderedlist[items]'''<orderedlist>'''[items]'''</orderedlist>'''] +[template li[text]'''<listitem>'''[text]'''</listitem>'''] +[template lines[items]'''<simplelist type='vert' columns='1'>'''[items]'''</simplelist>'''] +[template line[text]'''<member>'''[text]'''</member>'''] + +[section:building Building B2] + +Installing =B2= after building it is simply a matter of copying the +generated executables someplace in your =PATH=. For building the executables +there are a set of =build= bootstrap scripts to accomodate particular +environments. The scripts take one optional argument, the name of the toolset +to build with. When the toolset is not given an attempt is made to detect an +available toolset and use that. The build scripts accept these arguments: + +[pre +/build/ \[/toolset/\] +] + +Running the scripts without arguments will give you the best chance of success. On Windows platforms from a command console do: + +[pre +cd /jam source location/ +.\\build.bat +] + +On Unix type platforms do: + +[pre +cd /jam source location/ +sh ./build.sh +] + +For the Boost.Jam source included with the Boost distribution the /jam source location/ is =BOOST_ROOT/tools/build/src/engine=. + +If the scripts fail to detect an appropriate toolset to build with your particular toolset may not be auto-detectable. In that case, you can specify the toolset as the first argument, this assumes that the toolset is readily available in the =PATH=. + +[note +The toolset used to build Boost.Jam is independent of the toolsets used for Boost.Build. Only one version of Boost.Jam is needed to use Boost.Build. +] + +The supported toolsets, and whether they are auto-detected, are: + +[table Supported Toolsets + +[[Script] [Platform] [Toolset] [Detection and Notes]] + +[ [=build.bat=] [Windows NT, 2000, and XP] + [[lines + [line [@http://www.codegear.com/downloads/free/cppbuilder =borland=]] + [line [@http://www.borland.com/ Borland] C++Builder (BCC 5.5)] + ]] + [[list + [li Common install location: "=C:\Borland\BCC55="] + [li =BCC32.EXE= in =PATH=] + ]] +] + +[ [] [] + [[lines + [line [@http://www.comeaucomputing.com/ =como=]] + [line Comeau Computing C/C++] + ]] + [] +] + +[ [] [] + [[lines + [line [@http://gcc.gnu.org/ =gcc=]] + [line GNU GCC] + ]] + [] +] + +[ [] [] + [[lines + [line [@http://gcc.gnu.org/ =gcc-nocygwin=]] + [line GNU GCC] + ]] + [] +] + +[ [] [] + [[lines + [line [@http://www.intel.com/software/products/compilers/c60 =intel-win32=]] + [line Intel C++ Compiler for Windows] + ]] + [[list + [li =ICL.EXE= in =PATH=] + ]] +] + +[ [] [] + [[lines + [line [@http://www.metrowerks.com/ =metrowerks=]] + [line MetroWerks CodeWarrior C/C++ 7.x, 8.x, 9.x] + ]] + [[list + [li =CWFolder= variable configured] + [li =MWCC.EXE= in =PATH=] + ]] +] + +[ [] [] + [[lines + [line [@http://www.mingw.org/ =mingw=]] + [line GNU [@http://gcc.gnu.org/ GCC] as the [@http://www.mingw.org/ MinGW] configuration] + ]] + [[list + [li Common install location: "=C:\MinGW="] + ]] +] + +[ [] [] + [[lines + [line [@http://msdn.microsoft.com/visualc/ =msvc=]] + [line Microsoft Visual C++ 6.x] + ]] + [[list + [li =VCVARS32.BAT= already configured] + [li =%MSVCDir%= is present in environment] + [li Common install locations: "=%ProgramFiles%\Microsoft Visual Studio=", "=%ProgramFiles%\Microsoft Visual C++="] + [li =CL.EXE= in =PATH=] + ]] +] + +[ [] [] + [[lines + [line [@http://msdn.microsoft.com/visualc/ =vc7=]] + [line Microsoft Visual C++ 7.x] + ]] + [[list + [li =VCVARS32.BAT= or =VSVARS32.BAT= already configured] + [li =%VS71COMNTOOLS%= is present in environment] + [li =%VCINSTALLDIR%= is present in environment] + [li Common install locations: "=%ProgramFiles%\Microsoft Visual Studio .NET=", "=%ProgramFiles%\Microsoft Visual Studio .NET 2003="] + [li =CL.EXE= in =PATH=] + ]] +] + +[ [] [] + [[lines + [line [@http://msdn.microsoft.com/visualc/ =vc8= and =vc9=]] + [line Microsoft Visual C++ 8.x and 9.x] + ]] + [Detection: + [list + [li =VCVARSALL.BAT= already configured] + [li =%VS90COMNTOOLS%= is present in environment] + [li Common install location: "=%ProgramFiles%\Microsoft Visual Studio 9="] + [li =%VS80COMNTOOLS%= is present in environment] + [li Common install location: "=%ProgramFiles%\Microsoft Visual Studio 8="] + [li =CL.EXE= in =PATH=] + ] + + Notes: + [list + [li If =VCVARSALL.BAT= is called to set up the toolset, it is passed all the extra arguments, see below for what those arguments are. This can be used to build, for example, a Win64 specific version of =b2=. Consult the VisualStudio documentation for what the possible argument values to the =VCVARSALL.BAT= are.] + ] + ] +] + +[ [=build.sh=] [Unix, Linux, Cygwin, etc.] + [[lines + [line [@http://www.hp.com/go/c++ =acc=]] + [line HP-UX aCC] + ]] + [[list + [li =aCC= in =PATH=] + [li =uname= is "HP-UX"] + ]] +] + +[ [] [] + [[lines + [line [@http://www.comeaucomputing.com/ =como=]] + [line Comeau Computing C/C++] + ]] + [[list + [li como in =PATH=] + ]] +] + +[ [] [] + [[lines + [line [@http://gcc.gnu.org/ =gcc=]] + [line GNU GCC] + ]] + [[list + [li gcc in =PATH=] + ]] +] + +[ [] [] + [[lines + [line [@http://www.intel.com/software/products/compilers/c60l/ =intel-linux=]] + [line Intel C++ for Linux] + ]] + [[list + [li =icc= in =PATH=] + [li Common install locations: "=/opt/intel/cc/9.0=", "=/opt/intel_cc_80=", "=/opt/intel/compiler70=", "=/opt/intel/compiler60=", "=/opt/intel/compiler50="] + ]] +] + +[ [] [] + [[lines + [line =kcc=] + [line Intel KAI C++] + ]] + [[list + [li =KCC= in =PATH=] + ]] +] + +[ [] [] + [[lines + [line [@http://www.codegear.com/downloads/free/cppbuilder =kylix=]] + [line [@http://www.borland.com/ Borland] C++Builder] + ]] + [[list + [li bc++ in PATH] + ]] +] + +[ [] [] + [[lines + [line [@http://www.sgi.com/developers/devtools/languages/mipspro.html =mipspro=]] + [line SGI MIPSpro C] + ]] + [[list + [li =uname= is "=IRIX=" or "=IRIX64="] + ]] +] + +[ [] [] + [[lines + [line =sunpro=] + [line Sun Workshop 6 C++] + ]] + [[list + [li Standard install location: "=/opt/SUNWspro="] + ]] +] + +[ [] [] + [[lines + [line =qcc=] + [line [@http://www.qnx.com/ QNX Neutrino]] + ]] + [[list + [li =uname= is "=QNX=" and =qcc= in =PATH=] + ]] +] + +[ [] [] + [[lines + [line [@http://www.tru64unix.compaq.com/cplus/ =true64cxx=]] + [line Compaq C++ Compiler for True64 UNIX] + ]] + [[list + [li =uname= is "=OSF1="] + ]] +] + +[ [] [] + [[lines + [line [@http://www.ibm.com/software/awdtools/vacpp/ =vacpp=]] + [line IBM VisualAge C++] + ]] + [[list + [li =xlc= in =PATH=] + ]] +] + +[ [] [MacOS X] + [[lines + [line [@http://developer.apple.com/tools/compilers.html =darwin=]] + [line Apple MacOS X GCC] + ]] + [[list + [li =uname= is "=Darwin="] + ]] +] + +[ [] [Windows NT, 2000, and XP] + [[lines + [line [@http://www.mingw.org/ =mingw=]] + [line GNU [@http://gcc.gnu.org/ GCC] as the [@http://www.mingw.org/ MinGW] configuration with the MSYS shell] + ]] + [[list + [li Common install location: "=/mingw="] + ]] +] + +] + +The built executables are placed in a subdirectory specific to your platform. For example, in Linux running on an Intel x86 compatible chip, the executables are placed in: "=bin.linuxx86=". The =b2[.exe]= executable can be used to invoke Boost.Build. + +The build scripts support additional invocation arguments for use by developers of Boost.Jam and for additional setup of the toolset. The extra arguments come after the toolset: + +* Arguments not in the form of an option, before option arguments, are used for extra setup to toolset configuration scripts. +* Arguments of the form "=--option=", which are passed to the =build.jam= build script. +* Arguments not in the form of an option, after the options, which are targets for the =build.jam= script. + +[pre +/build/ \[/toolset/\] \[/setup/\*\] \[--/option/+ /target/\*\] +] + +The arguments immediately after the toolset are passed directly to the setup script of the toolset, if available and if it needs to be invoked. This allows one to configure the toolset ass needed to do non-default builds of =b2=. For example to build a Win64 version with =vc8=. See the toolset descriptiona above for when particular toolsets support this. + +The arguments starting with the "=--option=" forms are passed to the =build.jam= script and are used to further customize what gets built. Options and targets supported by the =build.jam= script: + +[variablelist + [[[literal ---]] + [Empty option when one wants to only specify a target.]] + [[[literal --release]] + [The default, builds the optimized executable.]] + [[[literal --debug]] + [Builds debugging versions of the executable. When built they are placed in their own directory "=bin./platform/.debug=".]] + [[[literal --grammar]] + [Normally the Jam language grammar parsing files are not regenerated. This forces building of the grammar, although it may not force the regeneration of the grammar parser. If the parser is out of date it will be regenerated and subsequently built.]] + [[[literal --with-python=/path/]] + [Enables Python integration, given a path to the Python libraries.]] + [[[literal --gc]] + [Enables use of the Boehm Garbage Collector. The build will look for the Boehm-GC source in a "boehm_gc" subdirectory from the =b2= sources.]] + [[[literal --duma]] + [Enables use of the DUMA (Detect Unintended Memory Access) debugging memory allocator. The build expects to find the DUMA source files in a "duma" subdirectory from the =b2= sources.]] + [[[literal --toolset-root=/path/]] + [Indicates where the toolset used to build is located. This option is passed in by the bootstrap (=build.bat= or =build.sh=) script.]] + [[[literal --show-locate-target]] + [For information, prints out where it will put the built executable.]] + [[[literal --noassert]] + [Disable debug assertions, even if building the debug version of the executable.]] + [[[literal dist]] + [Generate packages (compressed archives) as appropriate for distribution in the platform, if possible.]] + [[[literal clean]] + [Remove all the built executables and objects.]] +] + +[endsect] + +[section:language Language] + +=B2= has an interpreted, procedural language. Statements in =b2= are rule (procedure) definitions, rule invocations, flow-of-control structures, variable assignments, and sundry language support. + +[section:lexical Lexical Features] + +=B2= treats its input files as whitespace-separated tokens, with two exceptions: double quotes (") can enclose whitespace to embed it into a token, and everything between the matching curly braces ({}) in the definition of a rule action is treated as a single string. A backslash (\\) can escape a double quote, or any single whitespace character. + +=B2= requires whitespace (blanks, tabs, or newlines) to surround all tokens, including the colon (:) and semicolon (;) tokens. + +=B2= keywords (an mentioned in this document) are reserved and generally +must be quoted with double quotes (") to be used as arbitrary tokens, such as +variable or target names. + +Comments start with the [^#] character and extend until the end of line. + +[endsect] + +[section:target Targets] + +The essential =b2= data entity is a target. Build targets are files to be updated. Source targets are the files used in updating built targets. Built targets and source targets are collectively referred to as file targets, and frequently built targets are source targets for other built targets. Pseudotargets are symbols representing dependencies on other targets, but which are not themselves associated with any real file. + +A file target's identifier is generally the file's name, which can be absolutely rooted, relative to the directory of =b2='s invocation, or simply local (no directory). Most often it is the last case, and the actual file path is bound using the =$(SEARCH)= and =$(LOCATE)= special variables. See [link jam.language.variables.builtins.search SEARCH and LOCATE Variables] below. A local filename is optionally qualified with grist, a string value used to assure uniqueness. A file target with an identifier of the form /file(member)/ is a library member (usually an =ar=(1) archive on Unix). + +[section Binding Detection] + +Whenever a target is bound to a location in the filesystem, Boost Jam will look for a variable called =BINDRULE= (first "on" the target being bound, then in the global module). If non-empty, =$(BINDRULE[1])= names a rule which is called with the name of the target and the path it is being bound to. The signature of the rule named by =$(BINDRULE[1])= should match the following: + +[pre +rule /bind-rule/ ( /target/ : /path/ ) +] + +This facility is useful for correct header file scanning, since many compilers will search for `#include` files first in the directory containing the file doing the `#include` directive. =$(BINDRULE)= can be used to make a record of that directory. + +[endsect] + +[endsect] + +[section:rules Rules] + +The basic =b2= language entity is called a rule. A rule is defined in two parts: the procedure and the actions. The procedure is a body of jam statements to be run when the rule is invoked; the actions are the OS shell commands to execute when updating the built targets of the rule. + +Rules can return values, which can be expanded into a list with "[ /rule/ /args/ ... ]". A rule's value is the value of its last statement, though only the following statements have values: 'if' (value of the leg chosen), 'switch' (value of the case chosen), set (value of the resulting variable), and 'return' (value of its arguments). + +The =b2= statements for defining and invoking rules are as follows: + +Define a rule's procedure, replacing any previous definition. + +[pre +rule /rulename/ { /statements/ } +] + +Define a rule's updating actions, replacing any previous definition. + +[pre +actions \[ /modifiers/ \] /rulename/ { /commands/ } +] + +Invoke a rule. + +[pre +/rulename/ /field1/ : /field2/ : /.../ : /fieldN/ ; +] + +Invoke a rule under the influence of target's specific variables.. + +[pre +on /target/ /rulename/ /field1/ : /field2/ : /.../ : /fieldN/ ; +] + +Used as an argument, expands to the return value of the rule invoked. + +[pre +\[ /rulename/ /field1/ : /field2/ : /.../ : /fieldN/ \] +\[ on /target/ /rulename/ /field1/ : /field2/ : /.../ : /fieldN/ \] +] + +A rule is invoked with values in /field1/ through /fieldN/. They may be referenced in the procedure's statements as [^$(1)] through [^$(['N])] (9 max), and the first two only may be referenced in the action's /commands/ as [^$(1)] and [^$(2)]. [^$(<)] and [^$(>)] are synonymous with [^$(1)] and [^$(2)]. + +Rules fall into two categories: updating rules (with actions), and pure procedure rules (without actions). Updating rules treat arguments [^$(1)] and [^$(2)] as built targets and sources, respectively, while pure procedure rules can take arbitrary arguments. + +When an updating rule is invoked, its updating actions are added to those associated with its built targets ([^$(1)]) before the rule's procedure is run. Later, to build the targets in the updating phase, /commands/ are passed to the OS command shell, with [^$(1)] and [^$(2)] replaced by bound versions of the target names. See Binding above. + +Rule invocation may be indirected through a variable: + +[pre +$(/var/) /field1/ : /field2/ : /.../ : /fieldN/ ; + +on /target/ $(/var/) /field1/ : /field2/ : /.../ : /fieldN/ ; + +\[ $(/var/) /field1/ : /field2/ : /.../ : /fieldN/ \] +\[ on /target/ $(/var/) /field1/ : /field2/ : /.../ : /fieldN/ \] +] + +The variable's value names the rule (or rules) to be invoked. A rule is +invoked for each element in the list of [^$(/var/)]'s values. The fields +[^/field1/ : /field2/ : /.../] are passed as arguments for each +invokation. For the [ ... ] forms, the return value is the concatenation of +the return values for all of the invocations. + +[section Action Modifiers] + +The following action modifiers are understood: + +[variablelist + +[[[^actions bind /vars/]] + [[^$(/vars/)] will be replaced with bound values.]] + +[[[^actions existing]] + [[^$(>)] includes only source targets currently existing.]] + +[[[^actions ignore]] + [The return status of the commands is ignored.]] + +[[[^actions piecemeal]] + [commands are repeatedly invoked with a subset of [^$(>)] small enough to fit in the command buffer on this OS.]] + +[[[^actions quietly]] + [The action is not echoed to the standard output.]] + +[[[^actions together]] + [The [^$(>)] from multiple invocations of the same action on the same built target are glommed together.]] + +[[[^actions updated]] + [[^$(>)] includes only source targets themselves marked for updating.]] + +] + +[endsect] + +[section Argument lists] + +You can describe the arguments accepted by a rule, and refer to them by name within the rule. For example, the following prints "I'm sorry, Dave" to the console: + +[pre +rule report ( pronoun index ? : state : names + ) +{ + local he.suffix she.suffix it.suffix = s ; + local I.suffix = m ; + local they.suffix you.suffix = re ; + ECHO $(pronoun)'$($(pronoun).suffix) $(state), $(names\[$(index)\]) ; +} +report I 2 : sorry : Joe Dave Pete ; +] + +Each name in a list of formal arguments (separated by "=:=" in the rule declaration) is bound to a single element of the corresponding actual argument unless followed by one of these modifiers: + +[table +[[Symbol] [Semantics of preceding symbol]] +[[=?=] [optional]] +[[=*=] [Bind to zero or more unbound elements of the actual argument. When =*= appears where an argument name is expected, any number of additional arguments are accepted. This feature can be used to implement "varargs" rules.]] +[[=+=] [Bind to one or more unbound elements of the actual argument.]] +] + +The actual and formal arguments are checked for inconsistencies, which cause =b2= to exit with an error code: + +[pre +### argument error +# rule report ( pronoun index ? : state : names + ) +# called with: ( I 2 foo : sorry : Joe Dave Pete ) +# extra argument foo +### argument error +# rule report ( pronoun index ? : state : names + ) +# called with: ( I 2 : sorry ) +# missing argument names +] + +If you omit the list of formal arguments, all checking is bypassed as in "classic" Jam. Argument lists drastically improve the reliability and readability of your rules, however, and are *strongly recommended* for any new Jam code you write. + +[endsect] + +[section:builtins Built-in Rules] + +=B2= has a growing set of built-in rules, all of which are pure procedure rules without updating actions. They are in three groups: the first builds the dependency graph; the second modifies it; and the third are just utility rules. + +[section Dependency Building] + +[section =DEPENDS= ] + +[pre +rule DEPENDS ( /targets1/ * : /targets2/ * ) +] + +Builds a direct dependency: makes each of /targets1/ depend on each of /targets2/. Generally, /targets1/ will be rebuilt if /targets2/ are themselves rebuilt or are newer than /targets1/. + +[endsect] + +[section =INCLUDES= ] + +[pre +rule INCLUDES ( /targets1/ * : /targets2/ * ) +] + +Builds a sibling dependency: makes any target that depends on any of /targets1/ also depend on each of /targets2/. This reflects the dependencies that arise when one source file includes another: the object built from the source file depends both on the original and included source file, but the two sources files don't depend on each other. For example: + +[pre +DEPENDS foo.o : foo.c ; +INCLUDES foo.c : foo.h ; +] + +"=foo.o=" depends on "=foo.c=" and "=foo.h=" in this example. + +[endsect] + +[endsect] + +[section Modifying Binding] + +The six rules =ALWAYS=, =LEAVES=, =NOCARE=, =NOTFILE=, =NOUPDATE=, and =TEMPORARY= modify the dependency graph so that =b2= treats the targets differently during its target binding phase. See Binding above. Normally, =b2= updates a target if it is missing, if its filesystem modification time is older than any of its dependencies (recursively), or if any of its dependencies are being updated. This basic behavior can be changed by invoking the following rules: + +[section =ALWAYS= ] + +[pre +rule ALWAYS ( /targets/ * ) +] + +Causes /targets/ to be rebuilt regardless of whether they are up-to-date (they must still be in the dependency graph). This is used for the clean and uninstall targets, as they have no dependencies and would otherwise appear never to need building. It is best applied to targets that are also =NOTFILE= targets, but it can also be used to force a real file to be updated as well. + +[endsect] + +[section =LEAVES= ] + +[pre +rule LEAVES ( /targets/ * ) +] + +Makes each of /targets/ depend only on its leaf sources, and not on any intermediate targets. This makes it immune to its dependencies being updated, as the "leaf" dependencies are those without their own dependencies and without updating actions. This allows a target to be updated only if original source files change. + +[endsect] + +[section =NOCARE= ] + +[pre +rule NOCARE ( /targets/ * ) +] + +Causes =b2= to ignore /targets/ that neither can be found nor have updating actions to build them. Normally for such targets =b2= issues a warning and then skips other targets that depend on these missing targets. The =HdrRule= in =Jambase= uses =NOCARE= on the header file names found during header file scanning, to let =b2= know that the included files may not exist. For example, if an `#include` is within an `#ifdef`, the included file may not actually be around. + +[warning For targets with build actions: if their build actions exit with a nonzero return code, dependent targets will still be built.] + +[endsect] + +[section =NOTFILE= ] + +[pre +rule NOTFILE ( /targets/ * ) +] + +Marks /targets/ as pseudotargets and not real files. No timestamp is checked, and so the actions on such a target are only executed if the target's dependencies are updated, or if the target is also marked with =ALWAYS=. The default =b2= target "=all=" is a pseudotarget. In =Jambase=, =NOTFILE= is used to define several addition convenient pseudotargets. + +[endsect] + +[section =NOUPDATE= ] + +[pre +rule NOUPDATE ( /targets/ * ) +] + +Causes the timestamps on /targets/ to be ignored. This has two effects: first, once the target has been created it will never be updated; second, manually updating target will not cause other targets to be updated. In =Jambase=, for example, this rule is applied to directories by the =MkDir= rule, because =MkDir= only cares that the target directory exists, not when it has last been updated. + +[endsect] + +[section =TEMPORARY= ] + +[pre +rule TEMPORARY ( /targets/ * ) +] + +Marks /targets/ as temporary, allowing them to be removed after other targets that depend upon them have been updated. If a =TEMPORARY= target is missing, =b2= uses the timestamp of the target's parent. =Jambase= uses =TEMPORARY= to mark object files that are archived in a library after they are built, so that they can be deleted after they are archived. + +[endsect] + +[section =FAIL_EXPECTED= ] + +[pre +rule FAIL_EXPECTED ( /targets/ * ) +] + +For handling targets whose build actions are expected to fail (e.g. when testing +that assertions or compile-time type checking work properly), Boost Jam supplies +the =FAIL_EXPECTED= rule in the same style as =NOCARE=, et. al. During target +updating, the return code of the build actions for arguments to =FAIL_EXPECTED= +is inverted: if it fails, building of dependent targets continues as though it +succeeded. If it succeeds, dependent targets are skipped. + +[endsect] + +[section =RMOLD= ] + +[pre +rule RMOLD ( /targets/ * ) +] + +=B2= removes any target files that may exist on disk when the rule used to build those targets fails. However, targets whose dependencies fail to build are not removed by default. The =RMOLD= rule causes its arguments to be removed if any of their dependencies fail to build. + +[endsect] + +[section =ISFILE= ] + +[pre +rule ISFILE ( /targets/ * ) +] + +=ISFILE= marks targets as required to be files. This changes the way =b2= searches for the target such that it ignores matches for file system items that are not files, like directories. This makes it possible to avoid `#include "exception"` matching if one happens to have a directory named exception in the header search path. + +[warning This is currently not fully implemented.] + +[endsect] + +[endsect] + +[section Utility] + +The two rules =ECHO= and =EXIT= are utility rules, used only in =b2='s parsing phase. + +[section =ECHO= ] + +[pre +rule ECHO ( /args/ * ) +] + +Blurts out the message /args/ to stdout. + +[endsect] + +[section =EXIT= ] + +[pre +rule EXIT ( /message/ * : /result-value/ ? ) +] + +Blurts out the /message/ to stdout and then exits with a failure status if no /result-value/ is given, otherwise it exits with the given /result-value/. + +"=Echo=", "=echo=", "=Exit=", and "=exit=" are accepted as aliases for =ECHO= and =EXIT=, since it is hard to tell that these are built-in rules and not part of the language, like "=include=". + +[endsect] + +[section =GLOB= ] + +The =GLOB= rule does filename globbing. + +[pre +rule GLOB ( /directories/ * : /patterns/ * : /downcase-opt/ ? ) +] + +Using the same wildcards as for the patterns in the switch statement. It is invoked by being used as an argument to a rule invocation inside of "=[ ]=". For example: "[^FILES = \[ GLOB dir1 dir2 : *.c *.h \]]" sets =FILES= to the list of C source and header files in =dir1= and =dir2=. The resulting filenames are the full pathnames, including the directory, but the pattern is applied only to the file name without the directory. + +If /downcase-opt/ is supplied, filenames are converted to all-lowercase before matching against the pattern; you can use this to do case-insensitive matching using lowercase patterns. The paths returned will still have mixed case if the OS supplies them. On Windows NT and Cygwin, and OpenVMS, filenames are always downcased before matching. + +[endsect] + +[section =GLOB_ARCHIVE= ] + +The =GLOB_ARCHIVE= rule does name globbing of object archive members. + +[pre +rule GLOB_ARCHIVE ( /archives/ * : /member-patterns/ * : /downcase-opt/ ? : /symbol-patterns/ ? ) +] + +Similarly to =GLOB=, this rule is used to match names of member files in an archive (static object library). List of successfully matched members is returned or null otherwise. The resulting member names are qualified with pathname of the containing archive in the form =archive-path(member-name)=. Member patterns are for matching member name only; when no wildcards specified -- an exact match is assumed. Member names generally correspond to object file names and as such are platform-specific -- use of platform-defined object suffix in the matching patterns can allow for portability. + +If /downcase-opt/ is supplied, the member names are converted to all-lowercase before matching against the pattern; you can use this to do case-insensitive matching using lowercase patterns. The paths returned will still have mixed case if the OS supplies them. On Windows NT, Cygwin, and OpenVMS, filenames are always downcased before matching. + +Additionally, members can be matched with symbol/function patterns on supported platforms (currently, OpenVMS only). In this case, members containing the matching symbols are returned. Member and symbol patterns are applied as OR conditions, with member patterns taking precedence. On unsupported platforms, null is returned when any symbol patterns are specified. + +[endsect] + +[section =MATCH= ] + +The =MATCH= rule does pattern matching. + +[pre +rule MATCH ( /regexps/ + : /list/ * ) +] + +Matches the =egrep=(1) style regular expressions /regexps/ against the strings in /list/. The result is a list of matching =()= subexpressions for each string in /list/, and for each regular expression in /regexps/. + +[endsect] + +[section =BACKTRACE= ] + +[pre +rule BACKTRACE ( ) +] + +Returns a list of quadruples: /filename/ /line/ /module/ /rulename/..., describing each shallower level of the call stack. This rule can be used to generate useful diagnostic messages from Jam rules. + +[endsect] + +[section =UPDATE= ] + +[pre +rule UPDATE ( /targets/ * ) +] + +Classic jam treats any non-option element of command line as a name of target to be updated. This prevented more sophisticated handling of command line. This is now enabled again but with additional changes to the =UPDATE= rule to allow for the flexibility of changing the list of targets to update. The UPDATE rule has two effects: + +# It clears the list of targets to update, and +# Causes the specified targets to be updated. + +If no target was specified with the =UPDATE= rule, no targets will be updated. To support changing of the update list in more useful ways, the rule also returns the targets previously in the update list. This makes it possible to add targets as such: + +[pre +local previous-updates = \[ UPDATE \] ; +UPDATE $(previous-updates) a-new-target ; +] + +[endsect] + +[section =W32_GETREG= ] + +[pre +rule W32_GETREG ( /path/ : /data/ ? ) +] + +Defined only for win32 platform. It reads the registry of Windows. '/path/' is the location of the information, and '/data/' is the name of the value which we want to get. If '/data/' is omitted, the default value of '/path/' will be returned. The '/path/' value must conform to MS key path format and must be prefixed with one of the predefined root keys. As usual, + +* '=HKLM=' is equivalent to '=HKEY_LOCAL_MACHINE='. +* '=HKCU=' is equivalent to '=HKEY_CURRENT_USER='. +* '=HKCR=' is equivalent to '=HKEY_CLASSES_ROOT='. + +Other predefined root keys are not supported. + +Currently supported data types : '=REG_DWORD=', '=REG_SZ=', '=REG_EXPAND_SZ=', '=REG_MULTI_SZ='. The data with '=REG_DWORD=' type will be turned into a string, '=REG_MULTI_SZ=' into a list of strings, and for those with '=REG_EXPAND_SZ=' type environment variables in it will be replaced with their defined values. The data with '=REG_SZ=' type and other unsupported types will be put into a string without modification. If it can't receive the value of the data, it just return an empty list. For example, + +[pre +local PSDK-location = + \[ W32_GETREG HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\MicrosoftSDK\\\\Directories : "Install Dir" \] ; +] + +[endsect] + +[section =W32_GETREGNAMES= ] + +[pre +rule W32_GETREGNAMES ( /path/ : /result-type/ ) +] + +Defined only for win32 platform. It reads the registry of Windows. '/path/' is the location of the information, and '/result-type/' is either '=subkeys=' or '=values='. For more information on '/path/' format and constraints, please see =W32_GETREG=. + +Depending on '/result-type/', the rule returns one of the following: + +[variablelist + [[=subkeys=] [Names of all direct subkeys of '/path/'.]] + [[=values=] [Names of values contained in registry key given by '/path/'. The "default" value of the key appears in the returned list only if its value has been set in the registry.]] +] + +If '/result-type/' is not recognized, or requested data cannot be retrieved, the rule returns an empty list. +Example: + +[pre +local key = "HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\App Paths" ; +local subkeys = \[ W32_GETREGNAMES "$(key)" : subkeys \] ; +for local subkey in $(subkeys) +{ + local values = \[ W32_GETREGNAMES "$(key)\\\\$(subkey)" : values \] ; + for local value in $(values) + { + local data = \[ W32_GETREG "$(key)\\\\$(subkey)" : "$(value)" \] ; + ECHO "Registry path: " $(key)\\\\$(subkey) ":" $(value) "=" $(data) ; + } +} +] + +[endsect] + +[section =SHELL= ] + +[pre +rule SHELL ( /command/ : * ) +] + +=SHELL= executes /command/, and then returns the standard output of /command/. =SHELL= only works on platforms with a =popen()= function in the C library. On platforms without a working =popen()= function, =SHELL= is implemented as a no-op. =SHELL= works on Unix, MacOS X, and most Windows compilers. =SHELL= is a no-op on Metrowerks compilers under Windows. There is a variable set of allowed options as additional arguments: + +[variablelist + [[=exit-status=] [In addition to the output the result status of the executed command is returned as a second element of the result.]] + [[=no-output=] [Don't capture the output of the command. Instead an empty ("") string value is returned in place of the output.]] + [[=strip-eol=] [Remove trailing end-of-line character from output, if any.]] +] + +Because the Perforce/Jambase defines a =SHELL= rule which hides the +builtin rule, =COMMAND= can be used as an alias for =SHELL= in such a case. + +[endsect] + +[section =MD5= ] + +[pre +rule MD5 ( /string/ ) +] + +=MD5= computes the MD5 hash of the string passed as paramater and returns it. + +[endsect] + +[section =SPLIT_BY_CHARACTERS= ] + +[pre +rule SPLIT_BY_CHARACTERS ( /string/ : /delimiters/ ) +] + +=SPLIT_BY_CHARACTERS= splits the specified /string/ on any delimiter character +present in /delimiters/ and returns the resulting list. + +[endsect] + +[section =PRECIOUS= ] + +[pre +rule PRECIOUS ( /targets/ * ) +] + +The =PRECIOUS= rule specifies that each of the targets passed as the arguments +should not be removed even if the command updating that target fails. + +[endsect] + +[section =PAD= ] + +[pre +rule PAD ( /string/ : /width/ ) +] + +If /string/ is shorter than /width/ characters, pads it with whitespace +characters on the right, and returns the result. Otherwise, returns +/string/ unmodified. + +[endsect] + +[section =FILE_OPEN= ] + +[pre +rule FILE_OPEN ( /filename/ : /mode/ ) +] + +The =FILE_OPEN= rule opens the specified file and returns a file +descriptor. The /mode/ parameter can be either "w" or "r". Note +that at present, only the =UPDATE_NOW= rule can use the resulting +file descriptor number. + +[endsect] + +[section =UPDATE_NOW= ] + +[pre +rule UPDATE_NOW ( /targets/ * : /log/ ? : /ignore-minus-n/ ? ) +] + +The =UPDATE_NOW= caused the specified targets to be updated immediately. +If update was successfull, non-empty string is returned. The /log/ parameter, +if present, specifies a descriptor of a file where all output from building +is redirected. If the /ignore-minus-n/ parameter is specified, the targets +are updated even if the =-n= parameter is specified on the command line. + +[endsect] + +[endsect] + +[endsect] + +[endsect] + +[section Flow-of-Control] + +=B2= has several simple flow-of-control statements: + +[pre +for /var/ in /list/ { /statements/ } +] + +Executes /statements/ for each element in /list/, setting the variable /var/ to the element value. + +[pre +if /cond/ { /statements/ } +\[ else { /statements/ } \] +] + +Does the obvious; the =else= clause is optional. /cond/ is built of: + +[variablelist + +[[[^['a]]] + [true if any ['a] element is a non-zero-length string]] + +[[[^['a] = ['b]]] + [list ['a] matches list ['b] string-for-string]] + +[[[^['a] != ['b]]] + [list ['a] does not match list ['b]]] + +[[[^['a] < ['b]]] + [['a\[i\]] string is less than ['b\[i\]] string, where ['i] is first mismatched element in lists ['a] and ['b]]] + +[[[^['a] <= ['b]]] + [every ['a] string is less than or equal to its ['b] counterpart]] + +[[[^['a] > ['b]]] + [['a\[i\]] string is greater than ['b\[i\]] string, where ['i] is first mismatched element]] + +[[[^['a] >= ['b]]] + [every ['a] string is greater than or equal to its ['b] counterpart]] + +[[[^['a] in ['b]]] + [true if all elements of ['a] can be found in ['b], or if ['a] has no elements]] + +[[[^! ['cond]]] + [condition not true]] + +[[[^['cond] && ['cond]]] + [conjunction]] + +[[[^['cond] || ['cond]]] + [disjunction]] + +[[[^( ['cond] )]] + [precedence grouping]] + +] + +[pre +include /file/ ; +] + +Causes =b2= to read the named /file/. The /file/ is bound like a regular target (see Binding above) but unlike a regular target the include /file/ cannot be built. + +The include /file/ is inserted into the input stream during the parsing phase. The primary input file and all the included file(s) are treated as a single file; that is, =b2= infers no scope boundaries from included files. + +[pre +local /vars/ \[ = /values/ \] ; +] + +Creates new /vars/ inside to the enclosing ={}= block, obscuring any previous values they might have. The previous values for vars are restored when the current block ends. Any rule called or file included will see the local and not the previous value (this is sometimes called Dynamic Scoping). The local statement may appear anywhere, even outside of a block (in which case the previous value is restored when the input ends). The /vars/ are initialized to /values/ if present, or left uninitialized otherwise. + +[pre +return /values/ ; +] + +Within a rule body, the return statement sets the return value for an invocation of the rule and returns to the caller. + +[pre +switch /value/ +{ + case /pattern1/ : /statements/ ; + case /pattern2/ : /statements/ ; + ... +} +] + +The switch statement executes zero or one of the enclosed /statements/, depending on which, if any, is the first case whose /pattern/ matches /value/. The /pattern/ values are not variable-expanded. The pattern values may include the following wildcards: + +[variablelist + +[[[^?]] + [match any single character]] + +[[[^*]] + [match zero or more characters]] + +[[[^\[/chars/\]]] + [match any single character in /chars/]] + +[[[^\[\^/chars/\]]] + [match any single character not in /chars/]] + +[[[^\\/x/]] + [match /x/ (escapes the other wildcards)]] + +] + +[pre +while /cond/ { /statements/ } +] + +Repeatedly execute /statements/ while /cond/ remains true upon entry. (See the description of /cond/ expression syntax under if, above). + +[pre +break ; +] + +Immediately exits the nearest enclosing while or for loop. + +[pre +continue ; +] + +Jumps to the top of the nearest enclosing while or for loop. + +[endsect] + +[section Variables] + +=B2= variables are lists of zero or more elements, with each element being a string value. An undefined variable is indistinguishable from a variable with an empty list, however, a defined variable may have one more elements which are null strings. All variables are referenced as [^$(/variable/)]. + +Variables are either global or target-specific. In the latter case, the variable takes on the given value only during the updating of the specific target. + +A variable is defined with: + +[pre +/variable/ = /elements/ ; +/variable/ += /elements/ ; +/variable/ on /targets/ = /elements/ ; +/variable/ on /targets/ += /elements/ ; +/variable/ default = /elements/ ; +/variable/ ?= /elements/ ; +] + +The first two forms set /variable/ globally. The third and forth forms set a target-specific variable. The [^\=] operator replaces any previous elements of /variable/ with /elements/; the [^+=] operation adds /elements/ to /variable/'s list of elements. The final two forms are synonymous: they set /variable/ globally, but only if it was previously unset. + +Variables referenced in updating commands will be replaced with their values; target-specific values take precedence over global values. Variables passed as arguments (=$(1)= and =$(2)=) to actions are replaced with their bound values; the "=bind=" modifier can be used on actions to cause other variables to be replaced with bound values. See Action Modifiers above. + +=B2= variables are not re-exported to the environment of the shell that executes the updating actions, but the updating actions can reference =b2= variables with [^$(/variable/)]. + +[section:expansion Variable Expansion] + +During parsing, =b2= performs variable expansion on each token that is not a keyword or rule name. Such tokens with embedded variable references are replaced with zero or more tokens. Variable references are of the form [^$(/v/)] or [^$(/vm/)], where ['v] is the variable name, and ['m] are optional modifiers. + +Variable expansion in a rule's actions is similar to variable expansion in statements, except that the action string is tokenized at whitespace regardless of quoting. + +The result of a token after variable expansion is the /product/ of the components of the token, where each component is a literal substring or a list substituting a variable reference. For example: + +[pre +$(X) -> a b c +t$(X) -> ta tb tc +$(X)z -> az bz cz +$(X)-$(X) -> a-a a-b a-c b-a b-b b-c c-a c-b c-c +] + +The variable name and modifiers can themselves contain a variable reference, and this partakes of the product as well: + +[pre +$(X) -> a b c +$(Y) -> 1 2 +$(Z) -> X Y +$($(Z)) -> a b c 1 2 +] + +Because of this product expansion, if any variable reference in a token is undefined, the result of the expansion is an empty list. If any variable element is a null string, the result propagates the non-null elements: + +[pre +$(X) -> a "" +$(Y) -> "" 1 +$(Z) -> +-$(X)$(Y)- -> -a- -a1- -- -1- +-$(X)$(Z)- -> +] + +A variable element's string value can be parsed into grist and filename-related components. Modifiers to a variable are used to select elements, select components, and replace components. The modifiers are: + +[variablelist + +[[[^\[['n]\]]] [Select element number ['n] (starting at 1). If the variable + contains fewer than ['n] elements, the result is a zero-element list. ['n] + can be negative in which case the element number ['n] from the last leftward + is returned.]] + +[[[^\[['n]-['m]\]]] + [Select elements number ['n] through ['m]. ['n] and ['m] can be negative in which case they refer to elements counting from the last leftward.]] + +[[[^\[['n]-\]]] + [Select elements number ['n] through the last. ['n] can be negative in which case it refers to the element counting from the last leftward.]] + +[[[^:B]] + [Select filename base.]] + +[[[^:S]] + [Select (last) filename suffix.]] + +[[[^:M]] + [Select archive member name.]] + +[[[^:D]] + [Select directory path.]] + +[[[^:P]] + [Select parent directory.]] + +[[[^:G]] + [Select grist.]] + +[[[^:U]] + [Replace lowercase characters with uppercase.]] + +[[[^:L]] + [Replace uppercase characters with lowercase.]] + +[[[^:T]] + [Converts all back-slashes ("\\") to forward slashes ("/"). For example +`` + x = "C:\\Program Files\\Borland" ; ECHO $(x:T) ; +`` +prints [^"C:/Program Files/Borland"] +]] + +[[[^:W]] + [When invoking Windows-based tools from [@http://www.cygwin.com/ Cygwin] + it can be important to pass them true windows-style paths. The =:W= + modifier, *under Cygwin only*, turns a cygwin path into a Win32 path using + the [@http://www.cygwin.com/cygwin-api/func-cygwin-conv-to-win32-path.html + =cygwin_conv_to_win32_path=] function. For example +`` + x = "/cygdrive/c/Program Files/Borland" ; ECHO $(x:W) ; +`` +prints [^"C:\\Program Files\\Borland"] on Cygwin + +Similarly, when used on OpenVMS, the =:W= modifier translates a POSIX-style path into native VMS-style format using =decc$to_vms= CRTL function. This modifier is generally used inside action blocks to properly specify file paths in VMS-specific commands. For example +`` + x = "subdir/filename.c" ; ECHO $(x:W) ; +`` +prints [^"\[.subdir\]filename.c"] on OpenVMS + +On other platforms, the string is unchanged. +]] + +[[[^:['chars]]] + [Select the components listed in ['chars].]] + +[[[^:G=['grist]]] + [Replace grist with ['grist].]] + +[[[^:D=['path]]] + [Replace directory with ['path].]] + +[[[^:B=['base]]] + [Replace the base part of file name with ['base].]] + +[[[^:S=['suf]]] + [Replace the suffix of file name with ['suf].]] + +[[[^:M=['mem]]] + [Replace the archive member name with ['mem].]] + +[[[^:R=['root]]] + [Prepend ['root] to the whole file name, if not already rooted.]] + +[[[^:E=['value]]] + [Assign ['value] to the variable if it is unset.]] + +[[[^:J=['joinval]]] + [Concatentate list elements into single element, separated by ['joinval]'.]] + +] + +On VMS, [^$(var:P)] is the parent directory of [^$(var:D)]. + +[endsect] + +[section Local For Loop Variables] + +Boost Jam allows you to declare a local for loop control variable right in the loop: + +[pre +x = 1 2 3 ; +y = 4 5 6 ; +for *local* y in $(x) +{ + ECHO $(y) ; # prints "1", "2", or "3" +} +ECHO $(y) ; # prints "4 5 6" +] + +[endsect] + +[section:atfile Generated File Expansion] + +During expansion of expressions =b2= also looks for subexpressions of the form +=@(filename:E=filecontents)= and replaces the expression with =filename= after +creating the given file with the contents set to =filecontents=. This is useful +for creating compiler response files, and other "internal" files. The expansion +works both during parsing and action execution. Hence it is possible to create +files during any of the three build phases. + +[endsect] + +[section:builtins Built-in Variables] + +This section discusses variables that have special meaning to =b2=. All of +these must be defined or used in the global module -- using those variables +inside a named module will not have the desired effect. +See [link jam.language.modules Modules]. + +[section:search SEARCH and LOCATE] + +These two variables control the binding of file target names to locations in +the file system. Generally, =$(SEARCH)= is used to find existing sources +while =$(LOCATE)= is used to fix the location for built targets. + +Rooted (absolute path) file targets are bound as is. Unrooted file target names are also normally bound as is, and thus relative to the current directory, but the settings of =$(LOCATE)= and =$(SEARCH)= alter this: + +* If =$(LOCATE)= is set then the target is bound relative to the first directory in =$(LOCATE)=. Only the first element is used for binding. +* If =$(SEARCH)= is set then the target is bound to the first directory in =$(SEARCH)= where the target file already exists. +* If the =$(SEARCH)= search fails, the target is bound relative to the current directory anyhow. + +Both =$(SEARCH)= and =$(LOCATE)= should be set target-specific and not globally. If they were set globally, =b2= would use the same paths for all file binding, which is not likely to produce sane results. When writing your own rules, especially ones not built upon those in Jambase, you may need to set =$(SEARCH)= or =$(LOCATE)= directly. Almost all of the rules defined in Jambase set =$(SEARCH)= and =$(LOCATE)= to sensible values for sources they are looking for and targets they create, respectively. + +[endsect] + +[section:hdrscan HDRSCAN and HDRRULE] + +These two variables control header file scanning. =$(HDRSCAN)= is an +=egrep(1)= pattern, with ()'s surrounding the file name, used to find file +inclusion statements in source files. =Jambase= uses =$(HDRPATTERN)= as the +pattern for =$(HDRSCAN)=. =$(HDRRULE)= is the name of a rule to invoke with +the results of the scan: the scanned file is the target, the found files are +the sources. This is the only place where =b2= invokes a rule through a +variable setting. + +Both =$(HDRSCAN)= and =$(HDRRULE)= must be set for header file scanning to take place, and they should be set target-specific and not globally. If they were set globally, all files, including executables and libraries, would be scanned for header file include statements. + +The scanning for header file inclusions is not exact, but it is at least dynamic, so there is no need to run something like =makedepend(GNU)= to create a static dependency file. The scanning mechanism errs on the side of inclusion (i.e., it is more likely to return filenames that are not actually used by the compiler than to miss include files) because it can't tell if `#include` lines are inside `#ifdefs` or other conditional logic. In =Jambase=, =HdrRule= applies the =NOCARE= rule to each header file found during scanning so that if the file isn't present yet doesn't cause the compilation to fail, =b2= won't care. + +Also, scanning for regular expressions only works where the included file name is literally in the source file. It can't handle languages that allow including files using variable names (as the =Jam= language itself does). + +[endsect] + +[section Semaphores] + +It is sometimes desirable to disallow parallel execution of some actions. For example: + +* Old versions of yacc use files with fixed names. So, running two yacc actions is dangerous. +* One might want to perform parallel compiling, but not do parallel linking, because linking is i/o bound and only gets slower. + +Craig McPeeters has extended Perforce Jam to solve such problems, and that extension was integrated in Boost.Jam. + +Any target can be assigned a /semaphore/, by setting a variable called =SEMAPHORE= on that target. The value of the variable is the semaphore name. It must be different from names of any declared target, but is arbitrary otherwise. + +The semantic of semaphores is that in a group of targets which have the same semaphore, only one can be updated at the moment, regardless of "=-j=" option. + +[endsect] + +[section Platform Identifier] + +A number of Jam built-in variables can be used to identify runtime platform: + +[variablelist +[[=OS=] [OS identifier string]] +[[=OSPLAT=] [Underlying architecture, when applicable]] +[[=MAC=] [true on MAC platform]] +[[=NT=] [true on NT platform]] +[[=OS2=] [true on OS2 platform]] +[[=UNIX=] [true on Unix platforms]] +[[=VMS=] [true on VMS platform]] +] + +[endsect] + +[section Jam Version] + +[variablelist +[[=JAMDATE=] [Time and date at =b2= start-up as an ISO-8601 UTC value.]] +[[=JAMUNAME=] [Ouput of uname(1) command (Unix only)]] +[[=JAMVERSION=] [=b2= version, currently ":version:"]] +[[=JAM_VERSION=] [A predefined global variable with two elements indicates the version number of Boost Jam. Boost Jam versions start at "=03=" "=00=". Earlier versions of =Jam= do not automatically define =JAM_VERSION=.]] +] + +[endsect] + +[section JAMSHELL] + +When =b2= executes a rule's action block, it forks and execs a shell, passing the action block as an argument to the shell. The invocation of the shell can be controlled by =$(JAMSHELL)=. The default on Unix is, for example: + +[pre +JAMSHELL = /bin/sh -c % ; +] + +The =%= is replaced with the text of the action block. + +=B2= does not directly support building in parallel across multiple hosts, since that is heavily dependent on the local environment. To build in parallel across multiple hosts, you need to write your own shell that provides access to the multiple hosts. You then reset =$(JAMSHELL)= to reference it. + +Just as =b2= expands a =%= to be the text of the rule's action block, it expands a =!= to be the multi-process slot number. The slot number varies between 1 and the number of concurrent jobs permitted by the =-j= flag given on the command line. Armed with this, it is possible to write a multiple host shell. For example: + +[pre +#!/bin/sh + +# This sample JAMSHELL uses the SunOS on(1) command to execute a +# command string with an identical environment on another host. + +# Set JAMSHELL = jamshell ! % +# +# where jamshell is the name of this shell file. +# +# This version handles up to -j6; after that they get executed +# locally. + +case $1 in +1|4) on winken sh -c "$2";; +2|5) on blinken sh -c "$2";; +3|6) on nod sh -c "$2";; +*) eval "$2";; +esac +] + +[endsect] + +[section:actionrule =__TIMING_RULE__= and =__ACTION_RULE__=] + +The =__TIMING_RULE__= and =__ACTION_RULE__= can be set to the name of a rule +for =b2= to call *after* an action completes for a target. They both give +diagnostic information about the action that completed. For =__TIMING_RULE__= +the rule is called as: + + rule timing-rule ( args * : target : start end user system ) + +And =__ACTION_RULE__= is called as: + + rule action-rule ( args * : target : command status start end user system : output ? ) + +The arguments for both are: + +[variablelist + [[[^args]] + [Any values following the rule name in the =__TIMING_RULE__= or =__ACTION_RULE__= + are passed along here.]] + [[[^target]] + [The =b2= target that was built.]] + [[[^command]] + [The text of the executed command in the action body.]] + [[[^status]] + [The integer result of the executed command.]] + [[[^start]] + [The starting timestamp of the executed command as a ISO-8601 UTC value.]] + [[[^end]] + [The completion timestamp of the executed command as a ISO-8601 UTC value.]] + [[[^user]] + [The number of user CPU seconds the executed command spent as a floating + point value.]] + [[[^system]] + [The number of system CPU seconds the executed command spent as a floating + point value.]] + [[[^output]] + [The output of the command as a single string. The content of the output + reflects the use of the =-pX= option.]] +] + +[note + If both variables are set for a target both are called, first =__TIMING_RULE__= + then =__ACTION_RULE__=. ] + +[endsect] + +[endsect] + +[endsect] + +[section Modules] + +Boost Jam introduces support for modules, which provide some rudimentary namespace protection for rules and variables. A new keyword, "=module=" was also introduced. The features described in this section are primitives, meaning that they are meant to provide the operations needed to write Jam rules which provide a more elegant module interface. + +[section Declaration] + +[pre +module /expression/ { ... } +] + +Code within the [^{ ... }] executes within the module named by evaluating expression. Rule definitions can be found in the module's own namespace, and in the namespace of the global module as /module-name/./rule-name/, so within a module, other rules in that module may always be invoked without qualification: + +[pre +*module my_module* +*{* + rule salute ( x ) { ECHO $(x), world ; } + rule greet ( ) { salute hello ; } + greet ; +*}* +*my_module.salute* goodbye ; +] + +When an invoked rule is not found in the current module's namespace, it is looked up in the namespace of the global module, so qualified calls work across modules: + +[pre +module your_module +{ + rule bedtime ( ) { *my_module.salute* goodnight ; } +} +] + +[endsect] + +[section Variable Scope] + +Each module has its own set of dynamically nested variable scopes. When execution passes from module A to module B, all the variable bindings from A become unavailable, and are replaced by the bindings that belong to B. This applies equally to local and global variables: + +[pre +module A +{ + x = 1 ; + rule f ( ) + { + local y = 999 ; # becomes visible again when B.f calls A.g + B.f ; + } + rule g ( ) + { + ECHO $(y) ; # prints "999" + } +} +module B +{ + y = 2 ; + rule f ( ) + { + ECHO $(y) ; # always prints "2" + A.g ; + } +} +] + +The only way to access another module's variables is by entering that module: + +[pre +rule peek ( module-name ? : variables + ) +{ + module $(module-name) + { + return $($(>)) ; + } +} +] + +Note that because existing variable bindings change whenever a new module scope is entered, argument bindings become unavailable. That explains the use of "=$(>)=" in the peek rule above. + +[endsect] + +[section Local Rules] + +[pre +local rule /rulename/... +] + +The rule is declared locally to the current module. It is not entered in the global module with qualification, and its name will not appear in the result of: + +[pre +\[ RULENAMES /module-name/ \] +] + +[endsect] + +[section The =RULENAMES= Rule] + +[pre +rule RULENAMES ( /module/ ? ) +] + +Returns a list of the names of all non-local rules in the given module. If /module/ is omitted, the names of all non-local rules in the global module are returned. + +[endsect] + +[section The =VARNAMES= Rule] + +[pre +rule VARNAMES ( /module/ ? ) +] + +Returns a list of the names of all variable bindings in the given module. If /module/ is omitted, the names of all variable bindings in the global module are returned. + +[note This includes any local variables in rules from the call stack which have not returned at the time of the =VARNAMES= invocation.] + +[endsect] + +[section The =IMPORT= Rule] + +=IMPORT= allows rule name aliasing across modules: + +[pre +rule IMPORT ( /source_module/ ? : /source_rules/ * + : /target_module/ ? : /target_rules/ * ) +] + +The =IMPORT= rule copies rules from the /source_module/ into the /target_module/ as local rules. If either /source_module/ or /target_module/ is not supplied, it refers to the global module. /source_rules/ specifies which rules from the /source_module/ to import; /target_rules/ specifies the names to give those rules in /target_module/. If /source_rules/ contains a name which doesn't correspond to a rule in /source_module/, or if it contains a different number of items than /target_rules/, an error is issued. For example, + +[pre +# import m1.rule1 into m2 as local rule m1-rule1. +IMPORT m1 : rule1 : m2 : m1-rule1 ; +# import all non-local rules from m1 into m2 +IMPORT m1 : \[ RULENAMES m1 \] : m2 : \[ RULENAMES m1 \] ; +] + +[endsect] + +[section The =EXPORT= Rule] + +=EXPORT= allows rule name aliasing across modules: + +[pre +rule EXPORT ( /module/ ? : /rules/ * ) +] + +The =EXPORT= rule marks /rules/ from the =source_module= as non-local (and thus exportable). If an element of /rules/ does not name a rule in /module/, an error is issued. For example, + +[pre +module X { + local rule r { ECHO X.r ; } +} +IMPORT X : r : : r ; # error - r is local in X +EXPORT X : r ; +IMPORT X : r : : r ; # OK. +] + +[endsect] + +[section The =CALLER_MODULE= Rule] + +[pre +rule CALLER_MODULE ( /levels/ ? ) +] + +=CALLER_MODULE= returns the name of the module scope enclosing the call to its caller (if levels is supplied, it is interpreted as an integer number of additional levels of call stack to traverse to locate the module). If the scope belongs to the global module, or if no such module exists, returns the empty list. For example, the following prints "{Y} {X}": + +[pre +module X { + rule get-caller { return \[ CALLER_MODULE \] ; } + rule get-caller's-caller { return \[ CALLER_MODULE 1 \] ; } + rule call-Y { return Y.call-X2 ; } +} +module Y { + rule call-X { return X.get-caller ; } + rule call-X2 { return X.get-caller's-caller ; } +} +callers = \[ X.get-caller \] \[ Y.call-X \] \[ X.call-Y \] ; +ECHO {$(callers)} ; +] + +[endsect] + +[section The =DELETE_MODULE= Rule] + +[pre +rule DELETE_MODULE ( /module/ ? ) +] + +=DELETE_MODULE= removes all of the variable bindings and otherwise-unreferenced rules from the given module (or the global module, if no module is supplied), and returns their memory to the system. + +[note Though it won't affect rules that are currently executing until they complete, =DELETE_MODULE= should be used with extreme care because it will wipe out any others and all variable (including locals in that module) immediately. Because of the way dynamic binding works, variables which are shadowed by locals will not be destroyed, so the results can be really unpredictable.] + +[endsect] + +[endsect] + +[endsect] + +[section Miscellaneous] + +[section Diagnostics] + +In addition to generic error messages, =b2= may emit one of the following: + +[pre warning: unknown rule X] + +A rule was invoked that has not been defined with an "=actions=" or "=rule=" statement. + +[pre using N temp target(s)] + +Targets marked as being temporary (but nonetheless present) have been found. + +[pre updating N target(s)] + +Targets are out-of-date and will be updated. + +[pre can't find N target(s)] + +Source files can't be found and there are no actions to create them. + +[pre can't make N target(s)] + +Due to sources not being found, other targets cannot be made. + +[pre warning: X depends on itself] + +A target depends on itself either directly or through its sources. + +[pre don't know how to make X] + +A target is not present and no actions have been defined to create it. + +[pre X skipped for lack of Y] + +A source failed to build, and thus a target cannot be built. + +[pre warning: using independent target X] + +A target that is not a dependency of any other target is being referenced with =$(<)= or =$(>)=. + +[pre X removed] + +=B2= removed a partially built target after being interrupted. + +[endsect] + +[section Bugs, Limitations] + +For parallel building to be successful, the dependencies among files must be properly spelled out, as targets tend to get built in a quickest-first ordering. Also, beware of un-parallelizable commands that drop fixed-named files into the current directory, like =yacc(1)= does. + +A poorly set =$(JAMSHELL)= is likely to result in silent failure. + +[endsect] + +[section Fundamentals] + +This section is derived from the official Jam documentation and from experience using it and reading the Jambase rules. We repeat the information here mostly because it is essential to understanding and using Jam, but is not consolidated in a single place. Some of it is missing from the official documentation altogether. We hope it will be useful to anyone wishing to become familiar with Jam and the Boost build system. + +* Jam "=rules=" are actually simple procedural entities. Think of them as functions. Arguments are separated by colons. + +* A Jam *target* is an abstract entity identified by an arbitrary string. The build-in =DEPENDS= rule creates a link in the dependency graph between the named targets. + +* Note that the original Jam documentation for the built-in =INCLUDES= rule is incorrect: [^INCLUDES ['targets1] : ['targets2]] causes everything that depends on a member of /targets1/ to depend on all members of /targets2/. It does this in an odd way, by tacking /targets2/ onto a special tail section in the dependency list of everything in /targets1/. It seems to be OK to create circular dependencies this way; in fact, it appears to be the "right thing to do" when a single build action produces both /targets1/ and /targets2/. + +* When a rule is invoked, if there are =actions= declared with the same name as the rule, the actions are added to the updating actions for the target identified by the rule's first argument. It is actually possible to invoke an undeclared rule if corresponding actions are declared: the rule is treated as empty. + +* Targets (other than =NOTFILE= targets) are associated with paths in the file system through a process called binding. Binding is a process of searching for a file with the same name as the target (sans grist), based on the settings of the target-specific =SEARCH= and =LOCATE= variables. + +* In addition to local and global variables, jam allows you to set a variable =on= a target. Target-specific variable values can usually not be read, and take effect only in the following contexts: + + * In updating actions, variable values are first looked up =on= the target named by the first argument (the target being updated). Because Jam builds its entire dependency tree before executing actions, Jam rules make target-specific variable settings as a way of supplying parameters to the corresponding actions. + * Binding is controlled /entirely/ by the target-specific setting of the =SEARCH= and =LOCATE= variables, as described here. + * In the special rule used for header file scanning, variable values are first looked up =on= the target named by the rule's first argument (the source file being scanned). + +* The "bound value" of a variable is the path associated with the target named by the variable. In build actions, the first two arguments are automatically replaced with their bound values. Target-specific variables can be selectively replaced by their bound values using the =bind= action modifier. + +* Note that the term "binding" as used in the Jam documentation indicates a phase of processing that includes three sub-phases: /binding/ (yes!), update determination, and header file scanning. The repetition of the term "binding" can lead to some confusion. In particular, the Modifying Binding section in the Jam documentation should probably be titled "Modifying Update Determination". + +* "Grist" is just a string prefix of the form </characters/>. It is used in Jam to create unique target names based on simpler names. For example, the file name "=test.exe=" may be used by targets in separate subprojects, or for the debug and release variants of the "same" abstract target. Each distinct target bound to a file called "test.exe" has its own unique grist prefix. The Boost build system also takes full advantage of Jam's ability to divide strings on grist boundaries, sometimes concatenating multiple gristed elements at the beginning of a string. Grist is used instead of identifying targets with absolute paths for two reasons: + + # The location of targets cannot always be derived solely from what the user puts in a Jamfile, but sometimes depends also on the binding process. Some mechanism to distinctly identify targets with the same name is still needed. + # Grist allows us to use a uniform abstract identifier for each built target, regardless of target file location (as allowed by setting ALL_LOCATE_TARGET). + +* When grist is extracted from a name with $(var:G), the result includes the leading and trailing angle brackets. When grist is added to a name with $(var:G=expr), existing grist is first stripped. Then, if expr is non-empty, leading <s and trailing >s are added if necessary to form an expression of the form <expr2>; <expr2> is then prepended. + +* When Jam is invoked it imports all environment variable settings into corresponding Jam variables, followed by all command-line (-s...) variable settings. Variables whose name ends in PATH, Path, or path are split into string lists on OS-specific path-list separator boundaries (e.g. ":" for UNIX and ";" for Windows). All other variables are split on space (" ") boundaries. Boost Jam modifies that behavior by allowing variables to be quoted. + +* A variable whose value is an empty list or which consists entirely of empty + strings has a negative logical value. Thus, for example, code like the + following allows a sensible non-empty default which can easily be overridden + by the user: + `` +MESSAGE ?\= starting jam... ; +if $(MESSAGE) { ECHO The message is: $(MESSAGE) ; } +`` + If the user wants a specific message, he invokes jam with [^"-sMESSAGE\=message text"]. If he wants no message, he invokes jam with [^-sMESSAGE\=] and nothing at all is printed. + +* The parsing of command line options in Jam can be rather unintuitive, with regards to how other Unix programs accept options. There are two variants accepted as valid for an option: + + # =-xvalue=, and + # =-x value=. + +[endsect] + +[endsect] + + +[section History] +[include history.qbk] +[endsect] diff --git a/boost/tools/build/doc/boost.png b/boost/tools/build/doc/boost.png Binary files differnew file mode 100644 index 00000000..b4d51fcd --- /dev/null +++ b/boost/tools/build/doc/boost.png diff --git a/boost/tools/build/doc/boostbook.css b/boost/tools/build/doc/boostbook.css new file mode 100644 index 00000000..84d52019 --- /dev/null +++ b/boost/tools/build/doc/boostbook.css @@ -0,0 +1,706 @@ + +/*============================================================================= +Copyright (c) 2004 Joel de Guzman +http://spirit.sourceforge.net/ + +Copyright 2013 Niall Douglas additions for colors and alignment. +Copyright 2013 Paul A. Bristow additions for more colors and alignments. + +Distributed under the Boost Software License, Version 1.0. (See accompany- +ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +=============================================================================*/ + +/*============================================================================= +Body defaults +=============================================================================*/ + + body + { + font-size: 16px; + max-width: 60em; + padding-left: 4em; + padding-right: 4em; + margin: auto; + font-family: sans-serif; + } + +/*============================================================================= +Paragraphs +=============================================================================*/ + + p + { + text-align: left; + } + +/*============================================================================= +Program listings +=============================================================================*/ + + /* Code on paragraphs */ + p tt.computeroutput + { + + } + + pre.synopsis + { + margin: 1pc 4% 0pc 4%; + padding: 0.5pc 0.5pc 0.5pc 0.5pc; + } + + .programlisting, + .screen + { + display: block; + margin: 1pc 4% 0pc 4%; + padding: 0.5pc 0.5pc 0.5pc 0.5pc; + } + + /* Program listings in tables don't get borders */ + td .programlisting, + td .screen + { + margin: 0pc 0pc 0pc 0pc; + padding: 0pc 0pc 0pc 0pc; + } + +/*============================================================================= +Headings +=============================================================================*/ + + h1, h2, h3, h4, h5, h6 + { + text-align: left; + margin: 1em 0em 0.5em 0em; + font-weight: bold; + } + + h1 { font-size: 140%; } + h2 { font-weight: bold; font-size: 140%; color: rgb(74, 100, 132); } + h3 { font-weight: bold; font-size: 130%; } + h4 { font-weight: bold; font-size: 120%; } + h5 { font-weight: normal; font-style: italic; font-size: 110%; } + h6 { font-weight: normal; font-style: italic; font-size: 100%; } + + /* Top page titles */ + title, + h1.title, + h2.title + h3.title, + h4.title, + h5.title, + h6.title, + .refentrytitle + { + font-weight: bold; + margin-bottom: 1pc; + } + + h1.title { font-size: 140% } + h2.title { font-size: 140% } + h3.title { font-size: 130% } + h4.title { font-size: 120% } + h5.title { font-size: 110% } + h6.title { font-size: 100% } + + .section h1 + { + margin: 0em 0em 0.5em 0em; + font-size: 140%; + } + + .section h2 { font-size: 140% } + .section h3 { font-size: 130% } + .section h4 { font-size: 120% } + .section h5 { font-size: 110% } + .section h6 { font-size: 100% } + + /* Code on titles */ + h1 tt.computeroutput { font-size: 140% } + h2 tt.computeroutput { font-size: 140% } + h3 tt.computeroutput { font-size: 130% } + h4 tt.computeroutput { font-size: 130% } + h5 tt.computeroutput { font-size: 130% } + h6 tt.computeroutput { font-size: 130% } + + +/*============================================================================= +Author +=============================================================================*/ + + h3.author + { + font-size: 100% + } + +/*============================================================================= +Lists +=============================================================================*/ + + li + { + } + + /* Unordered lists */ + ul + { + text-align: left; + } + + /* Ordered lists */ + ol + { + text-align: left; + } + +/*============================================================================= +Links +=============================================================================*/ + + a + { + text-decoration: none; /* no underline */ + } + + a:hover + { + text-decoration: underline; + } + +/*============================================================================= +Spirit style navigation +=============================================================================*/ + + .spirit-nav + { + text-align: right; + } + + .spirit-nav a + { + color: white; + padding-left: 0.5em; + } + + .spirit-nav img + { + border-width: 0px; + } + +/*============================================================================= +Copyright footer +=============================================================================*/ + .copyright-footer + { + margin-top: 3em; + } + +/*============================================================================= +Table of contents +=============================================================================*/ + + div.toc + { + font-size: 14px; + } + + .boost-toc + { + float: right; + padding: 0.5pc; + } + + /* Code on toc */ + .toc .computeroutput { font-size: 120% } + + /* No margin on nested menus */ + + .toc dl dl { margin: 0; } + +/*============================================================================= +Tables +=============================================================================*/ + + .informaltable table, + .table table + { + width: 100%; + } + + .table p.title + { + text-align: right; + color: #959595; + margin-bottom: 0; + } + + .table p.title b + { + font-weight: normal; + } + + /* Table Cells */ + div.informaltable table tr td, + div.table table tr td + { + padding: 0.5em; + text-align: left; + } + + + div.informaltable table tr th, + div.table table tr th + { + padding: 0.5em 0.5em 0.5em 0.5em; + border: 1pt solid white; + font-size: 80%; + } + + table.simplelist + { + width: auto !important; + margin: 0em !important; + padding: 0em !important; + border: none !important; + } + table.simplelist td + { + margin: 0em !important; + padding: 0em !important; + text-align: left !important; + border: none !important; + } + +/*============================================================================= +Blurbs +=============================================================================*/ + + div.note, + div.tip, + div.important, + div.caution, + div.warning, + p.blurb + { + display: block; + padding: 0.5em; + border: 1px solid #ddd; + } + + div.note h3, div.tip h3, div.important h3, div.caution h3, div.warning h3 + { + font-size: 100%; + margin: 0 !important; + display: inline; + } + + div.note p, div.tip p, div.important p, div.caution p, div.warning p + { + margin: 0; + } + + div.warning + { + border-left: 6px solid #f2dede; + } + + div.tip, div.note + { + border-left: 6px solid #d9edf7; + } + + p.blurb img + { + padding: 1pt; + } + +/*============================================================================= +Variable Lists +=============================================================================*/ + + div.variablelist + { + margin: 1em 0; + } + + /* Make the terms in definition lists bold */ + div.variablelist dl dt, + span.term + { + font-weight: bold; + } + + div.variablelist table tbody tr td + { + text-align: left; + vertical-align: top; + padding: 0em 2em 0em 0em; + margin: 0em 0em 0.5em 0em; + } + + div.variablelist dl dt + { + margin-bottom: 0.2em; + } + + div.variablelist dl dd + { + margin: 0em 0em 0.5em 2em; + } + + div.variablelist table tbody tr td p, + div.variablelist dl dd p + { + margin: 0em 0em 0.5em 0em; + } + +/*============================================================================= +Misc +=============================================================================*/ + + /* Title of books and articles in bibliographies */ + span.title + { + font-style: italic; + } + + span.underline + { + text-decoration: underline; + } + + span.strikethrough + { + text-decoration: line-through; + } + + /* Copyright, Legal Notice */ + div div.legalnotice p + { + text-align: left + } + +/*============================================================================= +Colors +=============================================================================*/ + + @media screen + { + body { + background-color: #FFFFFF; + color: #000000; + } + + /* Syntax Highlighting */ + .keyword { color: #0000AA; } + .identifier { color: #000000; } + .special { color: #707070; } + .preprocessor { color: #402080; } + .char { color: teal; } + .comment { color: #800000; } + .string { color: teal; } + .number { color: teal; } + .white_bkd { background-color: #FFFFFF; } + .dk_grey_bkd { background-color: #999999; } + + /* Links */ + a, a .keyword, a .identifier, a .special, a .preprocessor + a .char, a .comment, a .string, a .number + { + color: #005a9c; + } + + a:visited, a:visited .keyword, a:visited .identifier, + a:visited .special, a:visited .preprocessor a:visited .char, + a:visited .comment, a:visited .string, a:visited .number + { + color: #9c5a9c; + } + + h1 a, h2 a, h3 a, h4 a, h5 a, h6 a, + h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover, + h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited + { + text-decoration: none; /* no underline */ + color: #000000; + } + + /* Copyright, Legal Notice */ + .copyright + { + color: #666666; + margin-left: 4em; + } + + div div.legalnotice p + { + color: #666666; + } + + /* Program listing */ + pre.synopsis + { + border: 1px solid #ddd; + border-left: 6px solid #ddd; + padding: 0.5em; + margin: 1em 0px; + } + + .programlisting, + .screen + { + border: 1px solid #ddd; + border-left: 6px solid #ddd; + padding: 0.5em; + margin: 1em 0px; + } + + td .programlisting, + td .screen + { + border: 1px solid #ddd; + border-left: 6px solid #ddd; + padding: 0.5em; + margin: 1em 0px; + } + + /* Table of contents */ + div.toc + { + border: 1px solid #ddd; + padding-left: 0.5em; + } + + /* Tables */ + div.informaltable table tr td, + div.table table tr td + { + border: 1px solid #ddd; + } + + div.informaltable table tr th, + div.table table tr th + { + background-color: #F0F0F0; + border: 1px solid #ddd; + } + + .copyright-footer + { + color: #8F8F8F; + } + + /* Misc */ + span.highlight + { + color: #00A000; + } + } + + @media print + { + /* Links */ + a + { + color: black; + } + + a:visited + { + color: black; + } + + .spirit-nav + { + display: none; + } + + /* Program listing */ + pre.synopsis + { + border: 1px solid gray; + } + + .programlisting, + .screen + { + border: 1px solid gray; + } + + td .programlisting, + td .screen + { + border: 0px solid #ddd; + } + + /* Table of contents */ + div.toc + { + border: 1px solid gray; + } + + .informaltable table, + .table table + { + border: 1px solid gray; + border-collapse: collapse; + } + + /* Tables */ + div.informaltable table tr td, + div.table table tr td + { + border: 1px solid gray; + } + + div.informaltable table tr th, + div.table table tr th + { + border: 1px solid gray; + } + + table.simplelist tr td + { + border: none !important; + } + + /* Misc */ + span.highlight + { + font-weight: bold; + } + } + +/*============================================================================= +Images +=============================================================================*/ + + span.inlinemediaobject img + { + vertical-align: middle; + } + +/*============================================================================== +Super and Subscript: style so that line spacing isn't effected, see +http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=1&postId=5341 +==============================================================================*/ + +sup, +sub { +height: 0; +line-height: 1; +vertical-align: baseline; +position: relative; + +} + +/* For internet explorer: */ + +* html sup, +* html sub { +vertical-align: bottom; +} + +sup { +bottom: 1ex; +} + +sub { +top: .5ex; +} + +/*============================================================================== +Indexes: pretty much the same as the TOC. +==============================================================================*/ + + .index + { + font-size: 80%; + padding-top: 0px; + padding-bottom: 0px; + margin-top: 0px; + margin-bottom: 0px; + margin-left: 0px; + } + + .index ul + { + padding-left: 3em; + } + + .index p + { + padding: 2px; + margin: 2px; + } + + .index-entry-level-0 + { + font-weight: bold; + } + + .index em + { + font-weight: bold; + } + + +/*============================================================================== +Alignment and coloring use 'role' feature, available from Quickbook 1.6 up. +Added from Niall Douglas for role color and alignment. +http://article.gmane.org/gmane.comp.lib.boost.devel/243318 +*/ + +/* Add text alignment (see http://www.w3schools.com/cssref/pr_text_text-align.asp) */ +span.aligncenter +{ + display: inline-block; width: 100%; text-align: center; +} +span.alignright +{ + display: inline-block; width: 100%; text-align: right; +} +/* alignleft is the default. */ +span.alignleft +{ + display: inline-block; width: 100%; text-align: left; +} + +/* alignjustify stretches the word spacing so that each line has equal width +within a chosen fraction of page width (here arbitrarily 20%). +*Not* useful inside table items as the column width remains the total string width. +Nor very useful, except to temporarily restrict the width. +*/ +span.alignjustify +{ + display: inline-block; width: 20%; text-align: justify; +} + +/* Text colors. +Names at http://www.w3.org/TR/2002/WD-css3-color-20020219/ 4.3. X11 color keywords. +Quickbook Usage: [role red Some red text] + +*/ +span.red { inline-block; color: red; } +span.green { color: green; } +span.lime { color: #00FF00; } +span.blue { color: blue; } +span.navy { color: navy; } +span.yellow { color: yellow; } +span.magenta { color: magenta; } +span.indigo { color: #4B0082; } +span.cyan { color: cyan; } +span.purple { color: purple; } +span.gold { color: gold; } +span.silver { color: silver; } /* lighter gray */ +span.gray { color: #808080; } /* light gray */ + +div.titlepage hr { display: none; } +div.dedication h1 { display: none; } + +hr { + border: 0; + border-top: 1px solid #eee; +} + diff --git a/boost/tools/build/doc/history.qbk b/boost/tools/build/doc/history.qbk new file mode 100644 index 00000000..f5a89b0c --- /dev/null +++ b/boost/tools/build/doc/history.qbk @@ -0,0 +1,377 @@ +[variablelist + +[[3.1.18] [ + +After years of bjam developments.. This is going to be the last unbundled release of the +3.1.x series. From this point forward bjam will only be bundled as part of the larger +Boost Build system. And hence will likely change name at some point. As a side effect +of this move people will get more frequent release of bjam (or whatever it ends up being +called). + +[list + [li New built-ins, MD5, SPLIT_BY_CHARACTERS, PRECIOUS, PAD, FILE_OPEN, and UPDATE_NOW. + -- ['Vladimir P.] + ] + [li Ensure all file descriptors are closed when executing actions complete on *nix. + -- ['Noel B.] + ] + [li Fix warnings, patch from Mateusz Loskot. + -- ['Vladimir P.] + ] + [li Add KEEP_GOING var to programatically override the '-q' option. + -- ['Vladimir P.] + ] + [li Add more parameters, up to 19 from 9, to rule invocations. Patch from + Jonathan Biggar. + -- ['Vladimir P.] + ] + [li Print failed command output even if the normally quite '-d0' option. + -- ['Vladimir P.] + ] + [li Build of bjam with vc10, aka Visual Studio 2010. + -- ['Vladimir P.] + ] + [li More macros for detection of OSPLAT, patch from John W. Bito. + -- ['Vladimir P.] + ] + [li Add PARALLELISM var to programatically override the '-j' option. + -- ['Vladimir P.] + ] + [li Tweak doc building to allow for PDF generation of docs. + -- ['John M.] + ] +] + +]] + +[[3.1.17] [ + +A year in the making this release has many stability improvements and various performance +improvements. And because of the efforts of Jurko the code is considerably more readable! + +[list + [li Reflect the results of calling bjam from Python. + -- ['Rene R.] + ] + [li For building on Windows: Rework how arguments are parsed and tested to fix handling + of quoted arguments, options arguments, and arguments with "=". + -- ['Rene R.] + ] + [li Try to work around at least one compiler bug with GCC and variable aliasing that + causes crashes with hashing file cache entries. + -- ['Rene R.] + ] + [li Add -Wc,-fno-strict-aliasing for QCC/QNX to avoid the same aliasing crashes as in + the general GCC 4.x series (thanks to Niklas Angare for the fix). + -- ['Rene R.] + ] + [li On Windows let the child bjam commands inherit stdin, as some commands assume + it's available. + -- ['Rene R.] + ] + [li On Windows don't limit bjam output to ASCII as some tools output characters in + extended character sets. + -- ['Rene R.] + ] + [li Isolate running of bjam tests to individual bjam instances to prevent possible + spillover errors from one test affecting another test. Separate the bjam used to run + the tests vs. the bjam being tested. And add automatic re-building of the bjam being + tested. + -- ['Rene R.] + ] + [li Fix some possible overrun issues revealed by Fortify build. Thanks to Steven Robbins + for pointing out the issues. + -- ['Rene R.] + ] + [li Handle \\n and \\r escape sequences. + -- ['Vladimir P.] + ] + [li Minor edits to remove -Wall warnings. + -- ['Rene R.] + ] + [li Dynamically adjust pwd buffer query size to allow for when PATH_MAX is default + defined instead of being provided by the system C library. + -- ['Rene R.] + ] + [li Minor perf improvement for bjam by replacing hash function with faster version. Only + 1% diff for Boost tree. + -- ['Rene R.] + ] + [li Updated Boost Jam's error location reporting when parsing Jamfiles. Now it reports + the correct error location information when encountering an unexpected EOF. It now + also reports where an invalid lexical token being read started instead of finished + which makes it much easier to find errors like unclosed quotes or curly braces. + -- ['Jurko G.] + ] + [li Removed the -xarch=generic architecture from build.jam + as this option is unknown so the Sun compilers on Linux. + -- ['Noel B.] + ] + [li Fixed a bug with T_FATE_ISTMP getting reported as T_FATE_ISTMP & T_FATE_NEEDTMP at + the same time due to a missing break in a switch statement. + -- ['Jurko G.] + ] + [li Fixed a Boost Jam bug causing it to sometimes trigger actions depending on targets + that have not been built yet. + -- ['Jurko G.] + ] + [li Added missing documentation for Boost Jam's :T variable expansion modifier which + converts all back-slashes ('\\') to forward slashed ('/'). + -- ['Jurko G.] + ] + [li Added Boost Jam support for executing command lines longer than 2047 characters (up + to 8191) characters when running on Windows XP or later OS version. + -- ['Jurko G.] + ] + [li Fixed a Boost Jam bug on Windows causing its SHELL command not to work correctly with + some commands containing quotes. + -- ['Jurko G.] + ] + [li Corrected a potential memory leak in Boost Jam's builtin_shell() function that would + appear should Boost Jam ever start to release its allocated string objects. + -- ['Jurko G.] + ] + [li Made all Boost Jam's ECHO commands automatically flush the standard output to make + that output more promptly displayed to the user. + -- ['Jurko G.] + ] + [li Made Boost Jam tests quote their bjam executable name when calling it allowing those + executables to contain spaces in their name and/or path. + -- ['Jurko G.] + ] + [li Change execunix.c to always use fork() instead of + vfork() on the Mac. This works around known issues + with bjam on PPC under Tiger and a problem reported + by Rene with bjam on x86 under Leopard. + -- ['Noel B.] + ] + [li Corrected a bug in Boost Jam's base Jambase script causing it to trim the error + message displayed when its boost-build rule gets called multiple times. + -- ['Jurko G.] + ] + [li When importing from Python into an module with empty string as name, + import into root module. + -- ['Vladimir P.] + ] + [li Patch for the NORMALIZE_PATH builtin Boost Jam rule as well as an appropriate update + for the path.jam Boost Build module where that rule was being used to implement path + join and related operations. + -- ['Jurko G.] + ] + [li Fixed a bug causing Boost Jam not to handle target file names specified as both short + and long file names correctly. + -- ['Jurko G.] + ] + [li Relaxed test, ignoring case of drive letter. + -- ['Roland S.] + ] + [li Implemented a patch contributed by Igor Nazarenko reimplementing the list_sort() + function to use a C qsort() function instead of a hand-crafted merge-sort algorithm. + Makes some list sortings (e.g. 1,2,1,2,1,2,1,2, \.\.\.) extremely faster, in turn + significantly speeding up some project builds. + -- ['Jurko G.] + ] + [li Fixed a bug with bjam not handling the '\' root Windows path correctly without its + drive letter being specified. + -- ['Jurko G.] + ] + [li Solved the problem with child process returning the value 259 (Windows constant + STILL_ACTIVE) causing bjam never to detect that it exited and therefore keep running + in an endless loop. + -- ['Jurko G.] + ] + [li Solved the problem with bjam going into an active wait state, hogging up processor + resources, when waiting for one of its child processes to terminate while not all of + its available child process slots are being used. + -- ['Jurko G.] + ] + [li Solved a race condition between bjam's output reading/child process termination + detection and the child process's output generation/termination which could have + caused bjam not to collect the terminated process's final output. + -- ['Jurko G.] + ] + [li Change from vfork to fork for executing actions on Darwin to improve stability. + -- ['Noel B.] + ] + [li Code reformatting and cleanups. + -- ['Jurko G.] + ] + [li Implement ISFILE built-in. + -- ['Vladimir P.] + ] +] + +]] + +[[3.1.16] [ + +This is mostly a bug fix release. + +[list + [li Work around some Windows CMD.EXE programs that will fail executing a totally + empty batch file. + -- ['Rene R.] + ] + [li Add support for detection and building with =vc9=. + -- ['John P.] + ] + [li Plug memory leak when closing out actions. Thanks to Martin Kortmann for finding this. + -- ['Rene R.] + ] + [li Various improvements to =__TIMING_RULE__= and =__ACTION_RULE__= target variable + hooks. + -- ['Rene R.] + ] + [li Change [^JAMDATE] to use common ISO date format. + -- ['Rene R.] + ] + [li Add test for result status values of simple actions, i.e. empty actions. + -- ['Rene R.] + ] + [li Fix buffer overrun bug in expanding [^@()] subexpressions. + -- ['Rene R.] + ] + [li Check empty string invariants, instead of assuming all strings are allocated. + And reset strings when they are freed. + -- ['Rene R.] + ] + [li Add [^OSPLAT=PARISC] for HP-UX PA-RISC. + -- ['Boris G.] + ] + [li Make quietly actions really quiet by not printing the command output. The + output for the quietly actions is still available through =__ACTION_RULE__=. + -- ['Rene R.] + ] + [li Switch intel-win32 to use static multi thread runtime since the single + thread static runtime is no longer available. + -- ['Rene R.] + ] + [li When setting =OSPLAT=, check =__ia64= macro. + -- ['Boris G.] + ] + [li Get the unix timing working correctly. + -- ['Noel B.] + ] + [li Add =-fno-strict-aliasing= to compilation with gcc. Which works around + GCC-4.2 crash problems. + -- ['Boris G.] + ] + [li Increased support for Python integration. + -- ['Vladimir P.], ['Daniel W.] + ] + [li Allow specifying options with quotes, i.e. [^--with-python=xyz], to work + around the CMD shell using [^=] as an argument separator. + -- ['Rene R.] + ] + [li Add values of variables specified with -s to .EVNRION + module, so that we can override environment on + command line. + -- ['Vladimir P.] + ] + [li Make NORMALIZE_PATH convert \\ to /. + -- ['Vladimir P.] + ] +] + +]] + +[[3.1.15] [ + +This release sees a variety of fixes for long standing Perforce/Jam problems. Most of +them relating to running actions in parallel with the -jN option. The end result of the +changes is that running parallel actions is now reliably possible in Unix and Windows +environments. Many thanks to Noel for joining the effort, to implement and fix the Unix +side of stuff. + +[list + [li Add support for building bjam with pgi and pathscale toolsets. + -- ['Noel B.] + ] + [li Implement running action commands through pipes (-p option) to fix jumbled + output when using parallel execution with -j option. This is implemented + for Unix variants, and Windows (Win32/NT). + -- ['Rene R.], ['Noel B.] + ] + [li Add "sun" as alias to Sun Workshop compiler tools. + -- ['Rene R.] + ] + [li Set MAXLINE in jam.h to 23k bytes for AIX. The piecemeal archive action + was broken with the default MAXLINE of 102400. Because the AIX shell uses + some of the 24k default buffer size for its own use, I reduced it to 23k. + -- ['Noel B.] + ] + [li Make use of output dir options of msvc to not polute src dir with compiled files. + -- ['Rene R.] + ] + [li A small fix, so -d+2 will always show the "real" commands being executed + instead of casually the name of a temporary batch file. + -- ['Roland S.] + ] + [li Add test to check 'bjam -n'. + -- ['Rene R.] + ] + [li Add test to check 'bjam -d2'. + -- ['Rene R.] + ] + [li Bring back missing output of -n option. The -o option continues to be + broken as it has been for a long time now because of the @ file feature. + -- ['Rene R.] + ] + [li Update GC support to work with Boehm GC 7.0. + -- ['Rene R.] + ] + [li Revert the BOOST_BUILD_PATH change, since the directory passed to + boost-build should be first in searched paths, else project local + build system will not be picked correctly. The order had been changed to + allow searching of alternate user-config.jam files from boost build. This + better should be done with --user-config= switch or similar. + -- ['Roland S.] + ] + [li Initial support for defining action body from Python. + -- ['Vladimir P.] + ] + [li Implement @() expansion during parse phase. + -- ['Rene R.] + ] + [li Define OSPLAT var unconditionally, and more generically, when possible. + -- ['Rene R.] + ] + [li Fix undeclared INT_MAX on some platforms, i.e. Linux. + -- ['Rene R.] + ] + [li Modified execunix.c to add support for terminating + processes that consume too much cpu or that hang and + fail to consume cpu at all. This in support of the + bjam -lx option. + -- ['Noel B.] + ] + [li Add internal dependencies for multi-file generating actions to indicate + that the targets all only appear when the first target appears. This fixes + the long standing problem Perforce/Jam has with multi-file actions and + parallel execution (-jN). + -- ['Rene R.] + ] + [li Add test of -l limit option now that it's implemented on windows and unix. + -- ['Rene R.] + ] + [li Add test for no-op @() expansion. + -- ['Rene R.] + ] + [li Handle invalid formats of @() as doing a straight substitution instead of + erroring out. + -- ['Rene R.] + ] + [li Various fixes to compile on SGI/Irix. + -- ['Noel B.] + ] + [li Add output for when actions timeout with -lN option. + -- ['Rene R.], ['Noel B.] + ] + [li Add needed include (according to XOPEN) for definition of WIFEXITED and WEXITSTATUS. + -- ['Markus S.] + ] +] + +]] + +] diff --git a/boost/tools/build/doc/images/alert.png b/boost/tools/build/doc/images/alert.png Binary files differnew file mode 100644 index 00000000..b4645bc7 --- /dev/null +++ b/boost/tools/build/doc/images/alert.png diff --git a/boost/tools/build/doc/images/blank.png b/boost/tools/build/doc/images/blank.png Binary files differnew file mode 100644 index 00000000..764bf4f0 --- /dev/null +++ b/boost/tools/build/doc/images/blank.png diff --git a/boost/tools/build/doc/images/callouts/1.png b/boost/tools/build/doc/images/callouts/1.png Binary files differnew file mode 100644 index 00000000..6003ad3a --- /dev/null +++ b/boost/tools/build/doc/images/callouts/1.png diff --git a/boost/tools/build/doc/images/callouts/1.svg b/boost/tools/build/doc/images/callouts/1.svg new file mode 100644 index 00000000..e2e87dc5 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/1.svg @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M10.428,10.411h0.56c3.78,0,4.788-1.96,4.872-3.444h3.22v19.88h-3.92V13.154h-4.732V10.411z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/10.png b/boost/tools/build/doc/images/callouts/10.png Binary files differnew file mode 100644 index 00000000..0426f516 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/10.png diff --git a/boost/tools/build/doc/images/callouts/10.svg b/boost/tools/build/doc/images/callouts/10.svg new file mode 100644 index 00000000..4740f587 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/10.svg @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.815,10.758h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76v17.04h-3.36V13.11H3.815V10.758z"/> + <path style="fill:#FFFFFF;" d="M22.175,7.806c4.009,0,5.904,2.76,5.904,8.736c0,5.975-1.896,8.76-5.904,8.76 + c-4.008,0-5.904-2.785-5.904-8.76C16.271,10.566,18.167,7.806,22.175,7.806z M22.175,22.613c1.921,0,2.448-1.68,2.448-6.071 + c0-4.393-0.527-6.049-2.448-6.049c-1.92,0-2.448,1.656-2.448,6.049C19.727,20.934,20.255,22.613,22.175,22.613z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/11.png b/boost/tools/build/doc/images/callouts/11.png Binary files differnew file mode 100644 index 00000000..821afc4f --- /dev/null +++ b/boost/tools/build/doc/images/callouts/11.png diff --git a/boost/tools/build/doc/images/callouts/11.svg b/boost/tools/build/doc/images/callouts/11.svg new file mode 100644 index 00000000..09a0b2cf --- /dev/null +++ b/boost/tools/build/doc/images/callouts/11.svg @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M5.209,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H5.209V10.412z"/> + <path style="fill:#FFFFFF;" d="M18.553,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.359V12.764h-4.056V10.412z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/12.png b/boost/tools/build/doc/images/callouts/12.png Binary files differnew file mode 100644 index 00000000..7cec7272 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/12.png diff --git a/boost/tools/build/doc/images/callouts/12.svg b/boost/tools/build/doc/images/callouts/12.svg new file mode 100644 index 00000000..9794044c --- /dev/null +++ b/boost/tools/build/doc/images/callouts/12.svg @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M4.813,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H4.813V10.412z"/> + <path style="fill:#FFFFFF;" d="M17.316,13.484c0-5.545,4.056-6.024,5.568-6.024c3.265,0,5.856,1.92,5.856,5.376 + c0,2.928-1.896,4.416-3.553,5.544c-2.256,1.584-3.432,2.353-3.815,3.145h7.392V24.5h-11.64c0.12-1.992,0.264-4.08,3.96-6.768 + c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.353-2.424c-2.352,0-2.423,1.944-2.447,3.192H17.316z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/13.png b/boost/tools/build/doc/images/callouts/13.png Binary files differnew file mode 100644 index 00000000..5b41e02a --- /dev/null +++ b/boost/tools/build/doc/images/callouts/13.png diff --git a/boost/tools/build/doc/images/callouts/13.svg b/boost/tools/build/doc/images/callouts/13.svg new file mode 100644 index 00000000..64268bb4 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/13.svg @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.813,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H3.813V10.412z"/> + <path style="fill:#FFFFFF;" d="M20.611,14.636h0.529c1.008,0,2.855-0.096,2.855-2.304c0-0.624-0.288-2.185-2.137-2.185 + c-2.303,0-2.303,2.185-2.303,2.784h-3.12c0-3.191,1.8-5.472,5.64-5.472c2.279,0,5.279,1.152,5.279,4.752 + c0,1.728-1.08,2.808-2.039,3.24V15.5c0.6,0.168,2.568,1.056,2.568,3.96c0,3.216-2.377,5.496-5.809,5.496 + c-1.607,0-5.928-0.36-5.928-5.688h3.288l-0.024,0.024c0,0.912,0.24,2.976,2.496,2.976c1.344,0,2.52-0.911,2.52-2.808 + c0-2.328-2.256-2.424-3.816-2.424V14.636z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/14.png b/boost/tools/build/doc/images/callouts/14.png Binary files differnew file mode 100644 index 00000000..de5bdbd3 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/14.png diff --git a/boost/tools/build/doc/images/callouts/14.svg b/boost/tools/build/doc/images/callouts/14.svg new file mode 100644 index 00000000..469aa974 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/14.svg @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M4.146,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H4.146V10.412z"/> + <path style="fill:#FFFFFF;" d="M28.457,20.732h-1.896V24.5h-3.36v-3.768h-6.72v-2.904L22.746,7.46h3.815v10.656h1.896V20.732z + M23.201,18.116c0-4.128,0.072-6.792,0.072-7.32h-0.048l-4.272,7.32H23.201z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/15.png b/boost/tools/build/doc/images/callouts/15.png Binary files differnew file mode 100644 index 00000000..3fd6ac38 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/15.png diff --git a/boost/tools/build/doc/images/callouts/15.svg b/boost/tools/build/doc/images/callouts/15.svg new file mode 100644 index 00000000..8202233e --- /dev/null +++ b/boost/tools/build/doc/images/callouts/15.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.479,11.079h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76v17.04h-3.36V13.43H3.479V11.079z"/> + <path style="fill:#FFFFFF;" d="M19.342,14.943c0.625-0.433,1.392-0.937,3.048-0.937c2.279,0,5.16,1.584,5.16,5.496 + c0,2.328-1.176,6.121-6.192,6.121c-2.664,0-5.376-1.584-5.544-5.016h3.36c0.144,1.391,0.888,2.326,2.376,2.326 + c1.607,0,2.544-1.367,2.544-3.191c0-1.512-0.72-3.047-2.496-3.047c-0.456,0-1.608,0.023-2.256,1.223l-3-0.143l1.176-9.361h9.36 + v2.832h-6.937L19.342,14.943z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/16.svg b/boost/tools/build/doc/images/callouts/16.svg new file mode 100644 index 00000000..01d6bf81 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/16.svg @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.813,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H3.813V10.412z"/> + <path style="fill:#FFFFFF;" d="M24.309,11.78c-0.097-0.96-0.721-1.633-1.969-1.633c-2.184,0-2.688,2.496-2.808,4.704L19.58,14.9 + c0.456-0.624,1.296-1.416,3.191-1.416c3.529,0,5.209,2.712,5.209,5.256c0,3.72-2.28,6.216-5.568,6.216 + c-5.16,0-6.168-4.32-6.168-8.568c0-3.24,0.432-8.928,6.336-8.928c0.695,0,2.641,0.264,3.48,1.104 + c0.936,0.912,1.271,1.416,1.584,3.217H24.309z M22.172,16.172c-1.271,0-2.568,0.792-2.568,2.928c0,1.849,1.056,3.168,2.664,3.168 + c1.225,0,2.353-0.936,2.353-3.239C24.62,16.868,23.229,16.172,22.172,16.172z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/17.svg b/boost/tools/build/doc/images/callouts/17.svg new file mode 100644 index 00000000..0a04c556 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/17.svg @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.479,11.079h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76v17.04h-3.36V13.43H3.479V11.079z"/> + <path style="fill:#FFFFFF;" d="M27.838,11.006c-1.631,1.776-5.807,6.816-6.215,14.16h-3.457c0.36-6.816,4.632-12.24,6.072-13.776 + h-8.472l0.072-2.976h12V11.006z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/18.svg b/boost/tools/build/doc/images/callouts/18.svg new file mode 100644 index 00000000..1cb891b3 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/18.svg @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M4.813,10.412h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76V24.5h-3.36V12.764H4.813V10.412z"/> + <path style="fill:#FFFFFF;" d="M23.172,24.956c-4.392,0-5.904-2.856-5.904-5.185c0-0.863,0-3.119,2.592-4.319 + c-1.344-0.672-2.064-1.752-2.064-3.336c0-2.904,2.328-4.656,5.304-4.656c3.528,0,5.4,2.088,5.4,4.44 + c0,1.464-0.6,2.712-1.968,3.432c1.632,0.815,2.544,1.896,2.544,4.104C29.076,21.596,27.684,24.956,23.172,24.956z M23.124,16.916 + c-1.224,0-2.4,0.792-2.4,2.64c0,1.632,0.936,2.712,2.472,2.712c1.752,0,2.424-1.512,2.424-2.688 + C25.62,18.38,24.996,16.916,23.124,16.916z M25.284,12.26c0-1.296-0.888-2.112-1.968-2.112c-1.512,0-2.305,0.864-2.305,2.112 + c0,1.008,0.744,2.112,2.185,2.112C24.516,14.372,25.284,13.484,25.284,12.26z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/19.svg b/boost/tools/build/doc/images/callouts/19.svg new file mode 100644 index 00000000..e6fbb179 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/19.svg @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M4.146,10.746h0.48c3.24,0,4.104-1.681,4.176-2.952h2.76v17.041h-3.36V13.097H4.146V10.746z"/> + <path style="fill:#FFFFFF;" d="M20.225,20.898v0.023c0.192,1.176,0.936,1.68,1.968,1.68c1.392,0,2.783-1.176,2.808-4.752 + l-0.048-0.049c-0.768,1.152-2.088,1.441-3.24,1.441c-3.264,0-5.16-2.473-5.16-5.329c0-4.176,2.472-6.12,5.808-6.12 + c5.904,0,6,6.36,6,8.76c0,6.601-3.12,8.736-6.192,8.736c-2.904,0-4.992-1.68-5.28-4.391H20.225z M22.434,16.553 + c1.176,0,2.472-0.84,2.472-2.855c0-1.944-0.841-3.145-2.568-3.145c-0.864,0-2.424,0.433-2.424,2.88 + C19.913,16.001,21.161,16.553,22.434,16.553z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/2.png b/boost/tools/build/doc/images/callouts/2.png Binary files differnew file mode 100644 index 00000000..f7c15788 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/2.png diff --git a/boost/tools/build/doc/images/callouts/2.svg b/boost/tools/build/doc/images/callouts/2.svg new file mode 100644 index 00000000..07d03395 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/2.svg @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M9.668,12.328c0-6.469,4.732-7.028,6.496-7.028c3.808,0,6.833,2.24,6.833,6.271 + c0,3.416-2.213,5.152-4.145,6.469c-2.632,1.848-4.004,2.744-4.452,3.668h8.624v3.472H9.444c0.14-2.324,0.308-4.76,4.62-7.896 + c3.584-2.604,5.012-3.612,5.012-5.853c0-1.315-0.84-2.828-2.744-2.828c-2.744,0-2.828,2.269-2.856,3.725H9.668z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/20.svg b/boost/tools/build/doc/images/callouts/20.svg new file mode 100644 index 00000000..ccbfd403 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/20.svg @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376 + c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768 + c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/> + <path style="fill:#FFFFFF;" d="M23.172,7.46c4.008,0,5.904,2.76,5.904,8.736c0,5.976-1.896,8.76-5.904,8.76 + s-5.904-2.784-5.904-8.76C17.268,10.22,19.164,7.46,23.172,7.46z M23.172,22.268c1.92,0,2.448-1.68,2.448-6.071 + c0-4.393-0.528-6.049-2.448-6.049s-2.448,1.656-2.448,6.049C20.724,20.588,21.252,22.268,23.172,22.268z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/21.svg b/boost/tools/build/doc/images/callouts/21.svg new file mode 100644 index 00000000..93ec53fd --- /dev/null +++ b/boost/tools/build/doc/images/callouts/21.svg @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M5.306,13.151c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376 + c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392v2.976H5.114c0.12-1.992,0.264-4.08,3.96-6.768 + c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H5.306z"/> + <path style="fill:#FFFFFF;" d="M19.49,10.079h0.48c3.239,0,4.104-1.681,4.176-2.952h2.761v17.04h-3.361V12.431H19.49V10.079z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/22.svg b/boost/tools/build/doc/images/callouts/22.svg new file mode 100644 index 00000000..f48c5f3f --- /dev/null +++ b/boost/tools/build/doc/images/callouts/22.svg @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376 + c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768 + c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/> + <path style="fill:#FFFFFF;" d="M17.316,13.484c0-5.545,4.056-6.024,5.568-6.024c3.265,0,5.856,1.92,5.856,5.376 + c0,2.928-1.896,4.416-3.553,5.544c-2.256,1.584-3.432,2.353-3.815,3.145h7.392V24.5h-11.64c0.12-1.992,0.264-4.08,3.96-6.768 + c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.353-2.424c-2.352,0-2.423,1.944-2.447,3.192H17.316z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/23.svg b/boost/tools/build/doc/images/callouts/23.svg new file mode 100644 index 00000000..66242129 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/23.svg @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376 + c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768 + c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/> + <path style="fill:#FFFFFF;" d="M21.612,14.636h0.528c1.008,0,2.855-0.096,2.855-2.304c0-0.624-0.287-2.185-2.136-2.185 + c-2.304,0-2.304,2.185-2.304,2.784h-3.12c0-3.191,1.8-5.472,5.64-5.472c2.28,0,5.28,1.152,5.28,4.752 + c0,1.728-1.08,2.808-2.04,3.24V15.5c0.6,0.168,2.568,1.056,2.568,3.96c0,3.216-2.377,5.496-5.809,5.496 + c-1.607,0-5.928-0.36-5.928-5.688h3.288l-0.024,0.024c0,0.912,0.24,2.976,2.496,2.976c1.344,0,2.521-0.911,2.521-2.808 + c0-2.328-2.257-2.424-3.816-2.424V14.636z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/24.svg b/boost/tools/build/doc/images/callouts/24.svg new file mode 100644 index 00000000..a3d55253 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/24.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M4.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376 + c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H4.78c0.12-1.992,0.264-4.08,3.96-6.768 + c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H4.972z"/> + <path style="fill:#FFFFFF;" d="M30.124,20.732h-1.896V24.5h-3.36v-3.768h-6.72v-2.904L24.412,7.46h3.816v10.656h1.896V20.732z + M24.868,18.116c0-4.128,0.071-6.792,0.071-7.32h-0.047l-4.272,7.32H24.868z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/25.svg b/boost/tools/build/doc/images/callouts/25.svg new file mode 100644 index 00000000..56614a97 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/25.svg @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376 + c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768 + c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/> + <path style="fill:#FFFFFF;" d="M20.676,14.276c0.624-0.433,1.393-0.937,3.049-0.937c2.279,0,5.16,1.584,5.16,5.496 + c0,2.328-1.177,6.12-6.193,6.12c-2.664,0-5.375-1.584-5.543-5.016h3.36c0.144,1.392,0.889,2.327,2.376,2.327 + c1.608,0,2.544-1.367,2.544-3.191c0-1.513-0.72-3.048-2.496-3.048c-0.455,0-1.607,0.023-2.256,1.224l-3-0.144l1.176-9.36h9.36 + v2.832h-6.937L20.676,14.276z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/26.svg b/boost/tools/build/doc/images/callouts/26.svg new file mode 100644 index 00000000..56faeaca --- /dev/null +++ b/boost/tools/build/doc/images/callouts/26.svg @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376 + c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768 + c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/> + <path style="fill:#FFFFFF;" d="M25.309,11.78c-0.097-0.96-0.721-1.633-1.969-1.633c-2.184,0-2.688,2.496-2.808,4.704L20.58,14.9 + c0.456-0.624,1.296-1.416,3.191-1.416c3.529,0,5.209,2.712,5.209,5.256c0,3.72-2.28,6.216-5.568,6.216 + c-5.16,0-6.168-4.32-6.168-8.568c0-3.24,0.432-8.928,6.336-8.928c0.695,0,2.641,0.264,3.48,1.104 + c0.936,0.912,1.271,1.416,1.584,3.217H25.309z M23.172,16.172c-1.271,0-2.568,0.792-2.568,2.928c0,1.849,1.056,3.168,2.664,3.168 + c1.225,0,2.353-0.936,2.353-3.239C25.62,16.868,24.229,16.172,23.172,16.172z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/27.svg b/boost/tools/build/doc/images/callouts/27.svg new file mode 100644 index 00000000..a75c8121 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/27.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376 + c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768 + c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/> + <path style="fill:#FFFFFF;" d="M29.172,10.34c-1.632,1.776-5.808,6.816-6.216,14.16H19.5c0.36-6.816,4.632-12.24,6.072-13.776 + H17.1l0.072-2.976h12V10.34z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/28.svg b/boost/tools/build/doc/images/callouts/28.svg new file mode 100644 index 00000000..7f8cf1a3 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/28.svg @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376 + c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768 + c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/> + <path style="fill:#FFFFFF;" d="M23.172,24.956c-4.392,0-5.904-2.856-5.904-5.185c0-0.863,0-3.119,2.592-4.319 + c-1.344-0.672-2.064-1.752-2.064-3.336c0-2.904,2.328-4.656,5.304-4.656c3.528,0,5.4,2.088,5.4,4.44 + c0,1.464-0.6,2.712-1.968,3.432c1.632,0.815,2.544,1.896,2.544,4.104C29.076,21.596,27.684,24.956,23.172,24.956z M23.124,16.916 + c-1.224,0-2.4,0.792-2.4,2.64c0,1.632,0.936,2.712,2.472,2.712c1.752,0,2.424-1.512,2.424-2.688 + C25.62,18.38,24.996,16.916,23.124,16.916z M25.284,12.26c0-1.296-0.888-2.112-1.968-2.112c-1.512,0-2.305,0.864-2.305,2.112 + c0,1.008,0.744,2.112,2.185,2.112C24.516,14.372,25.284,13.484,25.284,12.26z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/29.svg b/boost/tools/build/doc/images/callouts/29.svg new file mode 100644 index 00000000..cb63adf1 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/29.svg @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M3.972,13.484c0-5.545,4.056-6.024,5.568-6.024c3.264,0,5.856,1.92,5.856,5.376 + c0,2.928-1.896,4.416-3.552,5.544c-2.256,1.584-3.432,2.353-3.816,3.145h7.392V24.5H3.78c0.12-1.992,0.264-4.08,3.96-6.768 + c3.072-2.232,4.296-3.097,4.296-5.017c0-1.128-0.72-2.424-2.352-2.424c-2.352,0-2.424,1.944-2.448,3.192H3.972z"/> + <path style="fill:#FFFFFF;" d="M20.893,20.564v0.023c0.191,1.176,0.936,1.68,1.967,1.68c1.393,0,2.785-1.176,2.809-4.752 + l-0.048-0.048c-0.769,1.152-2.088,1.44-3.24,1.44c-3.264,0-5.16-2.473-5.16-5.328c0-4.176,2.472-6.12,5.807-6.12 + c5.904,0,6.001,6.36,6.001,8.76c0,6.601-3.12,8.736-6.192,8.736c-2.904,0-4.992-1.68-5.28-4.392H20.893z M23.1,16.22 + c1.176,0,2.473-0.84,2.473-2.855c0-1.944-0.84-3.145-2.568-3.145c-0.863,0-2.424,0.433-2.424,2.88 + C20.58,15.668,21.828,16.22,23.1,16.22z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/3.png b/boost/tools/build/doc/images/callouts/3.png Binary files differnew file mode 100644 index 00000000..3ff0a939 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/3.png diff --git a/boost/tools/build/doc/images/callouts/3.svg b/boost/tools/build/doc/images/callouts/3.svg new file mode 100644 index 00000000..918be806 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/3.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M15.127,14.005h0.616c1.176,0,3.332-0.112,3.332-2.688c0-0.728-0.336-2.548-2.492-2.548 + c-2.688,0-2.688,2.548-2.688,3.248h-3.64c0-3.724,2.1-6.384,6.58-6.384c2.66,0,6.16,1.344,6.16,5.544 + c0,2.016-1.261,3.276-2.38,3.78v0.056c0.699,0.196,2.996,1.232,2.996,4.62c0,3.752-2.772,6.412-6.776,6.412 + c-1.876,0-6.916-0.42-6.916-6.636h3.836l-0.028,0.027c0,1.064,0.28,3.473,2.912,3.473c1.568,0,2.94-1.064,2.94-3.276 + c0-2.716-2.632-2.828-4.452-2.828V14.005z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/30.svg b/boost/tools/build/doc/images/callouts/30.svg new file mode 100644 index 00000000..dc43ba1e --- /dev/null +++ b/boost/tools/build/doc/images/callouts/30.svg @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M8.268,14.636h0.528c1.008,0,2.856-0.096,2.856-2.304c0-0.624-0.288-2.185-2.136-2.185 + c-2.304,0-2.304,2.185-2.304,2.784h-3.12c0-3.191,1.8-5.472,5.64-5.472c2.28,0,5.28,1.152,5.28,4.752 + c0,1.728-1.08,2.808-2.04,3.24V15.5c0.6,0.168,2.568,1.056,2.568,3.96c0,3.216-2.376,5.496-5.808,5.496 + c-1.608,0-5.928-0.36-5.928-5.688h3.288l-0.024,0.024c0,0.912,0.24,2.976,2.496,2.976c1.344,0,2.52-0.911,2.52-2.808 + c0-2.328-2.256-2.424-3.816-2.424V14.636z"/> + <path style="fill:#FFFFFF;" d="M23.172,7.46c4.008,0,5.904,2.76,5.904,8.736c0,5.976-1.896,8.76-5.904,8.76 + s-5.904-2.784-5.904-8.76C17.268,10.22,19.164,7.46,23.172,7.46z M23.172,22.268c1.92,0,2.448-1.68,2.448-6.071 + c0-4.393-0.528-6.049-2.448-6.049s-2.448,1.656-2.448,6.049C20.724,20.588,21.252,22.268,23.172,22.268z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/4.png b/boost/tools/build/doc/images/callouts/4.png Binary files differnew file mode 100644 index 00000000..6aa29fc0 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/4.png diff --git a/boost/tools/build/doc/images/callouts/4.svg b/boost/tools/build/doc/images/callouts/4.svg new file mode 100644 index 00000000..8eb6a53b --- /dev/null +++ b/boost/tools/build/doc/images/callouts/4.svg @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M21.891,20.784h-2.212v4.396h-3.92v-4.396h-7.84v-3.389L15.227,5.3h4.452v12.432h2.212V20.784z + M15.759,17.731c0-4.815,0.084-7.924,0.084-8.54h-0.056l-4.984,8.54H15.759z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/5.png b/boost/tools/build/doc/images/callouts/5.png Binary files differnew file mode 100644 index 00000000..36e78586 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/5.png diff --git a/boost/tools/build/doc/images/callouts/5.svg b/boost/tools/build/doc/images/callouts/5.svg new file mode 100644 index 00000000..ca7a9f22 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/5.svg @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M14.035,14.252c0.728-0.504,1.624-1.092,3.556-1.092c2.66,0,6.02,1.848,6.02,6.411 + c0,2.717-1.372,7.141-7.224,7.141c-3.108,0-6.272-1.849-6.468-5.853h3.92c0.168,1.624,1.036,2.717,2.772,2.717 + c1.876,0,2.968-1.597,2.968-3.725c0-1.764-0.839-3.556-2.912-3.556c-0.532,0-1.876,0.028-2.632,1.428l-3.5-0.168l1.372-10.92 + h10.919v3.304h-8.092L14.035,14.252z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/6.png b/boost/tools/build/doc/images/callouts/6.png Binary files differnew file mode 100644 index 00000000..c943676b --- /dev/null +++ b/boost/tools/build/doc/images/callouts/6.png diff --git a/boost/tools/build/doc/images/callouts/6.svg b/boost/tools/build/doc/images/callouts/6.svg new file mode 100644 index 00000000..783a0b9d --- /dev/null +++ b/boost/tools/build/doc/images/callouts/6.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M19.106,10.673c-0.112-1.12-0.84-1.904-2.296-1.904c-2.548,0-3.136,2.912-3.276,5.488l0.056,0.056 + c0.532-0.728,1.512-1.651,3.724-1.651c4.116,0,6.077,3.164,6.077,6.131c0,4.34-2.66,7.252-6.497,7.252 + c-6.02,0-7.196-5.039-7.196-9.996c0-3.78,0.504-10.416,7.392-10.416c0.812,0,3.08,0.308,4.061,1.288 + c1.092,1.063,1.483,1.652,1.848,3.752H19.106z M16.614,15.797c-1.484,0-2.996,0.924-2.996,3.416c0,2.156,1.232,3.697,3.108,3.697 + c1.428,0,2.745-1.094,2.745-3.781C19.471,16.609,17.846,15.797,16.614,15.797z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/7.png b/boost/tools/build/doc/images/callouts/7.png Binary files differnew file mode 100644 index 00000000..20940de3 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/7.png diff --git a/boost/tools/build/doc/images/callouts/7.svg b/boost/tools/build/doc/images/callouts/7.svg new file mode 100644 index 00000000..59b3714b --- /dev/null +++ b/boost/tools/build/doc/images/callouts/7.svg @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M24.28,9.66c-1.904,2.071-6.776,7.951-7.252,16.52h-4.032c0.42-7.952,5.404-14.28,7.084-16.072 + h-9.884l0.084-3.472h14V9.66z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/8.png b/boost/tools/build/doc/images/callouts/8.png Binary files differnew file mode 100644 index 00000000..d8e34d4a --- /dev/null +++ b/boost/tools/build/doc/images/callouts/8.png diff --git a/boost/tools/build/doc/images/callouts/8.svg b/boost/tools/build/doc/images/callouts/8.svg new file mode 100644 index 00000000..c1803a3c --- /dev/null +++ b/boost/tools/build/doc/images/callouts/8.svg @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M16.28,26.712c-5.124,0-6.888-3.332-6.888-6.048c0-1.009,0-3.641,3.024-5.04 + c-1.568-0.784-2.408-2.044-2.408-3.893c0-3.388,2.716-5.432,6.188-5.432c4.116,0,6.3,2.436,6.3,5.18 + c0,1.708-0.7,3.164-2.296,4.004c1.903,0.952,2.968,2.212,2.968,4.788C23.168,22.792,21.544,26.712,16.28,26.712z M16.224,17.332 + c-1.428,0-2.8,0.924-2.8,3.08c0,1.903,1.092,3.164,2.884,3.164c2.043,0,2.829-1.765,2.829-3.137 + C19.137,19.04,18.408,17.332,16.224,17.332z M18.744,11.899c0-1.512-1.036-2.464-2.296-2.464c-1.764,0-2.688,1.008-2.688,2.464 + c0,1.177,0.868,2.464,2.548,2.464C17.848,14.363,18.744,13.328,18.744,11.899z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/callouts/9.png b/boost/tools/build/doc/images/callouts/9.png Binary files differnew file mode 100644 index 00000000..abe63607 --- /dev/null +++ b/boost/tools/build/doc/images/callouts/9.png diff --git a/boost/tools/build/doc/images/callouts/9.svg b/boost/tools/build/doc/images/callouts/9.svg new file mode 100644 index 00000000..bc149d3c --- /dev/null +++ b/boost/tools/build/doc/images/callouts/9.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;" width="33" height="33" viewBox="0 0 33 33" + style="overflow:visible;enable-background:new 0 0 33 33;" xml:space="preserve"> +<circle style="stroke:#000000;" cx="16.5" cy="16.5" r="16"/> +<g> + <g style="enable-background:new ;"> + <path style="fill:#FFFFFF;" d="M13.953,21.921v0.027c0.224,1.372,1.092,1.961,2.296,1.961c1.624,0,3.248-1.372,3.276-5.545 + l-0.057-0.056c-0.896,1.344-2.436,1.68-3.78,1.68c-3.808,0-6.02-2.884-6.02-6.216c0-4.872,2.884-7.14,6.776-7.14 + c6.888,0,7,7.42,7,10.22c0,7.7-3.641,10.192-7.224,10.192c-3.388,0-5.824-1.96-6.16-5.124H13.953z M16.529,16.853 + c1.372,0,2.884-0.979,2.884-3.332c0-2.268-0.98-3.668-2.996-3.668c-1.008,0-2.828,0.504-2.828,3.36 + C13.589,16.209,15.045,16.853,16.529,16.853z"/> + </g> +</g> +</svg> diff --git a/boost/tools/build/doc/images/caution.png b/boost/tools/build/doc/images/caution.png Binary files differnew file mode 100644 index 00000000..5b7809ca --- /dev/null +++ b/boost/tools/build/doc/images/caution.png diff --git a/boost/tools/build/doc/images/caution.svg b/boost/tools/build/doc/images/caution.svg new file mode 100644 index 00000000..4bd586a0 --- /dev/null +++ b/boost/tools/build/doc/images/caution.svg @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --><svg height="120.648" id="Layer_1" inkscape:version="0.42" sodipodi:docbase="F:\openclip\svg da inviare" sodipodi:docname="Attenzione.svg" sodipodi:version="0.32" space="preserve" style="overflow:visible;enable-background:new 0 0 133.878 120.648;" version="1.1" viewBox="0 0 133.878 120.648" width="133.878" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"> + <metadata> + <rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + <cc:Work rdf:about=""> + <dc:title>Attenzione</dc:title> + <dc:description></dc:description> + <dc:subject> + <rdf:Bag> + <rdf:li>pulsante</rdf:li> + </rdf:Bag> + </dc:subject> + <dc:publisher> + <cc:Agent rdf:about="http://www.openclipart.org/"> + <dc:title>Open Clip Art Library</dc:title> + </cc:Agent> + </dc:publisher> + <dc:creator> + <cc:Agent> + <dc:title>Architetto Francesco Rollandin</dc:title> + </cc:Agent> + </dc:creator> + <dc:rights> + <cc:Agent> + <dc:title>Architetto Francesco Rollandin</dc:title> + </cc:Agent> + </dc:rights> + <dc:date></dc:date> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/> + <dc:language>en</dc:language> + </cc:Work> + <cc:License rdf:about="http://web.resource.org/cc/PublicDomain"> + <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/> + <cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/> + <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/> + </cc:License> + </rdf:RDF> + </metadata> + <defs id="defs43"/> + <sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="Layer_1" inkscape:cx="66.939003" inkscape:cy="60.324001" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="510" inkscape:window-width="787" inkscape:window-x="44" inkscape:window-y="58" inkscape:zoom="2.9838869" pagecolor="#ffffff"/> + <g id="g3"> + <linearGradient gradientTransform="matrix(56.9977 90.4964 90.4964 -56.9977 -27343.9609 47971.0547)" gradientUnits="userSpaceOnUse" id="XMLID_4_" x1="-244.5732" x2="-242.8169" y1="455.4199" y2="455.4199"> + <stop id="stop6" offset="0" style="stop-color:#FFFA5F"/> + <stop id="stop8" offset="1" style="stop-color:#9F3300"/> + </linearGradient> + <path d="M51.333,8.834C34.985,37.343,18.638,65.854,2.289,94.363 c-7.081,12.352,3.352,26.285,16.453,26.285c6.708,0,13.418,0,20.128,0c22.109,0,44.217,0,66.327,0c3.644,0,7.286,0,10.931,0 c13.293,0,20.963-14.273,16.452-26.031c-4.114-10.729-11.861-20.99-17.542-30.922c-8.81-15.403-17.618-30.809-26.429-46.212 c-1.813-3.167-3.622-6.333-5.434-9.5C76.601-3.516,57.616-2.03,51.333,8.834 M53.973,9.064" id="path10" style="fill:url(#XMLID_4_);"/> + <path d="M55.474,12.388c-8.247,14.279-16.492,28.559-24.739,42.839 c-5.526,9.567-11.05,19.137-16.577,28.707c-2.732,4.73-7.323,10.456-8.284,16c-3.799,21.9,34.927,15.743,46.734,15.743 c20.073,0,40.144,0,60.215,0c13.716,0,18.636-11.963,12.229-23.063c-6.462-11.195-12.927-22.388-19.389-33.582 c-7.249-12.557-14.499-25.113-21.75-37.671c-1.682-2.916-3.364-5.829-5.049-8.745C73.767,3.785,60.676,3.364,55.474,12.388" id="path12" style="fill-rule:evenodd;clip-rule:evenodd;fill:#FFF200;"/> + <path d="M55.474,12.388c-8.247,14.279-16.492,28.559-24.739,42.839c-5.526,9.567-11.05,19.137-16.577,28.707 c-2.732,4.73-7.323,10.456-8.284,16c-3.799,21.9,34.927,15.743,46.734,15.743c20.073,0,40.144,0,60.215,0 c13.716,0,18.636-11.963,12.229-23.063c-6.462-11.195-12.927-22.388-19.389-33.582c-7.249-12.557-14.499-25.113-21.75-37.671 c-1.682-2.916-3.364-5.829-5.049-8.745C73.767,3.785,60.676,3.364,55.474,12.388" id="path14" style="fill:#FFCE00;"/> + <path d="M126.731,95.522c-8.733-15.127-17.468-30.253-26.201-45.379 c-5.537-9.595-11.078-19.188-16.616-28.781c-3.938-6.821-7.459-15.689-16.813-15.689c1.013,0,5.901,10.225,6.469,11.196 c5.451,9.314,10.902,18.63,16.352,27.947c9.217,15.749,18.433,31.498,27.646,47.249c2.302,3.933,5.356,10.555,1.308,14.397 c-3.148,2.987-7.99,3.196-12.099,3.196c-7.225,0-14.448,0-21.674,0c-22.125,0-44.251,0-66.377,0c-3.598,0-7.197,0-10.794,0 c5.285,7.909,16.341,6.02,24.546,6.02c13.009,0,26.017,0,39.023,0c11.979,0,23.958,0,35.937,0c2.516,0,5.032,0,7.547,0 C125.136,115.678,131.878,104.435,126.731,95.522" id="path16" style="fill:#FFB600;"/> + <path d="M14.615,112.457c-4.483-7.751,1.908-16.103,5.793-22.834 c4.698-8.138,9.398-16.276,14.097-24.414C44.54,47.83,54.574,30.448,64.61,13.069c0.789-1.367,3.725-4.568,2.594-5.539 c-3.913-3.353-10.287,1.936-12.107,5.087c-3.129,5.417-6.258,10.835-9.386,16.252c-11.105,19.226-22.209,38.453-33.313,57.68 c-1.649,2.854-3.299,5.713-4.95,8.569c-4.771,8.265-0.075,19.162,9.658,20.446C16.124,114.65,15.294,113.615,14.615,112.457" id="path18" style="fill-rule:evenodd;clip-rule:evenodd;fill:#FFE600;"/> + <path d="M77.076,34.654c0,10.183-1.788,20.758-3.439,30.772 c-0.369,2.239-4.03,23.609-7.796,14.179c-4.247-10.632-4.832-23.419-5.958-34.696c-0.363-3.638-1.538-8.425-0.563-12.06 C61.667,24.099,77.076,25.199,77.076,34.654" id="path20" style="fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFE1;"/> + <path d="M77.076,34.654c-2.018,0.995-1.521,8.717-1.797,11.395c-0.685,6.643-1.505,13.282-2.614,19.869 c-0.79,4.701-1.301,10.862-3.954,14.981c-1.642,2.567-3.405-5.958-3.634-6.932c-2.948-12.443-4.464-25.664-5.09-38.43 c-0.272-5.52,5.164-8.854,10.277-7.622c3.87,0.933,5.217,7.36,7.688,6.738c0.009-11.451-19.755-11.453-19.746,0 c0.017,11.956,2.087,24.599,4.423,36.294c0.501,2.507,1.642,12.376,5.449,12.376c4.059-0.021,5.285-11.432,5.79-14.137 c1.261-6.765,2.139-13.605,2.887-20.444C77.084,45.722,79.281,35.942,77.076,34.654" id="path22" style="fill:#FFFFFF;"/> + <linearGradient gradientTransform="matrix(68.2284 33.0019 33.0019 -68.2284 1613.9791 39385.6641)" gradientUnits="userSpaceOnUse" id="XMLID_5_" x1="-246.981" x2="-245.2275" y1="458.29" y2="458.29"> + <stop id="stop25" offset="0" style="stop-color:#FFFA5F"/> + <stop id="stop27" offset="1" style="stop-color:#9F3300"/> + </linearGradient> + <path d="M57.957,34.654c0,10.053,1.632,20.54,3.242,30.431 c0.479,2.936,4.912,26.502,9.99,15.164c4.987-11.134,5.351-25.201,6.386-37.184c0.273-3.169,1.153-7.045,0.421-10.221 C75.628,22.587,57.957,23.788,57.957,34.654 M60.207,34.654c0-8.061,13.138-9.015,15.459-1.792c1.156,3.597-0.13,8.748-0.508,12.38 c-1.135,10.904-2.052,22.602-5.501,33.069c-2.816,8.545-5.546-10.187-5.934-12.522C62.039,55.63,60.207,44.985,60.207,34.654" id="path29" style="fill-rule:evenodd;clip-rule:evenodd;fill:url(#XMLID_5_);"/> + <path d="M77.076,96.788c0,11.964-18.555,11.964-18.555,0 C58.521,84.822,77.076,84.822,77.076,96.788" id="path31" style="fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFE1;"/> + <path d="M77.076,96.788c-2.605,1.661-2.157,6.757-7.044,8.101c-6.178,1.7-12.033-4.159-10.336-10.335 c1.439-5.23,7.657-7.767,12.341-5.021c2.91,1.704,3.164,7.913,5.915,7.256c0-14.267-22.698-12.238-20.143,1.826 c0.987,5.444,6.375,9.15,11.814,8.162C72.417,106.271,81.44,98.19,77.076,96.788" id="path33" style="fill:#FFFFFF;"/> + <linearGradient gradientTransform="matrix(68.2241 32.9998 32.9998 -68.2241 1604.682 39402.625)" gradientUnits="userSpaceOnUse" id="XMLID_6_" x1="-246.998" x2="-245.2348" y1="458.0625" y2="458.0625"> + <stop id="stop36" offset="0" style="stop-color:#FFFA5F"/> + <stop id="stop38" offset="1" style="stop-color:#9F3300"/> + </linearGradient> + <path d="M57.395,96.788c0,13.41,20.805,13.41,20.805,0 C78.2,83.376,57.395,83.375,57.395,96.788 M59.647,96.788c0-10.514,16.301-10.514,16.301,0 C75.948,107.3,59.647,107.3,59.647,96.788" id="path40" style="fill-rule:evenodd;clip-rule:evenodd;fill:url(#XMLID_6_);"/> + </g> +</svg> diff --git a/boost/tools/build/doc/images/draft.png b/boost/tools/build/doc/images/draft.png Binary files differnew file mode 100644 index 00000000..0084708c --- /dev/null +++ b/boost/tools/build/doc/images/draft.png diff --git a/boost/tools/build/doc/images/home.png b/boost/tools/build/doc/images/home.png Binary files differnew file mode 100644 index 00000000..5584aacb --- /dev/null +++ b/boost/tools/build/doc/images/home.png diff --git a/boost/tools/build/doc/images/home.svg b/boost/tools/build/doc/images/home.svg new file mode 100644 index 00000000..e803a317 --- /dev/null +++ b/boost/tools/build/doc/images/home.svg @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In --> +<!DOCTYPE svg [ + <!ENTITY st0 "fill-rule:nonzero;clip-rule:nonzero;fill:#FFFFFF;stroke:#000000;stroke-miterlimit:4;"> + <!ENTITY st1 "fill:none;stroke:none;"> + <!ENTITY st2 "fill:#000000;"> + <!ENTITY st3 "fill:none;stroke:#FFFFFF;stroke-width:6.3469;stroke-linejoin:round;"> + <!ENTITY st4 "fill-rule:evenodd;clip-rule:evenodd;stroke:none;"> + <!ENTITY st5 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;"> +]> +<svg width="48pt" height="48pt" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> + <g id="Layer_x0020_3" style="&st0;"> + <g style="&st4;"> + <path style="&st3;" d="M22.9,7.1L5.1,21.8l0,0c-0.3,0.3-0.5,0.8-0.5,1.2c0,0.2,0,0.4,0.1,0.6c0.3,0.6,0.9,1,1.6,1c0,0,1.1,0,2.2,0c0,2.4,0,14.2,0,14.2c0,1.1,0.8,1.9,1.8,1.9h27.4c1.1,0,1.9-0.9,1.9-2c0,0,0-11.8,0-14.2c1,0,2,0,2,0c0.8,0,1.4-0.5,1.7-1.2 + c0.1-0.2,0.1-0.4,0.1-0.6c0-0.5-0.2-1-0.7-1.4c0,0-3.6-3-4.5-3.7c0-1.2,0-6.9,0-6.9c0-1.2-0.8-2-2-2h-4.8c-1,0-1.7,0.6-1.9,1.5c-1.9-1.6-4.1-3.5-4.1-3.5l0.1,0.1c-0.7-0.7-1.8-0.8-2.7-0.1z"/> + <path style="&st2;" d="M22.9,7.1L5.1,21.8l0,0c-0.3,0.3-0.5,0.8-0.5,1.2c0,0.2,0,0.4,0.1,0.6c0.3,0.6,0.9,1,1.6,1c0,0,1.1,0,2.2,0c0,2.4,0,14.2,0,14.2c0,1.1,0.8,1.9,1.8,1.9h27.4c1.1,0,1.9-0.9,1.9-2c0,0,0-11.8,0-14.2c1,0,2,0,2,0c0.8,0,1.4-0.5,1.7-1.2 + c0.1-0.2,0.1-0.4,0.1-0.6c0-0.5-0.2-1-0.7-1.4c0,0-3.6-3-4.5-3.7c0-1.2,0-6.9,0-6.9c0-1.2-0.8-2-2-2h-4.8c-1,0-1.7,0.6-1.9,1.5c-1.9-1.6-4.1-3.5-4.1-3.5l0.1,0.1c-0.7-0.7-1.8-0.8-2.7-0.1z"/> + <path style="&st2;" d="M41.8,22.8l-5.1-4.2v-0.1L31,13.7v0l-6.5-5.5C24.2,8,24,8,23.8,8.2L6.2,22.9c-0.1,0.1-0.1,0.3,0.1,0.3h1.6H10h28.1h1.2h2.3c0.2,0,0.4-0.2,0.2-0.4z"/> + <path d="M35.8,16.8l0-5.1c0-0.2-0.1-0.4-0.3-0.4h-3.2c-0.2,0-0.3,0.1-0.3,0.3v2.2l3.9,2.9z"/> + <path d="M11.9,24.7V37c0,0.3,0.1,0.4,0.3,0.4h23.6c0.3,0,0.4-0.2,0.4-0.4V24.7H11.9z"/> + </g> + </g> + <g id="crop_x0020_marks" style="&st5;"> + <path style="&st1;" d="M48,48H0V0h48v48z"/> + </g> +</svg> diff --git a/boost/tools/build/doc/images/important.png b/boost/tools/build/doc/images/important.png Binary files differnew file mode 100644 index 00000000..12c90f60 --- /dev/null +++ b/boost/tools/build/doc/images/important.png diff --git a/boost/tools/build/doc/images/important.svg b/boost/tools/build/doc/images/important.svg new file mode 100644 index 00000000..dd84f3fe --- /dev/null +++ b/boost/tools/build/doc/images/important.svg @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In --> +<!DOCTYPE svg [ + <!ENTITY st0 "fill:#FFFFFF;stroke:none;"> + <!ENTITY st1 "fill:#FFFFFF;stroke-width:6.6112;stroke-linecap:round;stroke-linejoin:round;"> + <!ENTITY st2 "stroke:#FFFFFF;stroke-width:6.6112;"> + <!ENTITY st3 "fill:none;stroke:none;"> + <!ENTITY st4 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;"> + <!ENTITY st5 "stroke:none;"> +]> +<svg width="48pt" height="48pt" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> + <g id="Layer_x0020_3" style="&st4;"> + <g> + <path style="&st2;" d="M41.7,35.3L26.6,9.4c-0.6-1-1.7-1.7-2.9-1.6c-1.2,0-2.3,0.7-2.9,1.7L6.3,35.4c-0.6,1-0.6,2.3,0,3.3c0.6,1,1.7,1.6,2.9,1.6h29.6c1.2,0,2.3-0.6,2.9-1.7c0.6-1,0.6-2.3,0-3.3z"/> + <path style="&st1;" d="M23.7,11L9.2,37h29.6L23.7,11z"/> + <path style="&st0;" d="M23.7,11.9L10.3,36.1h27.5l-14-24.1z"/> + <g> + <path style="&st5;" d="M24.1,34c-1.1,0-1.8-0.8-1.8-1.8c0-1.1,0.7-1.8,1.8-1.8c1.1,0,1.8,0.7,1.8,1.8c0,1-0.7,1.8-1.8,1.8h0z M22.9,29.3l-0.4-9.1h3.2l-0.4,9.1h-2.3z"/> + </g> + </g> + </g> + <g id="crop_x0020_marks" style="&st4;"> + <path style="&st3;" d="M48,48H0V0h48v48z"/> + </g> +</svg> diff --git a/boost/tools/build/doc/images/next.png b/boost/tools/build/doc/images/next.png Binary files differnew file mode 100644 index 00000000..59800b4e --- /dev/null +++ b/boost/tools/build/doc/images/next.png diff --git a/boost/tools/build/doc/images/next.svg b/boost/tools/build/doc/images/next.svg new file mode 100644 index 00000000..75fa83ed --- /dev/null +++ b/boost/tools/build/doc/images/next.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In --> +<!DOCTYPE svg [ + <!ENTITY st0 "fill:none;stroke:none;"> + <!ENTITY st1 "fill:#FFFFFF;stroke:#FFFFFF;stroke-width:7.5901;stroke-linejoin:round;"> + <!ENTITY st2 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;"> + <!ENTITY st3 "stroke:none;"> +]> +<svg width="48pt" height="48pt" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> + <g id="Layer_x0020_3" style="&st2;"> + <g> + <path style="&st1;" d="M22.4,41.1c0,0.3,0.3,0.3,0.5,0.2l16.6-16.9c0.5-0.5,0.4-0.7,0-1L22.9,6.7c-0.1-0.1-0.4-0.1-0.4,0.1v10H8.9c-0.3,0-0.5,0.2-0.5,0.4l0,13.3C8.4,30.9,8.6,31,9,31h13.5l-0.1,10.1z"/> + <path style="&st3;" d="M22.4,41.1c0,0.3,0.3,0.3,0.5,0.2l16.6-16.9c0.5-0.5,0.4-0.7,0-1L22.9,6.7c-0.1-0.1-0.4-0.1-0.4,0.1v10H8.9c-0.3,0-0.5,0.2-0.5,0.4l0,13.3C8.4,30.9,8.6,31,9,31h13.5l-0.1,10.1z"/> + </g> + </g> + <g id="crop_x0020_marks" style="&st2;"> + <path style="&st0;" d="M48,48H0V0h48v48z"/> + </g> +</svg> diff --git a/boost/tools/build/doc/images/next_disabled.png b/boost/tools/build/doc/images/next_disabled.png Binary files differnew file mode 100644 index 00000000..10a8c59d --- /dev/null +++ b/boost/tools/build/doc/images/next_disabled.png diff --git a/boost/tools/build/doc/images/note.png b/boost/tools/build/doc/images/note.png Binary files differnew file mode 100644 index 00000000..d0c3c645 --- /dev/null +++ b/boost/tools/build/doc/images/note.png diff --git a/boost/tools/build/doc/images/note.svg b/boost/tools/build/doc/images/note.svg new file mode 100644 index 00000000..648299d2 --- /dev/null +++ b/boost/tools/build/doc/images/note.svg @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In --> +<!DOCTYPE svg [ + <!ENTITY st0 "fill:none;stroke:#FFFFFF;stroke-width:12.1438;stroke-linejoin:round;"> + <!ENTITY st1 "fill:none;stroke-width:1.2429;"> + <!ENTITY st2 "fill:#FFFFFF;stroke:none;"> + <!ENTITY st3 "fill:none;stroke:#FFFFFF;stroke-width:12.7649;stroke-linejoin:round;"> + <!ENTITY st4 "fill:#FFFFFF;stroke-width:6.3824;stroke-linejoin:round;"> + <!ENTITY st5 "fill:none;stroke:none;"> + <!ENTITY st6 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;"> + <!ENTITY st7 "fill:#FFFFFF;stroke:#FFFFFF;stroke-width:12.7649;stroke-linejoin:round;"> + <!ENTITY st8 "stroke:none;"> + <!ENTITY st9 "fill:none;stroke-width:4.9715;stroke-linejoin:round;"> +]> +<svg xmlns="http://www.w3.org/2000/svg" width="48pt" height="48pt" viewBox="0 0 48 48" xml:space="preserve"> + <g id="Layer_x0020_1" style="&st6;"> + <path style="&st0;" d="M35.7,19.8v18.9H11V8.8h13.9l10.8,11z"/> + <path style="&st3;" d="M38.7,30.4L25,16.7l-7.7-3l2.7,8.7l13.3,13.4l5.4-5.4z"/> + <path style="&st7;" d="M35.7,8.8H11v29.9h24.7V8.8z"/> + <path style="&st4;" d="M35.7,8.8H11v29.9h24.7V8.8z"/> + <path style="&st2;" d="M35.7,8.8H11v29.9h24.7V8.8z"/> + </g> + <g id="Layer_x0020_4" style="&st6;"> + <path style="&st9;" d="M38.7,30.4L25,16.7l-7.7-3l2.7,8.7l13.3,13.4l5.4-5.4z"/> + <path style="&st8;" d="M38.7,30.4L25,16.7l-7.7-3l2.7,8.7l13.3,13.4l5.4-5.4z"/> + <path style="&st8;" d="M20.6,14.7l-2.5,2.5L17,13.4l3.6,1.3z"/> + <path style="&st1;" d="M19.6,22.2l3-0.3l2.4-2.4l0.4-2.8"/> + <path style="&st2;" d="M20.4,14.9L18.3,17l1.6,5.2l2.7-0.3l2.4-2.4l0.3-2.4l-5-2.2z"/> + </g> + <g id="crop" style="&st6;"> + <path style="&st5;" d="M48,48H0V0h48v48z"/> + </g> +</svg> diff --git a/boost/tools/build/doc/images/prev.png b/boost/tools/build/doc/images/prev.png Binary files differnew file mode 100644 index 00000000..d88a40f9 --- /dev/null +++ b/boost/tools/build/doc/images/prev.png diff --git a/boost/tools/build/doc/images/prev.svg b/boost/tools/build/doc/images/prev.svg new file mode 100644 index 00000000..6d88ffdd --- /dev/null +++ b/boost/tools/build/doc/images/prev.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In --> +<!DOCTYPE svg [ + <!ENTITY st0 "fill:none;stroke:none;"> + <!ENTITY st1 "fill:#FFFFFF;stroke:#FFFFFF;stroke-width:7.5901;stroke-linejoin:round;"> + <!ENTITY st2 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;"> + <!ENTITY st3 "stroke:none;"> +]> +<svg width="48pt" height="48pt" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> + <g id="Layer_x0020_3" style="&st2;"> + <g> + <path style="&st1;" d="M25.6,6.9c0-0.3-0.3-0.3-0.5-0.2L8.4,23.6c-0.5,0.5-0.4,0.7,0,1l16.6,16.6c0.1,0.1,0.4,0.1,0.4-0.1v-10h13.6c0.3,0,0.5-0.2,0.5-0.4l0-13.3c0-0.3-0.2-0.5-0.5-0.5H25.5l0.1-10.1z"/> + <path style="&st3;" d="M25.6,6.9c0-0.3-0.3-0.3-0.5-0.2L8.4,23.6c-0.5,0.5-0.4,0.7,0,1l16.6,16.6c0.1,0.1,0.4,0.1,0.4-0.1v-10h13.6c0.3,0,0.5-0.2,0.5-0.4l0-13.3c0-0.3-0.2-0.5-0.5-0.5H25.5l0.1-10.1z"/> + </g> + </g> + <g id="crop_x0020_marks" style="&st2;"> + <path style="&st0;" d="M48,48H0V0h48v48z"/> + </g> +</svg> diff --git a/boost/tools/build/doc/images/prev_disabled.png b/boost/tools/build/doc/images/prev_disabled.png Binary files differnew file mode 100644 index 00000000..ab3c17e0 --- /dev/null +++ b/boost/tools/build/doc/images/prev_disabled.png diff --git a/boost/tools/build/doc/images/smiley.png b/boost/tools/build/doc/images/smiley.png Binary files differnew file mode 100644 index 00000000..30a77f71 --- /dev/null +++ b/boost/tools/build/doc/images/smiley.png diff --git a/boost/tools/build/doc/images/tip.png b/boost/tools/build/doc/images/tip.png Binary files differnew file mode 100644 index 00000000..5c4aab3b --- /dev/null +++ b/boost/tools/build/doc/images/tip.png diff --git a/boost/tools/build/doc/images/tip.svg b/boost/tools/build/doc/images/tip.svg new file mode 100644 index 00000000..cd437a5e --- /dev/null +++ b/boost/tools/build/doc/images/tip.svg @@ -0,0 +1,84 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --><svg height="1052.3622047" id="svg2" inkscape:version="0.42.2" sodipodi:docbase="/home/sergio/tmp/downloads" sodipodi:docname="lamp.svg" sodipodi:version="0.32" width="744.09448819" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <metadata> + <rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + <cc:Work rdf:about=""> + <dc:title>lamp</dc:title> + <dc:description></dc:description> + <dc:subject> + <rdf:Bag> + <rdf:li>office</rdf:li> + <rdf:li></rdf:li> + <rdf:li>lamp</rdf:li> + </rdf:Bag> + </dc:subject> + <dc:publisher> + <cc:Agent rdf:about="http://www.openclipart.org/"> + <dc:title>Open Clip Art Library</dc:title> + </cc:Agent> + </dc:publisher> + <dc:creator> + <cc:Agent> + <dc:title>Sergio Luiz Araujo Silva</dc:title> + </cc:Agent> + </dc:creator> + <dc:rights> + <cc:Agent> + <dc:title>Public Domain</dc:title> + </cc:Agent> + </dc:rights> + <dc:date>set 2005</dc:date> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/> + <dc:language>en</dc:language> + </cc:Work> + <cc:License rdf:about="http://web.resource.org/cc/PublicDomain"> + <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/> + <cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/> + <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/> + </cc:License> + </rdf:RDF> + </metadata> + <defs id="defs4"> + <linearGradient id="linearGradient13125"> + <stop id="stop13127" offset="0.0000000" style="stop-color:#ffffff;stop-opacity:1.0000000;"/> + <stop id="stop13129" offset="1" style="stop-color:#fffeff;stop-opacity:0;"/> + </linearGradient> + <linearGradient id="linearGradient12389"> + <stop id="stop12391" offset="0.0000000" style="stop-color:#fefefe;stop-opacity:1.0000000;"/> + <stop id="stop12393" offset="1.0000000" style="stop-color:#fffefe;stop-opacity:1.0000000;"/> + </linearGradient> + <radialGradient cx="358.25909" cy="186.06468" fx="358.25909" fy="186.06468" gradientTransform="matrix(1.000001,-8.244061e-7,3.143917e-7,0.381356,-4.028738e-4,115.1081)" gradientUnits="userSpaceOnUse" id="radialGradient13131" inkscape:collect="always" r="27.486719" xlink:href="#linearGradient13125"/> + <radialGradient cx="358.25909" cy="186.06468" fx="358.25909" fy="186.06468" gradientTransform="matrix(1.000001,-8.244061e-7,3.143917e-7,0.381356,-4.028738e-4,115.1081)" gradientUnits="userSpaceOnUse" id="radialGradient14587" inkscape:collect="always" r="27.486719" xlink:href="#linearGradient13125"/> + <radialGradient cx="358.25909" cy="186.06468" fx="358.25909" fy="186.06468" gradientTransform="matrix(1.000001,-8.244061e-7,3.143917e-7,0.381356,-4.028738e-4,115.1081)" gradientUnits="userSpaceOnUse" id="radialGradient15390" inkscape:collect="always" r="27.486719" xlink:href="#linearGradient13125"/> + <radialGradient cx="358.25909" cy="186.06468" fx="358.25909" fy="186.06468" gradientTransform="matrix(1.000001,-8.244061e-7,3.143917e-7,0.381356,-4.028738e-4,115.1081)" gradientUnits="userSpaceOnUse" id="radialGradient16141" inkscape:collect="always" r="27.486719" xlink:href="#linearGradient13125"/> + </defs> + <sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="layer1" inkscape:cx="344.34505" inkscape:cy="795.78292" inkscape:document-units="px" inkscape:guide-bbox="true" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="693" inkscape:window-width="1024" inkscape:window-x="0" inkscape:window-y="25" inkscape:zoom="0.72123084" pagecolor="#ffffff" showguides="true"/> + <g id="layer1" inkscape:groupmode="layer" inkscape:label="Layer 1"> + <path d="M 369.44028,121.86683 C 302.64703,119.68096 242.59223,184.30679 250.47188,250.87980 C 252.47522,280.21980 267.84094,306.49880 285.94332,328.82253 C 303.71281,358.65039 312.13900,393.24133 313.51068,427.73030 C 317.00419,446.97288 338.01608,454.57063 355.35334,455.26572 C 375.18456,456.91501 395.94281,455.09265 414.43470,447.69729 C 430.92724,435.70557 427.37713,413.20597 430.74488,395.55648 C 434.70351,361.57615 449.78002,329.76555 471.07843,303.26619 C 504.41026,252.31528 488.56419,176.76397 437.75400,143.26422 C 417.82956,129.49394 393.70573,121.69096 369.44028,121.86683 z " id="path1384" style="opacity:1.0000000;fill:#f3f2f3;fill-opacity:0.83333331;stroke:#000000;stroke-width:0.58960420;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"/> + <path d="M 425.72698,154.07768 C 437.68158,164.87540 453.68534,182.03604 451.17873,203.82428 C 455.99913,200.54641 460.81954,197.26853 465.63995,193.99066 C 459.85546,170.27425 448.28648,162.75442 425.72698,154.07768 z " id="path2153" sodipodi:nodetypes="cccc" style="fill:#fefefe;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 506.99897 296.94009 A 37.120701 18.718985 0 1 1 432.75756,296.94009 A 37.120701 18.718985 0 1 1 506.99897 296.94009 z" id="path2881" sodipodi:cx="469.87827" sodipodi:cy="296.94009" sodipodi:rx="37.120701" sodipodi:ry="18.718985" sodipodi:type="arc" style="opacity:1.0000000;color:#000000;fill:#fefefe;fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:0.64700001;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" transform="matrix(0.818103,0.000000,0.000000,0.896150,-13.89510,-26.68653)"/> + <path d="M 359.20536,314.30802 L 336.64585,244.31570 C 362.29042,230.62575 382.72895,234.28926 403.16748,243.15881 L 379.45107,315.46491 L 379.45107,315.46491" id="path3617" sodipodi:nodetypes="ccccc" style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#8f9595;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 513.73605 514.32300 A 52.508934 11.885468 0 1 1 408.71818,514.32300 A 52.508934 11.885468 0 1 1 513.73605 514.32300 z" id="path4361" sodipodi:cx="461.22711" sodipodi:cy="514.32300" sodipodi:rx="52.508934" sodipodi:ry="11.885468" sodipodi:type="arc" style="opacity:1.0000000;color:#000000;fill:#a0a0a0;fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:0.64700001;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" transform="matrix(0.982435,0.000000,0.000000,1.387810,-83.52495,-281.2705)"/> + <path d="M 315.87677,433.07959 C 319.14672,442.90428 329.03398,448.82383 338.76816,450.68840 C 362.00206,456.37952 386.74882,455.38004 409.63484,448.57985 C 414.28840,447.19363 419.18392,445.42184 422.06530,441.25295 C 423.42527,439.84003 425.68582,434.46169 424.07088,434.30126 C 411.81432,444.17256 395.75685,447.78808 380.34111,448.56322 C 362.85475,449.05661 344.64886,448.26521 328.51659,440.79114 C 324.02706,438.71576 319.76022,436.14612 315.87677,433.07959 z " id="path4363" style="fill:#d6dee6;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 400.47436,522.16227 C 396.48542,528.09177 392.49650,534.02126 388.50756,539.95076 C 383.93367,541.47295 366.98819,546.44954 353.57745,538.01018 C 350.34318,532.29631 347.10892,526.58244 343.87465,520.86856 C 364.35835,531.64946 396.48542,523.99502 400.47436,522.16227 z " id="path5094" sodipodi:nodetypes="ccccc" style="fill:#090a0c;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 419.65600,444.27781 C 419.97026,446.39906 420.28452,448.52031 420.59878,450.64156 C 421.46299,450.95582 422.32720,451.27008 423.19142,451.58434 C 423.19142,452.91994 423.19142,454.25554 423.19142,455.59114 C 422.32720,455.98397 421.46299,456.37678 420.59878,456.76961 C 420.36308,459.20512 420.12739,461.64063 419.89170,464.07614 C 420.52021,464.23327 421.14873,464.39039 421.77725,464.54753 C 421.69869,466.59021 421.62012,468.63289 421.54156,470.67558 C 420.83447,471.46123 420.12739,472.24688 419.42030,473.03253 C 419.57744,474.05387 419.73456,475.07522 419.89170,476.09656 C 420.91303,477.11790 421.93438,478.13925 422.95572,479.16058 C 422.87716,480.18193 422.79859,481.20328 422.72003,482.22461 C 422.01294,483.01026 421.30586,483.79591 420.59878,484.58156 C 420.36308,485.05294 420.12739,485.52433 419.89170,485.99572 C 419.57744,486.70280 419.26317,487.40989 418.94892,488.11697 C 419.10605,489.05975 419.26317,490.00253 419.42030,490.94531 C 419.89170,491.65239 420.36308,492.35947 420.83447,493.06655 C 420.67734,494.71641 420.52021,496.36627 420.36308,498.01614 C 415.02067,505.24410 409.67827,512.47206 404.33587,519.70003 C 403.15740,520.24998 401.97892,520.79994 400.80045,521.34989 C 397.81498,522.29266 394.82952,523.23544 391.84406,524.17822 C 386.34452,524.80674 380.84498,525.43525 375.34545,526.06378 C 371.96717,525.90664 368.58887,525.74952 365.21059,525.59238 C 362.46082,525.51382 359.71105,525.43525 356.96128,525.35669 C 353.42587,524.49247 349.89045,523.62827 346.35503,522.76405 C 345.17656,521.82128 343.99809,520.87850 342.81962,519.93572 C 339.75559,517.81447 336.69157,515.69322 333.62754,513.57197 C 328.75652,508.30813 323.88551,503.04429 319.01448,497.78044 C 319.01448,496.52341 319.01448,495.26636 319.01448,494.00933 C 319.87870,494.00933 320.74291,494.00933 321.60712,494.00933 C 321.13574,492.83086 320.66435,491.65239 320.19296,490.47392 C 319.09305,488.19554 317.99314,485.91716 316.89323,483.63878 C 316.89323,482.93170 316.89323,482.22461 316.89323,481.51753 C 318.38597,480.26049 319.87869,479.00345 321.37143,477.74642 C 320.03583,475.54660 318.70022,473.34679 317.36462,471.14697 C 317.28606,470.83271 317.20748,470.51845 317.12892,470.20419 C 318.46453,468.39720 319.80013,466.59021 321.13574,464.78322 C 320.74291,463.68331 320.35009,462.58341 319.95726,461.48350 C 319.09305,460.38359 318.22883,459.28369 317.36462,458.18378 C 317.12892,457.31956 316.89323,456.45536 316.65753,455.59114 C 317.75744,454.17697 318.85735,452.76281 319.95726,451.34864 C 319.87870,450.01304 319.80013,448.67744 319.72157,447.34184 C 319.32874,446.71332 318.93592,446.08480 318.54310,445.45628 C 318.62166,444.74920 318.70023,444.04212 318.77879,443.33503 C 319.48588,443.25647 320.19296,443.17790 320.90004,443.09934 C 324.04263,445.22059 327.18523,447.34184 330.32782,449.46309 C 348.08347,456.92674 391.76550,461.09068 419.65600,444.27781 z " id="path7284" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccc" style="fill:#fba246;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 389.86281,523.00744 C 389.46998,521.82897 391.23336,522.26765 390.84054,521.08918 C 383.37688,521.01061 375.91323,520.93205 368.44957,520.85348 C 368.44957,520.53923 368.44957,520.22496 368.44957,519.91070 C 374.10624,519.75357 379.76290,519.59645 385.41957,519.43932 C 388.24790,518.88937 391.07623,518.33941 393.90457,517.78946 C 395.39730,517.55377 396.89003,517.31807 398.38277,517.08237 C 401.44679,515.03969 404.51082,512.99701 407.57485,510.95432 C 407.49629,510.64006 407.41771,510.32580 407.33915,510.01153 C 401.36822,510.48292 395.39730,510.95432 389.42637,511.42571 C 387.30512,511.81853 385.18387,512.21135 383.06263,512.60418 C 379.13438,512.36849 375.20615,512.13279 371.27790,511.89710 C 369.78518,511.73997 368.29244,511.58284 366.79971,511.42571 C 364.44277,510.32580 362.08582,509.22589 359.72888,508.12598 C 376.54175,507.18320 396.89003,507.18320 415.11707,493.98432 C 391.31192,502.15506 371.27790,500.19093 355.01499,497.99112 C 375.91322,494.06288 396.57577,493.19867 417.00262,478.42849 C 387.38368,489.42756 366.24975,485.57788 349.35832,483.84946 C 371.51360,479.29269 403.56804,478.27136 414.40998,466.64376 C 383.06263,474.89306 355.95776,473.47890 338.75207,469.47210 C 352.81517,467.58654 366.87827,465.70098 380.94137,463.81543 C 374.10624,463.18691 367.27110,462.55840 360.43596,461.92988 C 373.32059,459.73006 386.20522,457.53024 399.08985,455.33043 C 381.88416,456.19465 346.53000,460.82997 319.89653,444.48849 C 323.66763,447.63108 328.61721,449.83090 331.20985,453.91627 C 327.28161,453.44487 323.35338,452.97349 319.42513,452.50210 C 319.66083,453.83770 319.89653,455.17330 320.13222,456.50890 C 324.13902,459.02298 328.14582,461.53704 332.15263,464.05112 C 327.43875,466.25093 322.72485,468.45075 318.01096,470.65057 C 323.90332,472.53612 329.79568,474.42169 335.68805,476.30724 C 330.03138,478.66418 322.48915,476.30724 318.71804,483.37807 C 325.55318,486.59923 335.21666,487.22774 339.22346,493.04154 C 333.33110,493.51293 326.73166,489.27043 321.54639,494.45571 C 327.67444,498.06968 333.80249,501.68367 339.93055,505.29765 C 336.55226,504.82626 333.17397,504.35487 329.79568,503.88348 C 334.58814,509.30445 341.26727,513.37780 346.05972,518.79877 C 362.00838,520.29150 373.91416,521.51471 389.86281,523.00744 z " id="path6556" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc" style="fill:#ffc080;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 410.63580,448.38806 C 375.91016,459.46570 347.07688,453.33765 330.49970,448.38806 C 332.54238,449.09515 334.58507,449.80223 336.62775,450.50931 C 365.30391,460.56561 396.80839,453.41621 407.80747,450.27362 C 408.75025,449.64510 409.69303,449.01658 410.63580,448.38806 z " id="path7286" sodipodi:nodetypes="ccccc" style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 431.22109,368.33927 C 427.74256,388.71364 424.26401,409.08801 420.78546,429.46237 C 416.60557,437.06563 407.94091,440.30372 400.07083,442.61238 C 391.48668,445.18530 382.40444,445.05799 373.54205,444.61656 C 371.08048,446.38986 364.99205,442.92177 370.06503,441.81235 C 377.17154,440.98795 384.60188,442.10538 391.38552,439.26558 C 401.04319,435.47671 410.26670,429.97354 417.05844,422.00834 C 421.19961,403.95301 425.34070,385.89766 429.48184,367.84233 C 430.06159,368.00798 430.64135,368.17360 431.22109,368.33927 z " id="path3629" style="fill:#ffffff;fill-opacity:0.64285713;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 353.42087,428.84088 L 351.10708,419.00725 L 351.68553,378.22661 L 353.13164,373.45440 L 353.05576,339.28565 L 349.95018,336.28751 L 349.37173,316.04336 C 363.86558,304.49563 376.56238,306.21837 388.70625,316.23514 L 388.12780,336.28907 L 385.23556,339.18131 L 384.65711,373.58108 L 386.39245,378.21491 L 385.81401,427.68398 L 382.34331,429.99778 L 374.24503,428.84088 L 371.35278,425.37019 L 366.14675,425.37019 L 360.94071,429.41933 L 353.42087,428.84088 z " id="path3619" sodipodi:nodetypes="ccccccccccccccccccc" style="fill:#c1c1c1;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#9b989f;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 358.25832,325.31572 L 358.25832,416.41507" id="path5096" style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 380.15345,325.31572 L 380.15345,416.41507" id="path5824" style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 361.91098,325.31572 L 361.91098,416.41507" id="path5826" style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#8f8f92;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 376.52161,325.31572 L 376.52161,416.41507" id="path6554" style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#8f8f92;stroke-width:0.91160071px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <g id="g9475" transform="matrix(0.911601,0.000000,0.000000,0.911601,328.5961,-156.2531)"> + <path d="M 86.864034,673.56687 L 79.199560,676.97330 L 77.155700,678.67652 L 75.793127,679.69845 L 65.573829,679.35780 L 65.403508,678.33587 L 70.683478,676.97330 C 70.683478,676.97330 74.430554,676.63266 75.111841,676.46234 C 75.793127,676.29201 78.688595,674.92944 78.688595,674.92944 L 84.649852,671.52301 L 87.034355,671.52301 L 86.864034,673.56687 z " id="path8741" style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 91.973683,686.34099 L 88.056285,686.17067 L 85.331139,687.53324 L 81.073098,689.23646 L 77.836987,691.45064 L 75.111841,692.30225 L 70.853800,692.64289 L 69.320905,693.15386 L 71.024122,693.83514 L 75.963449,693.83514 L 80.221490,694.51643 L 83.627923,693.83514 L 87.545320,690.42871 C 87.545320,690.42871 90.270466,689.23646 90.951753,688.89581 C 91.633039,688.55517 93.165934,687.87388 93.165934,687.87388 L 91.973683,686.34099 z " id="path8743" style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 94.017542,700.30736 L 89.078215,703.03251 L 85.842104,705.07637 L 83.457601,706.94991 L 77.836987,708.14216 L 75.622806,708.14216 L 81.584063,710.01570 L 86.353069,707.97184 L 91.292396,705.58733 L 92.825291,704.05444 L 94.017542,700.30736 z " id="path8745" style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 91.462718,717.85049 C 91.462718,717.85049 81.924706,721.59757 81.584063,722.27885 C 81.243420,722.96014 78.688595,723.98207 78.688595,723.98207 L 72.897660,724.66336 L 71.024122,725.68529 L 76.644736,726.36657 L 82.435671,724.49304 L 86.693712,724.32271 L 89.929823,722.10853 L 91.462718,720.40532 L 91.462718,717.85049 z " id="path8747" style="fill:#ffffff;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + </g> + <path d="M 378.14273,525.28637 C 377.57434,530.51553 378.00099,537.83204 377.43261,543.06120 C 372.27918,543.00443 367.82875,543.82657 360.97078,541.72320 C 359.43614,536.89190 356.80919,529.30796 355.27454,524.47667 C 356.26507,524.72572 356.68741,524.86790 357.82038,524.93742 C 358.95335,525.00694 360.79692,524.96593 361.90337,525.03791 C 363.00981,525.10990 364.25012,525.06768 365.31257,525.13480 C 366.37503,525.20191 367.41113,525.22689 368.41214,525.28180 C 369.41314,525.33669 370.37905,525.38365 371.30113,525.41898 C 372.22321,525.45432 374.35115,525.55378 375.17683,525.56221 C 376.00251,525.57065 375.56381,525.48806 376.27564,525.46225 C 376.98745,525.43643 377.56225,525.35378 378.14273,525.28637 z " id="path10207" sodipodi:nodetypes="ccccsssssssc" style="fill:#ffffff;fill-opacity:0.31547615;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"/> + <path d="M 467.06377,199.37552 L 453.69293,208.53364 L 451.86130,221.53816 L 468.71223,214.21167 L 467.06377,199.37552 z " id="path16869" style="fill:#fefefe;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;opacity:1.0000000;color:#000000;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0;visibility:visible;display:inline;overflow:visible"/> + </g> +</svg> diff --git a/boost/tools/build/doc/images/toc-blank.png b/boost/tools/build/doc/images/toc-blank.png Binary files differnew file mode 100644 index 00000000..6ffad17a --- /dev/null +++ b/boost/tools/build/doc/images/toc-blank.png diff --git a/boost/tools/build/doc/images/toc-minus.png b/boost/tools/build/doc/images/toc-minus.png Binary files differnew file mode 100644 index 00000000..abbb020c --- /dev/null +++ b/boost/tools/build/doc/images/toc-minus.png diff --git a/boost/tools/build/doc/images/toc-plus.png b/boost/tools/build/doc/images/toc-plus.png Binary files differnew file mode 100644 index 00000000..941312ce --- /dev/null +++ b/boost/tools/build/doc/images/toc-plus.png diff --git a/boost/tools/build/doc/images/up.png b/boost/tools/build/doc/images/up.png Binary files differnew file mode 100644 index 00000000..17d9c3ec --- /dev/null +++ b/boost/tools/build/doc/images/up.png diff --git a/boost/tools/build/doc/images/up.svg b/boost/tools/build/doc/images/up.svg new file mode 100644 index 00000000..d31aa9c8 --- /dev/null +++ b/boost/tools/build/doc/images/up.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In --> +<!DOCTYPE svg [ + <!ENTITY st0 "fill:none;stroke:none;"> + <!ENTITY st1 "fill:#FFFFFF;stroke:#FFFFFF;stroke-width:7.5901;stroke-linejoin:round;"> + <!ENTITY st2 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;"> + <!ENTITY st3 "stroke:none;"> +]> +<svg width="48pt" height="48pt" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> + <g id="Layer_x0020_3" style="&st2;"> + <g> + <path style="&st1;" d="M41.1,25.6c0.3,0,0.3-0.3,0.2-0.5L24.4,8.4c-0.5-0.5-0.7-0.4-1,0L6.7,25.1c-0.1,0.1-0.1,0.4,0.1,0.4h10v13.6c0,0.3,0.2,0.5,0.4,0.5l13.3,0c0.3,0,0.5-0.2,0.5-0.5V25.5l10.1,0.1z"/> + <path style="&st3;" d="M41.1,25.6c0.3,0,0.3-0.3,0.2-0.5L24.4,8.4c-0.5-0.5-0.7-0.4-1,0L6.7,25.1c-0.1,0.1-0.1,0.4,0.1,0.4h10v13.6c0,0.3,0.2,0.5,0.4,0.5l13.3,0c0.3,0,0.5-0.2,0.5-0.5V25.5l10.1,0.1z"/> + </g> + </g> + <g id="crop_x0020_marks" style="&st2;"> + <path style="&st0;" d="M48,48H0V0h48v48z"/> + </g> +</svg> diff --git a/boost/tools/build/doc/images/up_disabled.png b/boost/tools/build/doc/images/up_disabled.png Binary files differnew file mode 100644 index 00000000..e22bc871 --- /dev/null +++ b/boost/tools/build/doc/images/up_disabled.png diff --git a/boost/tools/build/doc/images/warning.png b/boost/tools/build/doc/images/warning.png Binary files differnew file mode 100644 index 00000000..1c33db8f --- /dev/null +++ b/boost/tools/build/doc/images/warning.png diff --git a/boost/tools/build/doc/images/warning.svg b/boost/tools/build/doc/images/warning.svg new file mode 100644 index 00000000..fc8d7484 --- /dev/null +++ b/boost/tools/build/doc/images/warning.svg @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Generator: Adobe Illustrator 9.0, SVG Export Plug-In --> +<!DOCTYPE svg [ + <!ENTITY st0 "fill:#000000;stroke:#FFFFFF;stroke-width:7.9139;stroke-linejoin:round;"> + <!ENTITY st1 "fill-rule:nonzero;clip-rule:nonzero;fill:#FFFFFF;stroke:#000000;stroke-miterlimit:4;"> + <!ENTITY st2 "fill:none;stroke:none;"> + <!ENTITY st3 "fill:#000000;"> + <!ENTITY st4 "fill-rule:evenodd;clip-rule:evenodd;stroke:none;"> + <!ENTITY st5 "fill-rule:nonzero;clip-rule:nonzero;stroke:#000000;stroke-miterlimit:4;"> +]> +<svg width="48pt" height="48pt" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> + <g id="Layer_x0020_4" style="&st1;"> + <g style="&st4;"> + <path style="&st0;" d="M16.4,42.3L5.7,31.6V16.4L16.4,5.7h15.2l10.7,10.7v15.2L31.6,42.3H16.4z"/> + <path style="&st3;" d="M16.4,42.3L5.7,31.6V16.4L16.4,5.7h15.2l10.7,10.7v15.2L31.6,42.3H16.4z"/> + <path d="M11.7,17.7l18.7,18.7l5.9-5.9L17.6,11.7l-5.9,5.9z"/> + <path d="M11.7,30.5l5.9,5.9l18.7-18.7l-5.9-5.9L11.7,30.5z"/> + </g> + </g> + <g id="crop_x0020_marks" style="&st5;"> + <path style="&st2;" d="M48,48H0V0h48v48z"/> + </g> +</svg> diff --git a/boost/tools/build/doc/jamfile.jam b/boost/tools/build/doc/jamfile.jam new file mode 100644 index 00000000..e61017d6 --- /dev/null +++ b/boost/tools/build/doc/jamfile.jam @@ -0,0 +1,31 @@ +# Copyright 2004,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) + +import quickbook ; +using boostbook ; + +project tools/build/doc + ; + +boostbook userman : src/standalone.xml + : <xsl:param>toc.section.depth=1 + <xsl:param>doc.standalone=true + <xsl:param>nav.layout=none + <implicit-dependency>jam_docs + <dependency>jam_docs + <xsl:param>boost.root=.. + <xsl:param>boost.graphics.root=../images/ + <xsl:param>html.stylesheet=../boostbook.css + <xsl:param>chunk.first.sections=0 + <xsl:param>admon.graphics=0 + + <xsl:param>boost.defaults=Boost + ; + +xml jam_docs : bjam.qbk ; + +if ! $(BOOST_ROOT) +{ + BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ; +} diff --git a/boost/tools/build/doc/src/abstract-target.xml b/boost/tools/build/doc/src/abstract-target.xml new file mode 100644 index 00000000..dad53380 --- /dev/null +++ b/boost/tools/build/doc/src/abstract-target.xml @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<section id="bbv2.reference.class.abstract-target"> + + <title>Class abstract-target</title> + <indexterm> + <primary>abstract-target</primary> + </indexterm> + + <para> + Base class for all abstract targets. + </para> + +<programlisting language="jam"> +class abstract-target { + rule <link linkend="bbv2.reference.class.abstract-target.__init__">__init__</link> ( name : project ) + rule <link linkend="bbv2.reference.class.abstract-target.name">name</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.project">project</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.location">location</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.full-name">full-name</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.__init__">generate</link> ( property-set ) +} +</programlisting> + + <para> + Classes derived from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>: + <itemizedlist> + <listitem> + <link linkend="bbv2.reference.class.project-target">project-target</link> + </listitem> + <listitem> + <link linkend="bbv2.reference.class.main-target">main-target</link> + </listitem> + <listitem> + <link linkend="bbv2.reference.class.project-target">basic-target</link> + </listitem> + </itemizedlist> + </para> + + <orderedlist> + + <listitem id="bbv2.reference.class.abstract-target.__init__"> + <code language="jam">rule __init__ ( name : project )</code> + <para> + <variablelist> + <varlistentry> + <term><literal>name</literal></term> + <listitem> + <para>The name of the target in the Jamfile.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>project</literal></term> + <listitem> + <para>The <link linkend="bbv2.reference.class.project-target">project</link> to which this target belongs.</para> + </listitem> + </varlistentry> + </variablelist> + </para> + </listitem> + + <listitem id="bbv2.reference.class.abstract-target.name"> + <indexterm zone="bbv2.reference.class.abstract-target.name"> + <primary>name</primary> + <secondary>Abstract Target</secondary> + </indexterm> + <code language="jam">rule name ( )</code> + <para>Returns the name of this target.</para> + </listitem> + + <listitem id="bbv2.reference.class.abstract-target.project"> + <indexterm zone="bbv2.reference.class.abstract-target.project"> + <primary>project</primary> + <secondary>Abstract Target</secondary> + </indexterm> + <code language="jam">rule project ( )</code> + <para>Returns the <link linkend="bbv2.reference.class.project-target">project</link> for this target.</para> + </listitem> + + <listitem id="bbv2.reference.class.abstract-target.location"> + <indexterm zone="bbv2.reference.class.abstract-target.location"> + <primary>location</primary> + <secondary>Abstract Target</secondary> + </indexterm> + <code language="jam">rule location ( )</code> + <para>Returns the location where the target was declared.</para> + </listitem> + + <listitem id="bbv2.reference.class.abstract-target.full-name"> + <indexterm zone="bbv2.reference.class.abstract-target.full-name"> + <primary>full-name</primary> + <secondary>Abstract Target</secondary> + </indexterm> + <code language="jam">rule full-name ( )</code> + <para>Returns a user-readable name for this target.</para> + </listitem> + + <listitem id="bbv2.reference.class.abstract-target.generate"> + <indexterm zone="bbv2.reference.class.abstract-target.generate"> + <primary>generate</primary> + <secondary>Abstract Target</secondary> + </indexterm> + <code language="jam">rule generate ( property-set )</code> + <para> + 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 + classes. + </para> + + <para> + On success, returns: + <itemizedlist> + <listitem>a property-set with the usage requirements to be applied to dependents</listitem> + <listitem>a list of produced virtual targets, which may be empty.</listitem> + </itemizedlist> + If <code language="jam">property-set</code> is empty, performs the + default build of this target, in a way specific to the derived class. + </para> + </listitem> + + </orderedlist> + +</section> diff --git a/boost/tools/build/doc/src/architecture.xml b/boost/tools/build/doc/src/architecture.xml new file mode 100644 index 00000000..0b22defe --- /dev/null +++ b/boost/tools/build/doc/src/architecture.xml @@ -0,0 +1,668 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE appendix PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + + <appendix id="bbv2.arch"> + <title>Boost.Build v2 architecture</title> + + <sidebar> + <para> + This document is work-in progress. Do not expect much from it yet. + </para> + </sidebar> + + <section id="bbv2.arch.overview"> + <title>Overview</title> + + <!-- FIXME: the below does not mention engine at all, making rest of the + text confusing. Things like 'kernel' and 'util' don't have to be + mentioned at all. --> + <para> + Boost.Build implementation is structured in four different components: + "kernel", "util", "build" and "tools". The first two are relatively + uninteresting, so we will focus on the remaining pair. The "build" component + provides classes necessary to declare targets, determining which properties + should be used for their building, and creating the dependency graph. The + "tools" component provides user-visible functionality. It mostly allows + declaring specific kinds of main targets, as well as registering available + tools, which are then used when creating the dependency graph. + </para> + </section> + + <section id="bbv2.arch.build"> + <title>The build layer</title> + + <para> + The build layer has just four main parts -- metatargets (abstract + targets), virtual targets, generators and properties. + + <itemizedlist> + <listitem><para> + Metatargets (see the "targets.jam" module) represent all the + user-defined entities that can be built. The "meta" prefix signifies + that they do not need to correspond to exact files or even files at all + -- they can produce a different set of files depending on the build + request. Metatargets are created when Jamfiles are loaded. Each has a + <code>generate</code> method which is given a property set and produces + virtual targets for the passed properties. + </para></listitem> + <listitem><para> + Virtual targets (see the "virtual-targets.jam" module) correspond to + actual atomic updatable entities -- most typically files. + </para></listitem> + <listitem><para> + Properties are just (name, value) pairs, specified by the user and + describing how targets should be built. Properties are stored using the + <code>property-set</code> class. + </para></listitem> + <listitem><para> + Generators are objects that encapsulate specific tools -- they can + take a list of source virtual targets and produce new virtual targets + from them. + </para></listitem> + </itemizedlist> + + </para> + + <para> + The build process includes the following steps: + + <orderedlist> + <listitem><para> + Top-level code calls the <code>generate</code> method of a metatarget + with some properties. + </para></listitem> + + <listitem><para> + The metatarget combines the requested properties with its requirements + and passes the result, together with the list of sources, to the + <code>generators.construct</code> function. + </para></listitem> + + <listitem><para> + A generator appropriate for the build properties is selected and its + <code>run</code> method is called. The method returns a list of virtual + targets. + </para></listitem> + + <listitem><para> + The virtual targets are returned to the top level code, and for each instance, + the <literal>actualize</literal> method is called to setup nodes and updating + actions in the depenendency graph kepts inside Boost.Build engine. This dependency + graph is then updated, which runs necessary commands. + </para></listitem> + </orderedlist> + </para> + + <section id="bbv2.arch.build.metatargets"> + <title>Metatargets</title> + + <para> + There are several classes derived from "abstract-target". The + "main-target" class represents a top-level main target, the + "project-target" class acts like a container holding multiple main + targets, and "basic-target" class is a base class for all further target + types. + </para> + + <para> + Since each main target can have several alternatives, all top-level + target objects are actually containers, referring to "real" main target + classes. The type of that container is "main-target". For example, given: +<programlisting> +alias a ; +lib a : a.cpp : <toolset>gcc ; +</programlisting> + we would have one-top level "main-target" instance, containing one + "alias-target" and one "lib-target" instance. "main-target"'s "generate" + method decides which of the alternative should be used, and calls + "generate" on the corresponding instance. + </para> + + <para> + Each alternative is an instance of a class derived from "basic-target". + "basic-target.generate" does several things that should always be done: + + <itemizedlist> + <listitem><para> + Determines what properties should be used for building the target. + This includes looking at requested properties, requirements, and usage + requirements of all sources. + </para></listitem> + + <listitem><para> + Builds all sources. + </para></listitem> + + <listitem><para> + Computes usage requirements that should be passed back to targets + depending on this one. + </para></listitem> + </itemizedlist> + + For the real work of constructing a virtual target, a new method + "construct" is called. + </para> + + <para> + The "construct" method can be implemented in any way by classes derived + from "basic-target", but one specific derived class plays the central role + -- "typed-target". That class holds the desired type of file to be + produced, and its "construct" method uses the generators module to do the + actual work. + </para> + + <para> + This means that a specific metatarget subclass may avoid using + generators all together. However, this is deprecated and we are trying to + eliminate all such subclasses at the moment. + </para> + + <para> + Note that the <filename>build/targets.jam</filename> file contains an + UML diagram which might help. + </para> + </section> + + <section id="bbv2.arch.build.virtual"> + <title>Virtual targets</title> + + <para> + Virtual targets are atomic updatable entities. Each virtual + target can be assigned an updating action -- instance of the + <code>action</code> class. The action class, in turn, contains a list of + source targets, properties, and a name of an action which + should be executed. + </para> + + <para> + We try hard to never create equal instances of the + <code>virtual-target</code> class. Code creating virtual targets passes + them though the <code>virtual-target.register</code> function, which + detects if a target with the same name, sources, and properties has + already been created. In that case, the preexisting target is returned. + </para> + + <!-- FIXME: the below 2 para are rubbish, must be totally rewritten. --> + <para> + When all virtual targets are produced, they are "actualized". This means + that the real file names are computed, and the commands that should be run + are generated. This is done by the <code>virtual-target.actualize</code> + and <code>action.actualize</code> methods. The first is conceptually + simple, while the second needs additional explanation. Commands in Boost.Build + are generated in a two-stage process. First, a rule with an appropriate + name (for example "gcc.compile") is called and is given a list of target + names. The rule sets some variables, like "OPTIONS". After that, the + command string is taken, and variable are substitutes, so use of OPTIONS + inside the command string gets transformed into actual compile options. + </para> + + <para> + Boost.Build added a third stage to simplify things. It is now possible + to automatically convert properties to appropriate variable assignments. + For example, <debug-symbols>on would add "-g" to the OPTIONS + variable, without requiring to manually add this logic to gcc.compile. + This functionality is part of the "toolset" module. + </para> + + <para> + Note that the <filename>build/virtual-targets.jam</filename> file + contains an UML diagram which might help. + </para> + </section> + + <section id="bbv2.arch.build.properties"> + <title>Properties</title> + + <para> + Above, we noted that metatargets are built with a set of properties. + That set is represented by the <code>property-set</code> class. An + important point is that handling of property sets can get very expensive. + For that reason, we make sure that for each set of (name, value) pairs + only one <code>property-set</code> instance is created. The + <code>property-set</code> uses extensive caching for all operations, so + most work is avoided. The <code>property-set.create</code> is the factory + function used to create instances of the <code>property-set</code> class. + </para> + </section> + </section> + + <section id="bbv2.arch.tools"> + <title>The tools layer</title> + + <para>Write me!</para> + </section> + + <section id="bbv2.arch.targets"> + <title>Targets</title> + + <para>NOTE: THIS SECTION IS NOT EXPECTED TO BE READ! + There are two user-visible kinds of targets in Boost.Build. First are + "abstract" — they correspond to things declared by the user, e.g. + projects and executable files. The primary thing about abstract targets is + that it is possible to request them to be built with a particular set of + properties. Each property combination may possibly yield different built + files, so abstract target do not have a direct correspondence to built + files. + </para> + + <para> + File targets, on the other hand, are associated with concrete files. + Dependency graphs for abstract targets with specific properties are + constructed from file targets. User has no way to create file targets but + can specify rules for detecting source file types, as well as rules for + transforming between file targets of different types. That information is + used in constructing the final dependency graph, as described in the <link + linkend="bbv2.arch.depends">next section</link>. + <emphasis role="bold">Note:</emphasis>File targets are not the same entities + as Jam targets; the latter are created from file targets at the latest + possible moment. + <emphasis role="bold">Note:</emphasis>"File target" is an originally + proposed name for what we now call virtual targets. It is more + understandable by users, but has one problem: virtual targets can + potentially be "phony", and not correspond to any file. + </para> + </section> + + <section id="bbv2.arch.depends"> + <title>Dependency scanning</title> + + <para> + Dependency scanning is the process of finding implicit dependencies, like + "#include" statements in C++. The requirements for correct dependency + scanning mechanism are: + </para> + + <itemizedlist> + <listitem><simpara> + <link linkend="bbv2.arch.depends.different-scanning-algorithms">Support + for different scanning algorithms</link>. C++ and XML have quite different + syntax for includes and rules for looking up the included files. + </simpara></listitem> + + <listitem><simpara> + <link linkend="bbv2.arch.depends.same-file-different-scanners">Ability + to scan the same file several times</link>. For example, a single C++ file + may be compiled using different include paths. + </simpara></listitem> + + <listitem><simpara> + <link linkend="bbv2.arch.depends.dependencies-on-generated-files">Proper + detection of dependencies on generated files.</link> + </simpara></listitem> + + <listitem><simpara> + <link + linkend="bbv2.arch.depends.dependencies-from-generatedfiles">Proper + detection of dependencies from a generated file.</link> + </simpara></listitem> + </itemizedlist> + + <section id="bbv2.arch.depends.different-scanning-algorithms"> + <title>Support for different scanning algorithms</title> + + <para> + Different scanning algorithm are encapsulated by objects called + "scanners". Please see the "scanner" module documentation for more + details. + </para> + </section> + + <section id="bbv2.arch.depends.same-file-different-scanners"> + <title>Ability to scan the same file several times</title> + + <para> + As stated above, it is possible to compile a C++ file multiple times, + using different include paths. Therefore, include dependencies for those + compilations can be different. The problem is that Boost.Build engine does + not allow multiple scans of the same target. To solve that, we pass the + scanner object when calling <literal>virtual-target.actualize</literal> + and it creates different engine targets for different scanners. + </para> + + <para> + For each engine target created with a specified scanner, a + corresponding one is created without it. The updating action is + associated with the scanner-less target, and the target with the scanner + is made to depend on it. That way if sources for that action are touched, + all targets — with and without the scanner are considered outdated. + </para> + + <para> + Consider the following example: "a.cpp" prepared from "a.verbatim", + compiled by two compilers using different include paths and copied into + some install location. The dependency graph would look like: + </para> + +<programlisting> +a.o (<toolset>gcc) <--(compile)-- a.cpp (scanner1) ----+ +a.o (<toolset>msvc) <--(compile)-- a.cpp (scanner2) ----| +a.cpp (installed copy) <--(copy) ----------------------- a.cpp (no scanner) + ^ + | + a.verbose --------------------------------+ +</programlisting> + </section> + + <section id="bbv2.arch.depends.dependencies-on-generated-files"> + <title>Proper detection of dependencies on generated files.</title> + + <para> + This requirement breaks down to the following ones. + </para> + + <orderedlist> + <listitem><simpara> + If when compiling "a.cpp" there is an include of "a.h", the "dir" + directory is on the include path, and a target called "a.h" will be + generated in "dir", then Boost.Build should discover the include, and create + "a.h" before compiling "a.cpp". + </simpara></listitem> + + <listitem><simpara> + Since Boost.Build almost always generates targets under the "bin" + directory, this should be supported as well. I.e. in the scenario above, + Jamfile in "dir" might create a main target, which generates "a.h". The + file will be generated to "dir/bin" directory, but we still have to + recognize the dependency. + </simpara></listitem> + </orderedlist> + + <para> + The first requirement means that when determining what "a.h" means when + found in "a.cpp", we have to iterate over all directories in include + paths, checking for each one: + </para> + + <orderedlist> + <listitem><simpara> + If there is a file named "a.h" in that directory, or + </simpara></listitem> + + <listitem><simpara> + If there is a target called "a.h", which will be generated in that + that directory. + </simpara></listitem> + </orderedlist> + + <para> + Classic Jam has built-in facilities for point (1) above, but that is not + enough. It is hard to implement the right semantics without builtin + support. For example, we could try to check if there exists a target + called "a.h" somewhere in the dependency graph, and add a dependency to + it. The problem is that without a file search in the include path, the + semantics may be incorrect. For example, one can have an action that + generated some "dummy" header, for systems which do not have a native one. + Naturally, we do not want to depend on that generated header on platforms + where a native one is included. + </para> + + <para> + There are two design choices for builtin support. Suppose we have files + a.cpp and b.cpp, and each one includes header.h, generated by some action. + Dependency graph created by classic Jam would look like: + +<programlisting> +a.cpp -----> <scanner1>header.h [search path: d1, d2, d3] + + <d2>header.h --------> header.y + [generated in d2] + +b.cpp -----> <scanner2>header.h [search path: d1, d2, d4] +</programlisting> + </para> + + <para> + In this case, Jam thinks all header.h target are not related. The + correct dependency graph might be: + +<programlisting> +a.cpp ---- + \ + >----> <d2>header.h --------> header.y + / [generated in d2] +b.cpp ---- +</programlisting> + + or + +<programlisting> +a.cpp -----> <scanner1>header.h [search path: d1, d2, d3] + | + (includes) + V + <d2>header.h --------> header.y + [generated in d2] + ^ + (includes) + | +b.cpp -----> <scanner2>header.h [ search path: d1, d2, d4] +</programlisting> + </para> + + <para> + The first alternative was used for some time. The problem however is: + what include paths should be used when scanning header.h? The second + alternative was suggested by Matt Armstrong. It has a similar effect: Any + target depending on <scanner1>header.h will also depend on + <d2>header.h. This way though we now have two different targets with + two different scanners, so those targets can be scanned independently. The + first alternative's problem is avoided, so the second alternative is + implemented now. + </para> + + <para> + The second sub-requirements is that targets generated under the "bin" + directory are handled as well. Boost.Build implements a semi-automatic + approach. When compiling C++ files the process is: + </para> + + <orderedlist> + <listitem><simpara> + The main target to which the compiled file belongs to is found. + </simpara></listitem> + + <listitem><simpara> + All other main targets that the found one depends on are found. These + include: main targets used as sources as well as those specified as + "dependency" properties. + </simpara></listitem> + + <listitem><simpara> + All directories where files belonging to those main targets will be + generated are added to the include path. + </simpara></listitem> + </orderedlist> + + <para> + After this is done, dependencies are found by the approach explained + previously. + </para> + + <para> + Note that if a target uses generated headers from another main target, + that main target should be explicitly specified using the dependency + property. It would be better to lift this requirement, but it does not + seem to be causing any problems in practice. + </para> + + <para> + For target types other than C++, adding of include paths must be + implemented anew. + </para> + </section> + + <section id="bbv2.arch.depends.dependencies-from-generated-files"> + <title>Proper detection of dependencies from generated files</title> + + <para> + Suppose file "a.cpp" includes "a.h" and both are generated by some + action. Note that classic Jam has two stages. In the first stage the + dependency graph is built and actions to be run are determined. In the + second stage the actions are executed. Initially, neither file exists, so + the include is not found. As the result, Jam might attempt to compile + a.cpp before creating a.h, causing the compilation to fail. + </para> + + <para> + The solution in Boost.Jam is to perform additional dependency scans + after targets are updated. This breaks separation between build stages in + Jam — which some people consider a good thing — but I am not + aware of any better solution. + </para> + + <para> + In order to understand the rest of this section, you better read some + details about Jam's dependency scanning, available at <ulink url= + "http://public.perforce.com:8080/@md=d&cd=//public/jam/src/&ra=s&c=kVu@//2614?ac=10"> + this link</ulink>. + </para> + + <para> + Whenever a target is updated, Boost.Jam rescans it for includes. + Consider this graph, created before any actions are run. +<programlisting> +A -------> C ----> C.pro + / +B --/ C-includes ---> D +</programlisting> + </para> + + <para> + Both A and B have dependency on C and C-includes (the latter dependency + is not shown). Say during building we have tried to create A, then tried + to create C and successfully created C. + </para> + + <para> + In that case, the set of includes in C might well have changed. We do + not bother to detect precisely which includes were added or removed. + Instead we create another internal node C-includes-2. Then we determine + what actions should be run to update the target. In fact this means that + we perform the first stage logic when already in the execution stage. + </para> + + <para> + After actions for C-includes-2 are determined, we add C-includes-2 to + the list of A's dependents, and stage 2 proceeds as usual. Unfortunately, + we can not do the same with target B, since when it is not visited, C + target does not know B depends on it. So, we add a flag to C marking it as + rescanned. When visiting the B target, the flag is noticed and + C-includes-2 is added to the list of B's dependencies as well. + </para> + + <para> + Note also that internal nodes are sometimes updated too. Consider this + dependency graph: +<programlisting> +a.o ---> a.cpp + a.cpp-includes --> a.h (scanned) + a.h-includes ------> a.h (generated) + | + | + a.pro <-------------------------------------------+ +</programlisting> + </para> + + <para> + Here, our handling of generated headers come into play. Say that a.h + exists but is out of date with respect to "a.pro", then "a.h (generated)" + and "a.h-includes" will be marked for updating, but "a.h (scanned)" will + not. We have to rescan "a.h" after it has been created, but since "a.h + (generated)" has no associated scanner, it is only possible to rescan + "a.h" after "a.h-includes" target has been updated. + </para> + + <para> + The above consideration lead to the decision to rescan a target whenever + it is updated, no matter if it is internal or not. + </para> + + </section> + </section> + + <warning> + <para> + The remainder of this document is not intended to be read at all. This + will be rearranged in the future. + </para> + </warning> + + <section> + <title>File targets</title> + + <para> + As described above, file targets correspond to files that Boost.Build + manages. Users may be concerned about file targets in three ways: when + declaring file target types, when declaring transformations between types + and when determining where a file target is to be placed. File targets can + also be connected to actions that determine how the target is to be created. + Both file targets and actions are implemented in the + <literal>virtual-target</literal> module. + </para> + + <section> + <title>Types</title> + + <para> + A file target can be given a type, which determines what transformations + can be applied to the file. The <literal>type.register</literal> rule + declares new types. File type can also be assigned a scanner, which is + then used to find implicit dependencies. See "<link + linkend="bbv2.arch.depends">dependency scanning</link>". + </para> + </section> + + <section> + <title>Target paths</title> + + <para> + To distinguish targets build with different properties, they are put in + different directories. Rules for determining target paths are given below: + </para> + + <orderedlist> + <listitem><simpara> + All targets are placed under a directory corresponding to the project + where they are defined. + </simpara></listitem> + + <listitem><simpara> + Each non free, non incidental property causes an additional element to + be added to the target path. That element has the the form + <literal><feature-name>-<feature-value></literal> for + ordinary features and <literal><feature-value></literal> for + implicit ones. [TODO: Add note about composite features]. + </simpara></listitem> + + <listitem><simpara> + If the set of free, non incidental properties is different from the + set of free, non incidental properties for the project in which the main + target that uses the target is defined, a part of the form + <literal>main_target-<name></literal> is added to the target path. + <emphasis role="bold">Note:</emphasis>It would be nice to completely + track free features also, but this appears to be complex and not + extremely needed. + </simpara></listitem> + </orderedlist> + + <para> + For example, we might have these paths: +<programlisting> +debug/optimization-off +debug/main-target-a +</programlisting> + </para> + </section> + </section> + + </appendix> + +<!-- + Local Variables: + mode: xml + sgml-indent-data: t + sgml-parent-document: ("userman.xml" "chapter") + sgml-set-face: t + End: +--> diff --git a/boost/tools/build/doc/src/basic-target.xml b/boost/tools/build/doc/src/basic-target.xml new file mode 100644 index 00000000..ae7c2795 --- /dev/null +++ b/boost/tools/build/doc/src/basic-target.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<section id="bbv2.reference.class.basic-target"> + + <title>Class basic-target</title> + <indexterm> + <primary>basic-target</primary> + </indexterm> + +<programlisting language="jam"> +class basic-target : <link linkend="bbv2.reference.class.abstract-target">abstract-target</link> { + rule <link linkend="bbv2.reference.class.basic-target.__init__">__init__</link> ( name : project : sources * : requirements * : default-build * : usage-requirements * ) + rule <link linkend="bbv2.reference.class.basic-target.generate">generate</link> ( property-set ) + rule <link linkend="bbv2.reference.class.basic-target.construct">construct</link> ( name : source-targets * : property-set ) + + # Methods inherited from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link> + rule <link linkend="bbv2.reference.class.abstract-target.name">name</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.project">project</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.location">location</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.full-name">full-name</link> ( ) +} +</programlisting> + + <para> + Implements the most standard way of constructing main target alternative from + sources. Allows sources to be either files or other main targets and handles + generation of those dependency targets. + <!-- FIXME: Better description of sources. The sources can be either target + references or instances of abstract-target. --> + </para> + + <orderedlist> + + <listitem id="bbv2.reference.class.basic-target.__init__"> + <code language="jam">rule __init__ ( name : project : sources * : requirements * : default-build * : usage-requirements * )</code> + <para> + <variablelist> + <varlistentry> + <term><literal>name</literal></term> + <listitem><para>The name of the target</para></listitem> + </varlistentry> + <varlistentry> + <term><literal>project</literal></term> + <listitem> + <para> + The <link linkend="bbv2.reference.class.project-target">project</link> + in which the target is declared. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </listitem> + + <listitem id="bbv2.reference.class.basic-target.generate"> + <indexterm zone="bbv2.reference.class.basic-target.generate"> + <primary>generate</primary> + <secondary>Basic Target Method</secondary> + </indexterm> + <code language="jam">rule generate ( property-set )</code> + <para> + Overrides + <link linkend="bbv2.reference.class.abstract-target.generate">abstract-target.generate</link>. + + Determines final build properties, generates sources, and calls + <link linkend="bbv2.reference.class.basic-target.construct">construct</link>. + This method should not be overridden. + </para> + + <para> + On success, returns: + <itemizedlist> + <listitem>a property-set with the usage requirements to be applied to dependents</listitem> + <listitem>a list of produced virtual targets, which may be empty.</listitem> + </itemizedlist> + </para> + </listitem> + + <listitem id="bbv2.reference.class.basic-target.construct"> + <indexterm zone="bbv2.reference.class.basic-target.construct"> + <primary>construct</primary> + <secondary>Basic Target Method</secondary> + </indexterm> + <code language="jam">rule construct ( name : source-targets * : property-set )</code> + <para> + 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. + </para> + </listitem> + + </orderedlist> + +</section> diff --git a/boost/tools/build/doc/src/extending.xml b/boost/tools/build/doc/src/extending.xml new file mode 100644 index 00000000..e03a22c2 --- /dev/null +++ b/boost/tools/build/doc/src/extending.xml @@ -0,0 +1,1216 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE appendix PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + + <chapter id="bbv2.extender"> + <title>Extender Manual</title> + + <section id="bbv2.extender.intro"> + <title>Introduction</title> + + <para> + This section explains how to extend Boost.Build to accomodate your + local requirements—primarily to add support for non-standard + tools you have. Before we start, be sure you have read and understoon + the concept of metatarget, <xref linkend="bbv2.overview.concepts"/>, + which is critical to understanding the remaining material. + </para> + + <para> + The current version of Boost.Build has three levels of targets, listed + below. + </para> + + <variablelist> + + <varlistentry> + <term>metatarget</term> + <listitem> + <para> + Object that is created from declarations in Jamfiles. May + be called with a set of properties to produce concrete + targets. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term>concrete target</term> + <listitem> + <para> + Object that corresponds to a file or an action. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term>jam target</term> + <listitem> + <para> + Low-level concrete target that is specific to Boost.Jam build + engine. Essentially a string—most often a name of file. + </para> + </listitem> + </varlistentry> + + </variablelist> + + <para> + In most cases, you will only have to deal with concrete targets and + the process that creates concrete targets from + metatargets. Extending metatarget level is rarely required. The jam + targets are typically only used inside the command line patterns. + </para> + + <warning> + <para>All of the Boost.Jam target-related builtin functions, like + <code>DEPENDS</code> or <code>ALWAYS</code> operate on jam + targets. Applying them to metatargets or concrete targets has no + effect.</para> + </warning> + + <section id="bbv2.extender.overview.metatargets"> + <title>Metatargets</title> + + <para>Metatarget is an object that records information specified + in Jamfile, such as metatarget kind, name, sources and properties, + 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 <link linkend="bbv2.reference.class.abstract-target">abstract-target</link>. + <footnote><para>This name is historic, and will be eventuall changed to + <code>metatarget</code></para></footnote> + </para> + + <para>The <link linkend="bbv2.reference.class.abstract-target.generate">generate</link> + method takes the build properties + (as an instance of the <link linkend="bbv2.reference.class.property-set"> + property-set</link> class) and returns + a list containing:</para> + <itemizedlist> + <listitem><para>As front element—Usage-requirements from this invocation + (an instance of <link linkend="bbv2.reference.class.property-set"> + property-set</link>)</para></listitem> + <listitem><para>As subsequent elements—created concrete targets ( + instances of the <classname>virtual-target</classname> class.)</para></listitem> + </itemizedlist> + + <para>It's possible to lookup a metataget by target-id using the + <code>targets.resolve-reference</code> function, and the + <code>targets.generate-from-reference</code> function can both + lookup and generate a metatarget.</para> + + <para>The <link linkend="bbv2.reference.class.abstract-target">abstract-target</link> + class has three immediate derived classes:</para> + <itemizedlist> + + <listitem><para><link linkend="bbv2.reference.class.project-target">project-target</link> that + corresponds to a project and is not intended for further + subclassing. The <link linkend="bbv2.reference.class.project-target.generate"> + generate</link> method of this + class builds all targets in the project that are not marked as + explicit.</para></listitem> + + <listitem><para><link linkend="bbv2.reference.class.main-target">main-target</link> + corresponds to a target in a project + and contains one or more target alternatives. This class also should not be + subclassed. The <link linkend="bbv2.reference.class.main-target.generate">generate</link> + method of this class selects an alternative to build, and calls the + <link linkend="bbv2.reference.class.basic-target.generate">generate</link> + method of that alternative.</para></listitem> + + <listitem><para><link linkend="bbv2.reference.class.basic-target">basic-target</link> + corresponds to a specific target alternative. This is base class, + with a number of derived classes. The + <link linkend="bbv2.reference.class.basic-target.generate">generate</link> method + processes the target requirements and requested build properties to + determine final properties for the target, builds all sources, and + finally calls the abstract + <link linkend="bbv2.reference.class.basic-target.construct">construct</link> + method with the list of source virtual targets, and the final properties. + </para></listitem> + + </itemizedlist> + + <para>The instances of the <link linkend="bbv2.reference.class.project-target">project-target</link> and + <link linkend="bbv2.reference.class.main-target">main-target</link> classes are created + implicitly—when loading a new Jamfiles, or when a new target + alternative with as-yet unknown name is created. The instances of the + classes derived from <link linkend="bbv2.reference.class.basic-target">basic-target</link> + are typically created when Jamfile calls a <firstterm>metatarget rule</firstterm>, + such as such as <code>exe</code>. + </para> + + <para>It it permissible to create a custom class derived from + <link linkend="bbv2.reference.class.basic-target">basic-target</link> and create new metatarget rule + that creates instance of such target. However, in the majority + of cases, a specific subclass of <link linkend="bbv2.reference.class.basic-target">basic-target</link>— + <link linkend="bbv2.reference.class.typed-target">typed-target</link> is used. That class is associated + with a <firstterm>type</firstterm> and relays to <firstterm>generators</firstterm> + to construct concrete targets of that type. This process will be explained below. + When a new type is declared, a new metatarget rule is automatically defined. + That rule creates new instance of type-target, associated with that type. + </para> + + </section> + + <section id="bbv2.extender.overview.targets"> + <title>Concrete targets</title> + + <para>Concrete targets are represented by instance of classes derived + from <classname>virtual-target</classname>. The most commonly used + subclass is <classname>file-target</classname>. A file target is associated + with an action that creates it— an instance of the <classname>action</classname> + class. The action, in turn, hold a list of source targets. It also holds the + <link linkend="bbv2.reference.class.property-set">property-set</link> + instance with the build properties that should be used for the action.</para> + + <para>Here's an example of creating a target from another target, <code>source</code></para> +<programlisting> +local a = [ new action $(source) : common.copy : $(property-set) ] ; +local t = [ new file-target $(name) : CPP : $(project) : $(a) ] ; +</programlisting> + <para>The first line creates an instance of the <classname>action</classname> class. + The first parameter is the list of sources. The second parameter is the name + a jam-level <link linkend="bbv2.overview.jam_language.actions">action</link>. + The third parameter is the property-set applying to this action. The second line + creates a target. We specifie a name, a type and a project. We also pass the + action object created earlier. If the action creates several targets, we can repeat + the second line several times.</para> + + <para>In some cases, code that creates concrete targets may be invoked more than + once with the same properties. Returning to different instance of <classname>file-target</classname> + that correspond to the same file clearly will result in problems. Therefore, whenever + returning targets you should pass them via the <code>virtual-target.register</code> + 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.<footnote><para>This create-then-register pattern is caused by limitations + of the Boost.Jam language. Python port is likely to never create duplicate targets.</para></footnote> + Here are a couple of examples: +<programlisting> +return [ virtual-target.register $(t) ] ; +return [ sequence.transform virtual-target.register : $(targets) ] ; +</programlisting> + </para> + + </section> + + <section id="bbv2.extender.overview.generators"> + <title>Generators</title> + + <para>In theory, every kind of metatarget in Boost.Build (like <code>exe</code>, + <code>lib</code> or <code>obj</code>) could be implemented + by writing a new metatarget class that, independently of the other code, figures + what files to produce and what commands to use. However, that would be rather inflexible. + For example, adding support for a new compiler would require editing several metatargets. + </para> + + <para>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 + <indexterm><primary>generators</primary></indexterm> + <firstterm>generators</firstterm>, and has special metatarget class + <link linkend="bbv2.reference.class.typed-target">typed-target</link>. Target type is merely an + identifier. It is associated with a set of file extensions that + correspond to that type. Generator is an abstraction of a tool. It advertises + the types it produces and, if called with a set of input target, tries to construct + output targets of the advertised types. Finally, + <link linkend="bbv2.reference.class.typed-target">typed-target</link> + is associated with specific target type, and relays the generator (or generators) + for that type. + </para> + + <para>A generator is an instance of a class derived from <classname>generator</classname>. + The <classname>generator</classname> class itself is suitable for common cases. + You can define derived classes for custom scenarios.</para> + + <!-- + <para>Given a set of generators, the fundamental operation is to + construct a target of a given type, with given properties, from a + set of targets. That operation is performed by rule + <literal>generators.construct</literal> and the used algorithm is described + below.</para> + + <section> + <title>Selecting and ranking viable generators</title> + + <para>Each generator, in addition to target types that it can + produce, have attribute that affects its applicability in + particular sitiation. Those attributes are:</para> + + <orderedlist> + <listitem> + <simpara> + Required properties, which are properties absolutely + necessary for the generator to work. For example, generator + encapsulating the gcc compiler would have <toolset>gcc as + required property. + </simpara> + </listitem> + + <listitem> + <simpara> + Optional properties, which increase the generators + suitability for a particual build. + </simpara> + </listitem> + </orderedlist> + + <para> + Generator's required and optional properties may not include + either free or incidental properties. (Allowing this would + greatly complicate caching targets). + </para> + + <para>When trying to construct a target, the first step is to select + all possible generators for the requested target type, which + required properties are a subset of requested properties. + Generators that were already selected up the call stack are + excluded. In addition, if any composing generators were selected + up the call stack, all other composing generators are ignored + (TODO: define composing generators). The found generators + are assigned a rank, which is the number of optional properties + present in requested properties. Finally, generators with highest + rank are selected for futher processing.</para> + + </section> + <section> + <title>Running generators</title> + + <para>When generators are selected, each is run to produce a list of + created targets. This list might include targets that are not of + requested types, because generators create the same targets as + some tool, and tool's behaviour is fixed. (Note: should specify + that in some cases we actually want extra targets). If generator + fails, it returns an empty list. Generator is free to call + 'construct' again, to convert sources to the types it can handle. + It also can pass modified properties to 'construct'. However, a + generator is not allowed to modify any propagated properties, + otherwise when actually consuming properties we might discover + that the set of propagated properties is different from what was + used for building sources.</para> + + <para>For all targets that are not of requested types, we try to + convert them to requested type, using a second call to + <literal>construct</literal>. This is done in order to support + transformation sequences where single source file expands to + several later. See <ulink url= + "http://groups.yahoo.com/group/jamboost/message/1667">this + message</ulink> for details.</para> + + </section> + + --> + + <!-- FIXME: review the below content. Maybe, some of it is + still useful. + <section> + <title>Property adjustment</title> + + <para>Because target location is determined by the build system, it + is sometimes necessary to adjust properties, in order to not + break actions. For example, if there's an action that generates + a header, say "a_parser.h", and a source file "a.cpp" which + includes that file, we must make everything work as if a_parser.h + is generated in the same directory where it would be generated + without any subvariants.</para> + + <para>Correct property adjustment can be done only after all targets + are created, so the approach taken is:</para> + + <orderedlist> + <listitem> + <para> + When dependency graph is constructed, each action can be + assigned a rule for property adjustment. + </para> + </listitem> + + <listitem> + <para> + When virtual target is actualized, that rule is run and + return the final set of properties. At this stage it can use + information of all created virtual targets. + </para> + </listitem> + </orderedlist> + + <para>In case of quoted includes, no adjustment can give 100% correct + results. If target dirs are not changed by build system, quoted + includes are searched in "." and then in include path, while angle + includes are searched only in include path. When target dirs are + changed, we'd want to make quoted includes to be search in "." then in + additional dirs and then in the include path and make angle includes + be searched in include path, probably with additional paths added at + some position. Unless, include path already has "." as the first + element, this is not possible. So, either generated headers should not + be included with quotes, or first element of include path should be + ".", which essentially erases the difference between quoted and angle + includes. <emphasis role="bold">Note:</emphasis> the only way to get + "." as include path into compiler command line is via verbatim + compiler option. In all other case, Boost.Build will convert "." into + directory where it occurs.</para> + + </section> + + --> + + </section> + + </section> + + <section id="bbv2.extender.example"> + <title>Example: 1-to-1 generator</title> + + <para>Say you're writing an application that generates C++ code. If + you ever did this, you know that it's not nice. Embedding large + portions of C++ code in string literals is very awkward. A much + better solution is:</para> + + <orderedlist> + <listitem> + <simpara> + Write the template of the code to be generated, leaving + placeholders at the points that will change + </simpara> + </listitem> + + <listitem> + <simpara> + Access the template in your application and replace + placeholders with appropriate text. + </simpara> + </listitem> + + <listitem> + <simpara>Write the result.</simpara> + </listitem> + </orderedlist> + + <para>It's quite easy to achieve. You write special verbatim files that are + just C++, except that the very first line of the file contains the name of a + variable that should be generated. A simple tool is created that takes a + verbatim file and creates a cpp file with a single <code>char*</code> variable + whose name is taken from the first line of the verbatim file and whose value + is the file's properly quoted content.</para> + + <para>Let's see what Boost.Build can do.</para> + + <para>First off, Boost.Build has no idea about "verbatim files". So, you must + register a new target type. The following code does it:</para> + +<programlisting> +import type ; +type.register VERBATIM : verbatim ; +</programlisting> + + <para>The first parameter to <link linkend="bbv2.reference.modules.type.register">type.register</link> gives + the name of the declared type. By convention, it's uppercase. The second + parameter is the suffix for files of this type. So, if Boost.Build sees + <filename>code.verbatim</filename> in a list of sources, it knows that it's of + type <code>VERBATIM</code>.</para> + + <para>Next, you tell Boost.Build that the verbatim files can be + transformed into C++ files in one build step. A + <firstterm>generator</firstterm> is a template for a build step that + transforms targets of one type (or set of types) into another. Our + generator will be called <code>verbatim.inline-file</code>; it + transforms <code>VERBATIM</code> files into <code>CPP</code> files: + +<programlisting> +import generators ; +generators.register-standard verbatim.inline-file : VERBATIM : CPP ; +</programlisting> + </para> + + <para>Lastly, you have to inform Boost.Build about the shell + commands used to make that transformation. That's done with an + <code>actions</code> declaration. + +<programlisting> +actions inline-file +{ + "./inline-file.py" $(<) $(>) +} +</programlisting> + +<!-- You need to explain all the parameters to an "actions" and + describe the accompanying rule declaration: the user has no clue + what $(<) and $(>) are, and doesn't know about the third + parameter that gets passed to the rule. --> + +<!-- We use verbatim.inline-file in one place and just inline-file in + another. Is this confusing for user? + --> +</para> + + <para> + Now, we're ready to tie it all together. Put all the code above in file + <filename>verbatim.jam</filename>, add <code>import verbatim ;</code> to + <filename>Jamroot.jam</filename>, and it's possible to write the following + in your Jamfile: + </para> + +<programlisting> +exe codegen : codegen.cpp class_template.verbatim usage.verbatim ; +</programlisting> + + <para> + The listed verbatim files will be automatically converted into C++ source + files, compiled and then linked to the codegen executable. + </para> + + <para> + In subsequent sections, we will extend this example, and review all the + mechanisms in detail. The complete code is available in the + <filename>example/customization</filename> directory. + </para> + </section> + + <section id="bbv2.extending.targets"> + <title>Target types</title> + <para>The first thing we did in the <link + linkend="bbv2.extender.intro">introduction</link> was declaring a + new target type: +<programlisting> +import type ; +type.register VERBATIM : verbatim ; +</programlisting> + The type is the most important property of a target. Boost.Build can + automatically generate necessary build actions only because you + specify the desired type (using the different main target rules), and + because Boost.Build can guess the type of sources from their + extensions. + </para> + + <para>The first two parameters for the <code>type.register</code> rule + are the name of new type and the list of extensions associated with + it. A file with an extension from the list will have the given target + type. In the case where a target of the declared type is generated + from other sources, the first specified extension will be used. + </para> + + <para>Sometimes you want to change the suffix used for generated targets + depending on build properties, such as toolset. For example, some compiler + uses extension <literal>elf</literal> for executable files. You can use the + <code>type.set-generated-target-suffix</code> rule: +<programlisting> +type.set-generated-target-suffix EXE : <toolset>elf : elf ; +</programlisting> + </para> + + <para>A new target type can be inherited from an existing one. +<programlisting> +type.register PLUGIN : : SHARED_LIB ; +</programlisting> + The above code defines a new type derived from + <code>SHARED_LIB</code>. Initially, the new type inherits all the + 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 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. + </para> + + <para>A type can be defined as "main", in which case Boost.Build will + automatically declare a main target rule for building targets of that + type. More details can be found <link + linkend="bbv2.extending.rules.main-type">later</link>. + </para> + + <section id="bbv2.extending.scanners"> + <title>Scanners</title> + <para> + Sometimes, a file can refer to other files via some include system. To + make Boost.Build track dependencies between included files, you need + to provide a scanner. The primary limitation is that only one scanner + can be assigned to a target type. + </para> + + <para>First, we need to declare a new class for the scanner: +<programlisting> +class verbatim-scanner : common-scanner +{ + rule pattern ( ) + { + return "//###include[ ]*\"([^\"]*)\"" ; + } +} +</programlisting> + 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 + 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 + way, you can return multiple regular expressions, each of + which contains a parenthesized group to be matched. + </para> + + <para>After that, we need to register our scanner class: +<programlisting> +scanner.register verbatim-scanner : include ; +</programlisting> + The value of the second parameter, in this case + <code>include</code>, specifies the properties that contain the list + of paths that should be searched for the included files. + </para> + + <para>Finally, we assign the new scanner to the <code>VERBATIM</code> + target type: +<programlisting> +type.set-scanner VERBATIM : verbatim-scanner ; +</programlisting> + That's enough for scanning include dependencies. + </para> + + </section> + + </section> + + <section id="bbv2.extending.tools"> + <title>Tools and generators</title> + <para> + This section will describe how Boost.Build can be extended to support + new tools. + </para> + + <para>For each additional tool, a Boost.Build object called generator + must be created. That object has specific types of targets that it + 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 + file with extention <literal>.d</literal> in a list of sources will + cause Boost.Build to invoke your generator, and then to link the + resulting object file into an application. (Of course, this requires + that you specify that the <literal>.d</literal> extension corresponds + to the <literal>D</literal> type.) + </para> + + <para>Each generator should be an instance of a class derived from the + <code>generator</code> class. In the simplest case, you don't need to + create a derived class, but simply create an instance of the + <code>generator</code> class. Let's review the example we've seen in the + <link linkend="bbv2.extender.intro">introduction</link>. + <!-- Is the following supposed to be verbatim.jam? Tell the + user so. You also need to describe the meanings of $(<) + and $(>); this is the first time they're encountered. --> +<programlisting> +import generators ; +generators.register-standard verbatim.inline-file : VERBATIM : CPP ; +actions inline-file +{ + "./inline-file.py" $(<) $(>) +} +</programlisting> + </para> + + <para>We declare a standard generator, specifying its id, the source type + and the target type. When invoked, the generator will create a target + of type <literal>CPP</literal> with a source target of + type <literal>VERBATIM</literal> as the only source. But what command + 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, + in above example, the "inline-file" actions block will be used to + convert the source into the target. + </para> + + <para> + There are two primary kinds of generators: standard and composing, + which are registered with the + <code>generators.register-standard</code> and the + <code>generators.register-composing</code> rules, respectively. For + example: +<programlisting> +generators.register-standard verbatim.inline-file : VERBATIM : CPP ; +generators.register-composing mex.mex : CPP LIB : MEX ; +</programlisting> + The first (standard) generator takes a <emphasis>single</emphasis> + source of type <code>VERBATIM</code> and produces a result. The second + (composing) generator takes any number of sources, which can have either + the <code>CPP</code> or the <code>LIB</code> type. Composing generators + are typically used for generating top-level target type. For example, + the first generator invoked when building an <code>exe</code> target is + a composing generator corresponding to the proper linker. + </para> + + <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 + complexities like searched libraries. For that reason, you should always + use those functions when adding support for compilers and linkers. + </para> + + <para>(Need a note about UNIX)</para> + <!-- What kind of note? Either write the note or don't, but remove this dross. --> + <bridgehead>Custom generator classes</bridgehead> + + <para>The standard generators allows you to specify source and target + 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 + an example how you can create your own generator class: +<programlisting> +class custom-generator : generator +{ + rule __init__ ( * : * ) + { + generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ; + } +<!-- What is the point of this __init__ function?? --> +} + +generators.register + [ new custom-generator verbatim.inline-file : VERBATIM : CPP ] ; +</programlisting> + This generator will work exactly like the + <code>verbatim.inline-file</code> generator we've defined above, but + it's possible to customize the behaviour by overriding methods of the + <code>generator</code> class. + </para> + + <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 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> + + <para>The <code>generated-targets</code> method can be overridden when you + want to add additional properties to the generated targets or use + additional sources. For a real-life example, 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-targets</code> method can find + the list of sources automatically: +<programlisting> +class itrace-generator : generator { +.... + rule generated-targets ( sources + : property-set : project name ? ) + { + local leaves ; + local temp = [ virtual-target.traverse $(sources[1]) : : include-sources ] ;<!-- You must explain include-sources! --> + for local t in $(temp) + { + if ! [ $(t).action<!-- In what namespace is this evaluated? --> ] + { + leaves += $(t) ; + } + } + return [ generator.generated-targets $(sources) $(leafs) + : $(property-set) : $(project) $(name) ] ; + } +} +generators.register [ new itrace-generator nm.itrace : EXE : ITRACE ] ; +</programlisting> + The <code>generated-targets</code> method will be called with a single + source target of type <literal>EXE</literal>. The call to + <code>virtual-target.traverse</code> will return all targets the + executable depends on, and we further find files that are not + produced from anything. <!-- What does "not produced from anything" mean? --> + The found targets are added to the sources. + </para> + + <para>The <code>run</code> method can be overriden to completely + 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, the Python + program will import itself, not the extension. Here's how it can be + done: +<programlisting> +rule run ( project name ? : property-set : sources * ) +{ + local python ; + for local s in $(sources) + { + if [ $(s).type ] = PY + { + python = $(s) ; + } + } + <!-- This is horrible code. Use a filter function, or at _least_ consolidate the two loops! --> + local libs ; + for local s in $(sources) + { + if [ type.is-derived [ $(s).type ] LIB ] + { + libs += $(s) ; + } + } + + local new-sources ; + for local s in $(sources) + { + if [ type.is-derived [ $(s).type ] CPP ] + { + local name = [ $(s).name ] ; # get the target's basename + if $(name) = [ $(python).name ] + { + name = $(name)_ext ; # rename the target + } + new-sources += [ generators.construct $(project) $(name) : + PYTHON_EXTENSION : $(property-set) : $(s) $(libs) ] ; + } + } + + result = [ construct-result $(python) $(new-sources) : $(project) $(name) + : $(property-set) ] ; +} +</programlisting> + <!-- Why are we doing this with a generator??? It seems + insane. We could just use a nice front-end rule that + calls some normal target-creation rules. No? --> + + First, we separate all source into python files, libraries and C++ + sources. For each C++ source we create a separate Python extension by + calling <code>generators.construct</code> and passing the C++ source + and the libraries. At this point, we also change the extension's name, + if necessary. + </para> + + + </section> + + <section id="bbv2.extending.features"> + <title>Features</title> + <para> + Often, we need to control the options passed the invoked tools. This + is done with features. Consider an example: +<programlisting> +# Declare a new free feature +import feature : feature ; +feature verbatim-options : : free ; + +# Cause the value of the 'verbatim-options' feature to be +# available as 'OPTIONS' variable inside verbatim.inline-file +import toolset : flags ; +flags verbatim.inline-file OPTIONS <verbatim-options> ;<!-- You must tell the reader what the syntax of the flags rule is --> + +# Use the "OPTIONS" variable +actions inline-file +{ + "./inline-file.py" $(OPTIONS) $(<) $(>) +} +</programlisting> + 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, 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 + remember what I meant. But right here, I wrote "bad" and + circled it. Maybe you can figure out what I meant. ;-) + --> + </para> + + <para> + Although you can define any set of features and interpret their values + in any way, Boost.Build suggests the following coding standard for + designing features. + </para> + + <para>Most features should have a fixed set of values that is portable + (tool neutral) across the class of tools they are designed to work + with. The user does not have to adjust the values for a exact tool. For + example, <code><optimization>speed</code> has the same meaning for + all C++ compilers and the user does not have to worry about the exact + options passed to the compiler's command line. + </para> + + <para> + Besides such portable features there are special 'raw' features that + allow the user to pass any value to the command line parameters for a + particular tool, if so desired. For example, the + <code><cxxflags></code> feature allows you to pass any command line + options to a C++ compiler. The <code><include></code> feature + allows you to pass any string preceded by <code>-I</code> and the interpretation + is tool-specific. <!-- It's really tool-specific? That surprises me --> (See <xref + linkend="bbv2.faq.external"/> for an example of very smart usage of that + feature). Of course one should always strive to use portable + features, but these are still be provided as a backdoor just to make + sure Boost.Build does not take away any control from the user. + </para> + + <para> + Using portable features is a good idea because: + <itemizedlist> + <listitem> + <para>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 + use two different directories for generated files. + Boost.Build does not try to separate targets built with + different raw options. + <!-- It's a computer program. It doesn't "care" about options --> + </para> + </listitem> + + <listitem> + <para>Unlike with “raw” features, you don't need to use + specific command-line flags in your Jamfile, and it will be + more likely to work with other tools. + </para> + </listitem> + </itemizedlist> + </para> + + <bridgehead>Steps for adding a feauture</bridgehead> + <!-- This section is redundant with the previous one --> + <para>Adding a feature requires three steps: + + <orderedlist> + <listitem><para>Declaring a feature. For that, the "feature.feature" + rule is used. You have to decide on the set of <link + linkend="bbv2.reference.features.attributes">feature + attributes</link>: + + <itemizedlist> + <listitem><para>if you want a feature value set for one target + to automaticaly propagate to its dependant targets then make it + “propagated”. <!-- Examples needed. --></para></listitem> + + <listitem><para>if a feature does not have a fixed list of + values, it must be “free.” For example, the <code>include + </code> feature is a free feature.</para></listitem> + + <listitem><para>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 + internal path representation. For example, <code>include</code> + is a path feature.</para></listitem> + + <listitem><para>if feature is used to refer to some target, it + must be a “dependency” feature. <!-- for example? --></para> + + <!-- Any other feature attributes? --> + </listitem> + </itemizedlist> + </para> + </listitem> + + <listitem><para>Representing the feature value in a + target-specific variable. Build actions are command + templates modified by Boost.Jam variable expansions. The + <code>toolset.flags</code> rule sets a target-specific + variable to the value of a feature.</para></listitem> + + <listitem><para>Using the variable. The variable set in step 2 can + be used in a build action to form command parameters or + files.</para></listitem> + + </orderedlist> + </para> + + <bridgehead>Another example</bridgehead> + + <para>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 + specify a "DEF file", telling what functions should be exported. It + would be nice to use this file like this: +<programlisting> + lib a : a.cpp : <def-file>a.def ; +</programlisting> +<!-- Why would that be nice? It seems to me that having a.def in the sources is the obvious and much nicer thing to do: + + lib a : a.cpp a.def ; +--> + Actually, this feature is already supported, but anyway... + <!-- Something about saying that is very off-putting. I'm + sorry that I can't put my finger on it --> + </para> + + <orderedlist> + <listitem> + <para>Since the feature refers to a target, it must be "dependency". +<programlisting> +feature def-file : : free dependency ; +</programlisting> + </para></listitem> + + <listitem><para>One of the toolsets that cares about + <!-- The toolset doesn't "care." What do your really mean? --> + DEF files is msvc. The following line should be added to it. + <!-- Are you saying the msvc toolset is broken (or that it + doesn't use DEF files) as-shipped and the reader needs to + fix it? --> + +<programlisting> +flags msvc.link DEF_FILE <def-file> ; +</programlisting> + <!-- And that line does... what? --> + </para></listitem> + + <listitem><para>Since the DEF_FILE variable is not used by the +msvc.link action, +<!-- It's not? You just told us that MSVC "cares" about DEF files. I + presume that means that it uses them in some appropriate way? --> +we need to modify it to be: + +<programlisting> +actions link bind DEF_FILE +{ + $(.LD) .... /DEF:$(DEF_FILE) .... +} +</programlisting> + </para> + + + <para> Note the <code>bind DEF_FILE</code> part. It tells + Boost.Build to translate the internal target name in + <varname>DEF_FILE</varname> to a corresponding filename in + the <code>link</code> action. Without it the expansion of + <code>$(DEF_FILE)</code> would be a strange symbol that is + not likely to make sense for the linker. + </para> + + <!-- I have a note here that says: "none of this works for + targets in general, only source files." I'm not sure + what I meant by that; maybe you can figure it out. --> + <para> + We are almost done, except for adding the follwing code to <filename>msvc.jam</filename>: + +<programlisting> +rule link +{ + DEPENDS $(<) : [ on $(<) return $(DEF_FILE) ] ; +} +</programlisting> +<!-- You *must* explain the part in [...] above. It's completely opaque to the casual reader --> + + This is a workaround for a bug in Boost.Build engine, which will hopefully + be fixed one day. + <!-- This is *NOT* a bug!! Anyway, BBv2 shouild handle this automatically. Why doesn't it? --> +</para></listitem> + + </orderedlist> + + <bridgehead>Variants and composite features.</bridgehead> + + <para>Sometimes you want to create a shortcut for some set of + features. For example, <code>release</code> is a value of + <code><variant></code> and is a shortcut for a set of features. + </para> + + <para>It is possible to define your own build variants. For example: +<programlisting> +variant crazy : <optimization>speed <inlining>off + <debug-symbols>on <profiling>on ; +</programlisting> + will define a new variant with the specified set of properties. You + can also extend an existing variant: +<programlisting> +variant super_release : release : <define>USE_ASM ; +</programlisting> + In this case, <code>super_release</code> will expand to all properties + specified by <code>release</code>, and the additional one you've specified. + </para> + + <para>You are not restricted to using the <code>variant</code> feature + only. + <!-- What do you mean by that? How is defining a new feature related to what came before? --> + Here's example that defines a brand new feature: +<programlisting> +feature parallelism : mpi fake none : composite link-incompatible ; +feature.compose <parallelism>mpi : <library>/mpi//mpi/<parallelism>none ; +feature.compose <parallelism>fake : <library>/mpi//fake/<parallelism>none ; +</programlisting> +<!-- The use of the <library>/mpi//mpi/<parallelism>none construct + above is at best confusing and unexplained --> + This will allow you to specify the value of feature + <code>parallelism</code>, which will expand to link to the necessary + library. + </para> + + </section> + + <section id="bbv2.extending.rules"> + <title>Main target rules</title> + <para> + A main target rule (e.g “<link linkend="bbv2.tasks.programs">exe</link>” + Or “<link linkend="bbv2.tasks.libraries">lib</link>”) creates a top-level target. It's quite likely that you'll want to declare your own and + there are two ways to do that. + <!-- Why did "that" get changed to "this" above? --> + </para> + + <para id="bbv2.extending.rules.main-type">The first way applies when +<!-- This is not a "way of defining a main target rule." Rephrase this and the previous sentence. --> + your target rule should just produce a target of specific type. In that case, a + rule is already defined for you! When you define a new type, Boost.Build + automatically defines a corresponding rule. The name of the rule is + obtained from the name of the type, by downcasing all letters and + replacing underscores with dashes. + <!-- This strikes me as needless complexity, and confusing. Why + do we have the uppercase-underscore convention for target + types? If we just dropped that, the rule names could be + the same as the type names. --> + For example, if you create a module + <filename>obfuscate.jam</filename> containing: + +<programlisting> +import type ; +type.register OBFUSCATED_CPP : ocpp ; + +import generators ; +generators.register-standard obfuscate.file : CPP : OBFUSCATED_CPP ; +</programlisting> + and import that module, you'll be able to use the rule "obfuscated-cpp" + in Jamfiles, which will convert source to the OBFUSCATED_CPP type. + </para> + + <para> + The second way is to write a wrapper rule that calls any of the existing + rules. For example, suppose you have only one library per directory and + want all cpp files in the directory to be compiled into that library. You + can achieve this effect using: +<programlisting> +lib codegen : [ glob *.cpp ] ; +</programlisting> + If you want to make it even simpler, you could add the following + definition to the <filename>Jamroot.jam</filename> file: +<programlisting> +rule glib ( name : extra-sources * : requirements * ) +{ + lib $(name) : [ glob *.cpp ] $(extra-sources) : $(requirements) ; +} +</programlisting> + allowing you to reduce the Jamfile to just +<programlisting> +glib codegen ; +</programlisting> + </para> + + <para> + Note that because you can associate a custom generator with a target type, + the logic of building can be rather complicated. For example, the + <code>boostbook</code> module declares a target type + <code>BOOSTBOOK_MAIN</code> and a custom generator for that type. You can + use that as example if your main target rule is non-trivial. + </para> + </section> + + <section id="bbv2.extending.toolset_modules"> + + <title>Toolset modules</title> + + <para> + If your extensions will be used only on one project, they can be placed in + a separate <filename>.jam</filename> file and imported by your + <filename>Jamroot.jam</filename>. If the extensions will be used on many + projects, users will thank you for a finishing touch. + </para> + + <para>The <code>using</code> rule provides a standard mechanism + for loading and configuring extensions. To make it work, your module + <!-- "module" hasn't been defined yet. Furthermore you haven't + said anything about where that module file must be + placed. --> + should provide an <code>init</code> rule. The rule will be called + with the same parameters that were passed to the + <code>using</code> rule. The set of allowed parameters is + determined by you. For example, you can allow the user to specify + paths, tool versions, and other options. + <!-- But it's not entirely arbitrary. We have a standard + parameter order which you should describe here for + context. --> + </para> + + <para>Here are some guidelines that help to make Boost.Build more + consistent: + <itemizedlist> + <listitem><para>The <code>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 + wrong values on one machine can be OK on another. + <!-- So why shouldn't init fail on machines where it's wrong?? --> + </para></listitem> + + <listitem><para>Prefer specifying the command to be executed + to specifying the tool's installation path. First of all, this + gives more control: it's possible to specify +<programlisting> +/usr/bin/g++-snapshot +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 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 + "command to invoke" has any significance may be + completely bogus. Plus if you want to allow "time + /usr/bin/g++" the toolset may need to somehow parse + the command and find the path when it needs to invoke + some related executable. And in that case, will the + command be ignored? This scheme doesn't scale and + should be fixed. --> + </para></listitem> + + <listitem><para>Check for multiple initialization. A user can try to + initialize the module several times. You need to check for this + and decide what to do. Typically, unless you support several + versions of a tool, duplicate initialization is a user error. + <!-- Why should that be typical? --> + If the + tool's version can be specified during initialization, make sure the + version is either always specified, or never specified (in which + case the tool is initialied only once). For example, if you allow: +<programlisting> +using yfc ; +using yfc : 3.3 ; +using yfc : 3.4 ; +</programlisting> + Then it's not clear if the first initialization corresponds to + version 3.3 of the tool, version 3.4 of the tool, or some other + version. This can lead to building twice with the same version. + <!-- That would not be so terrible, and is much less harmful + than this restriction, IMO. It makes site-config + harder to maintain than necessary. --> + </para></listitem> + + <listitem><para>If possible, <code>init</code> must be callable + with no parameters. In which case, it should try to autodetect all + the necessary information, for example, by looking for a tool in + <envar>PATH</envar> or in common installation locations. Often this + is possible and allows the user to simply write: +<programlisting> +using yfc ; +</programlisting> + </para></listitem> + + <listitem><para>Consider using facilities in the + <code>tools/common</code> module. You can take a look at how + <code>tools/gcc.jam</code> uses that module in the <code>init</code> rule. + </para></listitem> + + </itemizedlist> + </para> + + + + + </section> + + </chapter> + +<!-- + Local Variables: + sgml-indent-data: t + sgml-parent-document: ("userman.xml" "chapter") + sgml-set-face: t + End: +--> diff --git a/boost/tools/build/doc/src/faq.xml b/boost/tools/build/doc/src/faq.xml new file mode 100644 index 00000000..3b6894b7 --- /dev/null +++ b/boost/tools/build/doc/src/faq.xml @@ -0,0 +1,489 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<chapter id="bbv2.faq"> + <title>Frequently Asked Questions</title> + + <section id="bbv2.faq.featurevalue"> + <title> + How do I get the current value of feature in Jamfile? + </title> + + <para> + This is not possible, since Jamfile does not have "current" value of any + feature, be it toolset, build variant or anything else. For a single + run of Boost.Build, any given main target can be + built with several property sets. For example, user can request two build + variants on the command line. Or one library is built as shared when used + from one application, and as static when used from another. Each Jamfile + is read only once so generally there is no single value of a feature you + can access in Jamfile. + </para> + + <para> + A feature has a specific value only when building a target, and there are + two ways you can use that value: + </para> + + <itemizedlist> + <listitem> + <simpara> + Use conditional requirements or indirect conditional requirements. See + <xref linkend="bbv2.overview.targets.requirements.conditional"/>. + </simpara> + </listitem> + <listitem> + Define a custom generator and a custom main target type. The custom + generator can do arbitrary processing or properties. See the <xref + linkend="bbv2.extender">extender manual</xref>. + </listitem> + </itemizedlist> + </section> + + <section id="bbv2.faq.duplicate"> + <title> + I am getting a "Duplicate name of actual target" error. What does that + mean? + </title> + + <para> + The most likely case is that you are trying to compile the same file + twice, with almost the same, but differing properties. For example: +<programlisting> +exe a : a.cpp : <include>/usr/local/include ; +exe b : a.cpp ; +</programlisting> + </para> + + <para> + The above snippet requires two different compilations of + <code>a.cpp</code>, which differ only in their <literal>include</literal> + property. Since the <literal>include</literal> feature is declared as + <literal>free</literal> Boost.Build does not create a separate build + directory for each of its values and those two builds would both produce + object files generated in the same build directory. Ignoring this and + compiling the file only once would be dangerous as different includes + could potentially cause completely different code to be compiled. + </para> + + <para> + To solve this issue, you need to decide if the file should be compiled + once or twice. + </para> + + <orderedlist> + <listitem> + <para> + To compile the file only once, make sure that properties are the same + for both target requests: +<programlisting> +exe a : a.cpp : <include>/usr/local/include ; +exe b : a.cpp : <include>/usr/local/include ; +</programlisting> + or: +<programlisting> +alias a-with-include : a.cpp : <include>/usr/local/include ; +exe a : a-with-include ; +exe b : a-with-include ; +</programlisting> + or if you want the <literal>includes</literal> property not to affect + how any other sources added for the built <code>a</code> and + <code>b</code> executables would be compiled: +<programlisting> +obj a-obj : a.cpp : <include>/usr/local/include ; +exe a : a-obj ; +exe b : a-obj ; +</programlisting> + </para> + <para> + Note that in both of these cases the <literal>include</literal> + property will be applied only for building these object files and not + any other sources that might be added for targets <code>a</code> and + <code>b</code>. + </para> + </listitem> + + <listitem> + <para> + To compile the file twice, you can tell Boost.Build to compile it to + two separate object files like so: +<programlisting> + obj a_obj : a.cpp : <include>/usr/local/include ; + obj b_obj : a.cpp ; + exe a : a_obj ; + exe b : b_obj ; +</programlisting> + or you can make the object file targets local to the main target: +<programlisting> + exe a : [ obj a_obj : a.cpp : <include>/usr/local/include ] ; + exe b : [ obj a_obj : a.cpp ] ; +</programlisting> + which will cause Boost.Build to actually change the generated object + file names a bit for you and thus avoid any conflicts. + </para> + <para> + Note that in both of these cases the <literal>include</literal> + property will be applied only for building these object files and not + any other sources that might be added for targets <code>a</code> and + <code>b</code>. + </para> + </listitem> + </orderedlist> + + <para> + A good question is why Boost.Build can not use some of the above + approaches automatically. The problem is that such magic would only help + in half of the cases, while in the other half it would be silently doing + the wrong thing. It is simpler and safer to ask the user to clarify his + intention in such cases. + </para> + </section> + + <section id="bbv2.faq.envar"> + <title> + Accessing environment variables + </title> + + <para> + Many users would like to use environment variables in Jamfiles, for + example, to control the location of external libraries. In many cases it + is better to declare those external libraries in the site-config.jam file, + as documented in the <link linkend="bbv2.recipies.site-config">recipes + section</link>. However, if the users already have the environment + variables set up, it may not be convenient for them to set up their + site-config.jam files as well and using the environment variables might be + reasonable. + </para> + + <para> + Boost.Jam automatically imports all environment variables into its + built-in .ENVIRON module so user can read them from there directly or by + using the helper os.environ rule. For example: +<programlisting> +import os ; +local unga-unga = [ os.environ UNGA_UNGA ] ; +ECHO $(unga-unga) ; +</programlisting> + or a bit more realistic: +<programlisting> +import os ; +local SOME_LIBRARY_PATH = [ os.environ SOME_LIBRARY_PATH ] ; +exe a : a.cpp : <include>$(SOME_LIBRARY_PATH) ; +</programlisting> + </para> + </section> + + <section id="bbv2.faq.proporder"> + <title> + How to control properties order? + </title> + + <para> + For internal reasons, Boost.Build sorts all the properties alphabetically. + This means that if you write: +<programlisting> +exe a : a.cpp : <include>b <include>a ; +</programlisting> + then the command line with first mention the <code>a</code> include + directory, and then <code>b</code>, even though they are specified in the + opposite order. In most cases, the user does not care. But sometimes the + order of includes, or other properties, is important. For such cases, a + special syntax is provided: +<programlisting> +exe a : a.cpp : <include>a&&b ; +</programlisting> + </para> + + <para> + The <code>&&</code> symbols separate property values and specify + that their order should be preserved. You are advised to use this feature + only when the order of properties really matters and not as a convenient + shortcut. Using it everywhere might negatively affect performance. + </para> + </section> + + <section id="bbv2.faq.liborder"> + <title> + How to control the library linking order on Unix? + </title> + + <para> + On Unix-like operating systems, the order in which static libraries are + specified when invoking the linker is important, because by default, the + linker uses one pass though the libraries list. Passing the libraries in + the incorrect order will lead to a link error. Further, this behaviour is + often used to make one library override symbols from another. So, + sometimes it is necessary to force specific library linking order. + </para> + + <para> + Boost.Build tries to automatically compute the right order. The primary + rule is that if library <code>a</code> "uses" library <code>b</code>, then + library <code>a</code> will appear on the command line before library + <code>b</code>. Library <code>a</code> is considered to use <code>b</code> + if <code>b</code> is present either in the <code>a</code> library's + sources or its usage is listed in its requirements. To explicitly specify + the <literal>use</literal> relationship one can use the + <literal><use></literal> feature. For example, both of the following + lines will cause <code>a</code> to appear before <code>b</code> on the + command line: +<programlisting> +lib a : a.cpp b ; +lib a : a.cpp : <use>b ; +</programlisting> + </para> + + <para> + The same approach works for searched libraries as well: +<programlisting> +lib z ; +lib png : : <use>z ; +exe viewer : viewer png z ; +</programlisting> + </para> + </section> + + <section id="bbv2.faq.external"> + <title> + Can I get capture external program output using a Boost.Jam variable? + </title> + + <para> + The <literal>SHELL</literal> builtin rule may be used for this purpose: +<programlisting> +local gtk_includes = [ SHELL "gtk-config --cflags" ] ; +</programlisting> + </para> + </section> + + <section id="bbv2.faq.projectroot"> + <title> + How to get the project root (a.k.a. Jamroot) location? + </title> + + <para> + You might want to use your project's root location in your Jamfiles. To + access it just declare a path constant in your Jamroot.jam file using: +<programlisting> +path-constant TOP : . ; +</programlisting> + After that, the <code>TOP</code> variable can be used in every Jamfile. + </para> + </section> + + <section id="bbv2.faq.flags"> + <title> + How to change compilation flags for one file? + </title> + + <para> + If one file must be compiled with special options, you need to explicitly + declare an <code>obj</code> target for that file and then use that target + in your <code>exe</code> or <code>lib</code> target: +<programlisting> +exe a : a.cpp b ; +obj b : b.cpp : <optimization>off ; +</programlisting> + Of course you can use other properties, for example to specify specific + C/C++ compiler options: +<programlisting> +exe a : a.cpp b ; +obj b : b.cpp : <cflags>-g ; +</programlisting> + You can also use <link linkend="bbv2.tutorial.conditions">conditional + properties</link> for finer control: +<programlisting> +exe a : a.cpp b ; +obj b : b.cpp : <variant>release:<optimization>off ; +</programlisting> + </para> + </section> + + <section id="bbv2.faq.dll-path"> + <title> + Why are the <literal>dll-path</literal> and <literal>hardcode-dll-paths + </literal> properties useful? + </title> + <note> + <para> + This entry is specific to Unix systems. + </para> + </note> + <para> + Before answering the questions, let us recall a few points about shared + libraries. Shared libraries can be used by several applications, or other + libraries, without physically including the library in the application + which can greatly decrease the total application size. It is also possible + to upgrade a shared library when the application is already installed. + </para> + + <para> + However, in order for application depending on shared libraries to be + started the OS may need to find the shared library when the application is + started. The dynamic linker will search in a system-defined list of paths, + load the library and resolve the symbols. Which means that you should + either change the system-defined list, given by the <envar>LD_LIBRARY_PATH + </envar> environment variable, or install the libraries to a system + location. This can be inconvenient when developing, since the libraries + are not yet ready to be installed, and cluttering system paths may be + undesirable. Luckily, on Unix there is another way. + </para> + + <para> + An executable can include a list of additional library paths, which will + be searched before system paths. This is excellent for development because + the build system knows the paths to all libraries and can include them in + the executables. That is done when the <literal>hardcode-dll-paths + </literal> feature has the <literal>true</literal> value, which is the + default. When the executables should be installed, the story is different. + </para> + + <para> + Obviously, installed executable should not contain hardcoded paths to your + development tree. <!-- Make the following parenthised sentence a footer + note --> (The <literal>install</literal> rule explicitly disables the + <literal>hardcode-dll-paths</literal> feature for that reason.) However, + you can use the <literal>dll-path</literal> feature to add explicit paths + manually. For example: +<programlisting> +install installed : application : <dll-path>/usr/lib/snake + <location>/usr/bin ; +</programlisting> + will allow the application to find libraries placed in the <filename> + /usr/lib/snake</filename> directory. + </para> + + <para> + If you install libraries to a nonstandard location and add an explicit + path, you get more control over libraries which will be used. A library of + the same name in a system location will not be inadvertently used. If you + install libraries to a system location and do not add any paths, the + system administrator will have more control. Each library can be + individually upgraded, and all applications will use the new library. + </para> + + <para> + Which approach is best depends on your situation. If the libraries are + relatively standalone and can be used by third party applications, they + should be installed in the system location. If you have lots of libraries + which can be used only by your application, it makes sense to install them + to a nonstandard directory and add an explicit path, like the example + above shows. Please also note that guidelines for different systems differ + in this respect. For example, the Debian GNU guidelines prohibit any + additional search paths while Solaris guidelines suggest that they should + always be used. + </para> + </section> + + <section id="bbv2.recipies.site-config"> + <title>Targets in site-config.jam</title> + + <para> + It is desirable to declare standard libraries available on a given system. + Putting target declaration in a specific project's Jamfile is not really + good, since locations of the libraries can vary between different + development machines and then such declarations would need to be + duplicated in different projects. The solution is to declare the targets + in Boost.Build's <filename>site-config.jam</filename> configuration file: +<programlisting> +project site-config ; +lib zlib : : <name>z ; +</programlisting> + </para> + + <para> + Recall that both <filename>site-config.jam</filename> and + <filename>user-config.jam</filename> are projects, and everything you can + do in a Jamfile you can do in those files as well. So, you declare a + project id and a target. Now, one can write: +<programlisting> +exe hello : hello.cpp /site-config//zlib ; +</programlisting> + in any Jamfile. + </para> + </section> + + <section id="bbv2.faq.header-only-libraries"> + <title>Header-only libraries</title> + + <para> + In modern C++, libraries often consist of just header files, without any + source files to compile. To use such libraries, you need to add proper + includes and possibly defines to your project. But with a large number of + external libraries it becomes problematic to remember which libraries are + header only, and which ones you have to link to. However, with Boost.Build + a header-only library can be declared as Boost.Build target and all + dependents can use such library without having to remember whether it is a + header-only library or not. + </para> + + <para> + Header-only libraries may be declared using the <code>alias</code> rule, + specifying their include path as a part of its usage requirements, for + example: +<programlisting> +alias my-lib + : # no sources + : # no build requirements + : # no default build + : <include>whatever ; +</programlisting> + The includes specified in usage requirements of <code>my-lib</code> are + automatically added to all of its dependants' build properties. The + dependants need not care if <code>my-lib</code> is a header-only or not, + and it is possible to later make <code>my-lib</code> into a regular + compiled library without having to that its dependants' declarations. + </para> + + <para> + If you already have proper usage requirements declared for a project where + a header-only library is defined, you do not need to duplicate them for + the <code>alias</code> target: +<programlisting> +project my : usage-requirements <include>whatever ; +alias mylib ; +</programlisting> + </para> + </section> + + <section id="bbv2.faq.names"> + <title> + What is the difference between Boost.Build, + <filename>b2</filename>, <filename>bjam</filename> and Perforce Jam? + </title> + + <para> + Boost.Build is the name of the complete build system. The executable that runs + it is <filename>b2</filename>. 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". + </para> + + <para> + The Boost.Build engine is derived from an earlier build tool called Perforce Jam. Originally, + there were just minor changes, and the filename was <filename>bjam</filename>. 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 <filename>b2</filename>. + A copy named <filename>bjam</filename> is still created for compatibility, + but you are encouraged to use the new name in all cases. + </para> + + <para> + 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. + </para> + + </section> + +</chapter> + +<!-- + Local Variables: + mode: nxml + sgml-indent-data: t + sgml-parent-document: ("userman.xml" "chapter") + sgml-set-face: t + End: +--> diff --git a/boost/tools/build/doc/src/fragments.xml b/boost/tools/build/doc/src/fragments.xml new file mode 100644 index 00000000..78438a0c --- /dev/null +++ b/boost/tools/build/doc/src/fragments.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<chapter> + <section id="root_option"> + <varlistentry> + <term><literal>root</literal></term> + + <!-- At present, this option is only used to set LD_LIBRARY_PATH when + running tests, and matters only if compiler's lib directory is not in + LD_LIBRARY_PATH. --> + + <listitem><para>Specifies root directory of the compiler installation. + This option is necessary only if it is not possible to detect this + information from the compiler command—for example if the specified + compiler command is a user script.</para></listitem> + </varlistentry> + </section> + + <section id="common_options"> + + <!-- This most likely needs splitting into common_options, + common_cxx_options & common_fortran_options or something similar. We also + need to document the fortran specific fflags option. Possibly related Boost + Build code should be updated as well so that fortran options may not be + specified for non-fortran toolsets and C/C++ options may not be specified + for non-C/C++ ones. --> + + <varlistentry> + <term><literal>cflags</literal></term> + + <listitem><para>Specifies additional compiler flags that will be used when + compiling C sources.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>cxxflags</literal></term> + + <listitem><para>Specifies additional compiler flags that will be used when + compiling C++ sources.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>compileflags</literal></term> + + <listitem><para>Specifies additional compiler flags that will be used when + compiling both C and C++ sources.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>linkflags</literal></term> + + <listitem><para>Specifies additional command line options that will be + passed to the linker.</para> + </listitem> + </varlistentry> + </section> +</chapter> diff --git a/boost/tools/build/doc/src/howto.xml b/boost/tools/build/doc/src/howto.xml new file mode 100644 index 00000000..8ba571ab --- /dev/null +++ b/boost/tools/build/doc/src/howto.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + + <dedication id="bbv2.howto"> + + <title>How to use this document</title> + + <para> + Want to learn about Boost.Build features? Start with <xref linkend= + "bbv2.tutorial"/> and continue with <xref + linkend="bbv2.overview"/>. When you're ready to try Boost.Build + in practice, go to <xref linkend="bbv2.installation"/>. + </para> + + <para> + Building a project with Boost.Build? See <xref + linkend="bbv2.installation"/> and + then read <xref linkend="bbv2.overview.invocation"/>. + </para> + + <para> + Setting up Boost.Build on your project? Take a look at <xref + linkend="bbv2.overview"/> and <xref linkend="bbv2.extender"/>. + </para> + + <para> + If there's anything you find unclear in this documentation, report the + problem directly in the <ulink + url="https://github.com/boostorg/build/issues">issue tracker</ulink>. + For more general questions, please post them to our mailing list (<ulink + url="http://boost.org/more/mailing_lists.htm#jamboost"/>). The mailing list is + also mirrored to the newsgroup <ulink url="news://news.gmane.org/gmane.comp.lib.boost.build"/>. + </para> + + <para role="copyright"> + Copyright 2006, 2014 <ulink url="http://vladimirprus.com">Vladimir + Prus</ulink>. Distributed under the Boost Software License, Version 1.0. + (See accompanying file <filename>LICENSE_1_0.txt</filename> or copy at + <ulink + url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</ulink>) + </para> + + </dedication> diff --git a/boost/tools/build/doc/src/install.xml b/boost/tools/build/doc/src/install.xml new file mode 100644 index 00000000..8a272c73 --- /dev/null +++ b/boost/tools/build/doc/src/install.xml @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + + <chapter id="bbv2.installation"> + <title>Installation</title> + + <para> + To install Boost.Build from an official release or a nightly build, as + available on the <ulink url="http://boost.org/boost-build2">official web site</ulink>, + follow these steps: + </para> + + <orderedlist> + <listitem> + <simpara> + Unpack the release. On the command line, go to the root of the + unpacked tree. + </simpara> + </listitem> + + <listitem> + <simpara> + Run either <command>.\bootstrap.bat</command> (on Windows), or + <command>./bootstrap.sh</command> (on other operating systems). + </simpara> + </listitem> + + <listitem> + <simpara> + Run + <screen>./b2 install --prefix=<replaceable>PREFIX</replaceable></screen> + where <replaceable>PREFIX</replaceable> is a directory where you + want Boost.Build to be installed. + </simpara> + </listitem> + + <listitem> + <simpara> + Optionally, add <filename><replaceable>PREFIX</replaceable>/bin</filename> + to your <envar>PATH</envar> environment variable. + </simpara> + </listitem> + </orderedlist> + + <para>If you are not using a Boost.Build package, but rather the version + bundled with the Boost C++ Libraries, the above commands should be run + in the <filename>tools/build</filename> directory.</para> + + <para> + Now that Boost.Build is installed, you can try some of the examples. Copy + <filename><replaceable>PREFIX</replaceable>/share/boost-build/examples/hello</filename> + to a different directory, then change to that directory and run: +<screen><filename><replaceable>PREFIX</replaceable>/bin/b2</filename></screen> + A simple executable should be built. + </para> + + <!-- + <simpara> + Configure Boost.Build to recognize the build resources (such + as compilers and libraries) you have installed on your + system. Open the + <filename>user-config.jam</filename> file in the Boost.Build + root directory and follow the instructions there to describe + your toolsets and libraries, and, if necessary, where they + are located. + </simpara> + </listitem> + --> + + <!-- This part should not go into intoduction docs, but we need to + place it somewhere. + + <para>It is slighly better way is to copy + <filename>new/user-config.jam</filename> into one of the locations + where it can be found (given in <link linkend= + "bbv2.reference.init.config">this table</link>). This prevent you + from accidentally overwriting your config when updating.</para> + + --> + + <!-- + <bridgehead>Information for distributors</bridgehead> + + <para> + If you're planning to package Boost.Build for a Linux distribution, + please follow these guidelines: + + <itemizedlist> + <listitem><para>Create a separate package for Boost.Jam.</para></listitem> + + <listitem> + <para>Create another package for Boost.Build, and make + this package install all Boost.Build files to + <filename>/usr/share/boost-build</filename> directory. After + install, that directory should contain everything you see in + Boost.Build release package, except for + <filename>jam_src</filename> directory. If you're using Boost CVS + to obtain Boost.Build, as opposed to release package, take + everything from the <filename>tools/build</filename> directory. + For a check, make sure that + <filename>/usr/share/boost-build/boost-build.jam</filename> is installed. + </para> + + <para>Placing Boost.Build into <filename>/usr/share/boost-build</filename> + will make sure that <command>b2</command> will find Boost.Build + without any additional setup.</para> + </listitem> + + <listitem><para>Provide a + <filename>/etc/site-config.jam</filename> configuration file that will + contain: +<programlisting> +using gcc ; +</programlisting> + You might want to add dependency from Boost.Build package to gcc, + to make sure that users can always build Boost.Build examples. + </para></listitem> + </itemizedlist> + </para> + + <para>If those guidelines are met, users will be able to invoke + <command>b2/command> without any explicit configuration. + </para> + + + --> + + + </chapter> + +<!-- + Local Variables: + mode: nxml + sgml-indent-data:t + sgml-parent-document:("userman.xml" "chapter") + sgml-set-face: t + sgml-omittag:nil + sgml-shorttag:nil + sgml-namecase-general:t + sgml-general-insert-case:lower + sgml-minimize-attributes:nil + sgml-always-quote-attributes:t + sgml-indent-step:2 + sgml-exposed-tags:nil + sgml-local-catalogs:nil + sgml-local-ecat-files:nil + End: +--> + diff --git a/boost/tools/build/doc/src/main-target.xml b/boost/tools/build/doc/src/main-target.xml new file mode 100644 index 00000000..84afac14 --- /dev/null +++ b/boost/tools/build/doc/src/main-target.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<section id="bbv2.reference.class.main-target"> + + <title>Class main-target</title> + <indexterm> + <primary>main-target</primary> + </indexterm> + +<programlisting language="jam"> +class main-target : <link linkend="bbv2.reference.class.abstract-target">abstract-target</link> { + rule <link linkend="bbv2.reference.class.main-target.generate">generate</link> ( property-set ) + + # Methods inherited from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link> + rule <link linkend="bbv2.reference.class.abstract-target.name">name</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.project">project</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.location">location</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.full-name">full-name</link> ( ) +} +</programlisting> + + <para> + A <link linkend="bbv2.reference.class.main-target">main-target</link> + represents a named top-level target in a Jamfile. + </para> + + <orderedlist> + + <listitem id="bbv2.reference.class.main-target.generate"> + <indexterm zone="bbv2.reference.class.main-target.generate"> + <primary>generate</primary> + <secondary>Main Target Method</secondary> + </indexterm> + <code language="jam">rule generate ( property-set )</code> + <para> + Overrides + <link linkend="bbv2.reference.class.abstract-target.generate">abstract-target.generate</link>. + + Select an alternative for this main target, by finding all alternatives + whose requirements are satisfied by <literal>property-set</literal> and + picking the one with the longest requirements set. Returns the result + of calling <link linkend="bbv2.reference.class.basic-target.generate">generate</link> + on that alternative. + </para> + + <para> + On success, returns: + <itemizedlist> + <listitem>a property-set with the usage requirements to be applied to dependents</listitem> + <listitem>a list of produced virtual targets, which may be empty.</listitem> + </itemizedlist> + </para> + </listitem> + + </orderedlist> + +</section> diff --git a/boost/tools/build/doc/src/overview.xml b/boost/tools/build/doc/src/overview.xml new file mode 100644 index 00000000..37bae1c9 --- /dev/null +++ b/boost/tools/build/doc/src/overview.xml @@ -0,0 +1,1700 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + + <chapter id="bbv2.overview"> + <title>Overview</title> + + <para> + This section will provide the information necessary to create your own + projects using Boost.Build. The information provided here is relatively + high-level, and <xref linkend="bbv2.reference"/> as well as the on-line + help system must be used to obtain low-level documentation (see <xref + linkend="bbv2.reference.init.options.help"/>). + </para> + + <para> + Boost.Build has two parts—a build engine + with its own interpreted language, and Boost.Build itself, implemented in + that language. The chain of events when you type + <command>b2</command> on the command line is as follows: + <orderedlist> + <listitem> + <para> + 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> + </listitem> + <listitem> + <para> + The top-level module loads user-defined configuration files, + <filename>user-config.jam</filename> and + <filename>site-config.jam</filename>, which define available toolsets. + </para> + </listitem> + <listitem> + <para> + The Jamfile in the current directory is read. That in turn might + cause reading of further Jamfiles. As a result, a tree of projects + is created, with targets inside projects. + </para> + </listitem> + <listitem> + <para> + Finally, using the build request specified on the command line, + Boost.Build decides which targets should be built and how. That + information is passed back to Boost.Jam, which takes care of + actually running the scheduled build action commands. + </para> + </listitem> + </orderedlist> + </para> + + <para> + So, to be able to successfully use Boost.Build, you need to know only four + things: + <itemizedlist> + <listitem> + <para> + <link linkend="bbv2.overview.configuration">How to configure + Boost.Build</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="bbv2.overview.targets">How to declare targets in + Jamfiles</link> + </para> + </listitem> + <listitem> + <para> + <link linkend="bbv2.overview.build_process">How the build process + works</link> + </para> + </listitem> + <listitem> + <para> + Some Basics about the Boost.Jam language. See <xref linkend= + "bbv2.overview.jam_language"/>. + </para> + </listitem> + </itemizedlist> + </para> + + <section id="bbv2.overview.concepts"> + <title>Concepts</title> + + <para>Boost.Build has a few unique concepts that are introduced in this section. The best + way to explain the concepts is by comparison with more classical build tools.</para> + + <para> + When using any flavour of make, you directly specify <firstterm>targets</firstterm> + and commands that are used to create them from other target. The below example + creates <filename>a.o</filename> from <filename>a.c</filename> using a hardcoded + compiler invocation command. +<programlisting> +a.o: a.c + 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. + </para> + + <para> + 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") +</programlisting> + This is a function call that creates the targets necessary to create an executable file + from the source file <filename>a.c</filename>. Depending on configured properties, + 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. + </para> + + <para> + In order to support true multivariant builds, Boost.Build introduces the concept of a + <indexterm> <primary>metatarget</primary> <secondary>definition</secondary></indexterm> + <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. + </para> + + <para> + Consider an example: +<programlisting> +exe a : a.cpp ; +</programlisting> + When this declaration is parsed, Boost.Build creates a metatarget, but does not + yet decide what files must be created, or what commands must be used. After + all build files are parsed, Boost.Build considers the properties requested on the + command line. Supposed you have invoked Boost.Build with: +<screen> +b2 toolset=gcc toolset=msvc +</screen> + In that case, the metatarget will be called twice, once with <code>toolset=gcc</code> + and once with <code>toolset=msvc</code>. Both invocations will produce concrete + targets, that will have different extensions and use different command lines. + </para> + + <para> + Another key concept is + <indexterm><primary>property</primary><secondary>definition</secondary></indexterm> + <firstterm>build property</firstterm>. 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, + Boost.Build differs by requiring that all build properties are declared in advance, + and providing a large set of properties with portable semantics. + </para> + + <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 + "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"/>). + Then, the dependency metatargets are called with the modified properties and produce + 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. + </para> + + <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"> + <title>Boost.Jam Language</title> + + <para> + This section will describe the basics of the Boost.Jam language—just + enough for writing Jamfiles. For more information, please see the + <link linkend="bbv2.jam">Boost.Jam</link> documentation. + </para> + + <para> + <link linkend="bbv2.jam">Boost.Jam</link> has an interpreted, procedural + language. On the lowest level, a <link linkend="bbv2.jam">Boost.Jam + </link> program consists of variables and <indexterm><primary>rule + </primary></indexterm> <firstterm>rules</firstterm> (the Jam term for + functions). They are grouped into modules—there is one global + module and a number of named modules. Besides that, a <link linkend= + "bbv2.jam">Boost.Jam</link> program contains classes and class + instances. + </para> + + <para> + Syntantically, a <link linkend="bbv2.jam">Boost.Jam</link> program + consists of two kind of elements—keywords (which have a special + meaning to <link linkend="bbv2.jam">Boost.Jam</link>) and literals. + Consider this code: +<programlisting> +a = b ; +</programlisting> + which assigns the value <literal>b</literal> to the variable <literal>a + </literal>. Here, <literal>=</literal> and <literal>;</literal> are + keywords, while <literal>a</literal> and <literal>b</literal> are + literals. + <warning> + <para> + All syntax elements, even keywords, must be separated by spaces. For + example, omitting the space character before <literal>;</literal> + will lead to a syntax error. + </para> + </warning> + If you want to use a literal value that is the same as some keyword, the + value can be quoted: +<programlisting> +a = "=" ; +</programlisting> + </para> + + <para> + All variables in <link linkend="bbv2.jam">Boost.Jam</link> have the same + type—list of strings. To define a variable one assigns a value to + it, like in the previous example. An undefined variable is the same as a + variable with an empty value. Variables can be accessed using the + <code>$(<replaceable>variable</replaceable>)</code> syntax. For example: +<programlisting> +a = $(b) $(c) ; +</programlisting> + </para> + + <para> + Rules are defined by specifying the rule name, the parameter names, and + the allowed value list size for each parameter. +<programlisting> +rule <replaceable>example</replaceable> + ( + <replaceable>parameter1</replaceable> : + <replaceable>parameter2 ?</replaceable> : + <replaceable>parameter3 +</replaceable> : + <replaceable>parameter4 *</replaceable> + ) + { + # rule body + } + </programlisting> + When this rule is called, the list passed as the first argument must + have exactly one value. The list passed as the second argument can + either have one value of be empty. The two remaining arguments can be + arbitrarily long, but the third argument may not be empty. + </para> + + <para> + The overview of <link linkend="bbv2.jam">Boost.Jam</link> language + statements is given below: +<programlisting> +helper 1 : 2 : 3 ; +x = [ helper 1 : 2 : 3 ] ; +</programlisting> + This code calls the named rule with the specified arguments. When the + 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 { 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 <replaceable>operator</replaceable> b</code> + where <replaceable>operator</replaceable> is one of + <code>=</code>, <code>!=</code>, <code><</code>, + <code>></code>, <code><=</code> or <code>>=</code>. The + comparison is done pairwise between each string in the left and + the right arguments. + </para> + </listitem> + <listitem> + <para> + Logical operations: <code>! a</code>, <code>a && b</code>, + <code>a || b</code> + </para> + </listitem> + <listitem> + <para> + Grouping: <code>( cond )</code> + </para> + </listitem> + </itemizedlist> +<programlisting> +for var in list { statements } +</programlisting> + Executes statements for each element in list, setting the variable + <varname>var</varname> to the element value. +<programlisting> +while cond { statements } +</programlisting> + Repeatedly execute statements while cond remains true upon entry. +<programlisting> +return values ; +</programlisting> + This statement should be used only inside a rule and assigns + <code>values</code> to the return value of the rule. + <warning> + <para> + The <code>return</code> statement does not exit the rule. For + example: +<programlisting> +rule test ( ) +{ + if 1 = 1 + { + return "reasonable" ; + } + return "strange" ; +} +</programlisting> + will return <literal>strange</literal>, not + <literal>reasonable</literal>. + </para> + </warning> +<programlisting> +import <replaceable>module</replaceable> ; +import <replaceable>module</replaceable> : <replaceable>rule</replaceable> ; +</programlisting> + The first form imports the specified module. All rules from that + module are made available using the qualified name: <code><replaceable> + module</replaceable>.<replaceable>rule</replaceable></code>. The second + form imports the specified rules only, and they can be called using + unqualified names. + </para> + + <para id="bbv2.overview.jam_language.actions"> + Sometimes, you need to specify the actual command lines to be used + when creating targets. In the jam language, you use named actions to do + this. For example: +<programlisting> +actions create-file-from-another +{ + create-file-from-another $(<) $(>) +} +</programlisting> + This specifies a named action called <literal> + create-file-from-another</literal>. The text inside braces is the + command to invoke. The <literal>$(<)</literal> variable will be + expanded to a list of generated files, and the <literal>$(>) + </literal> variable will be expanded to a list of source files. + </para> + + <para> + To adjust the command line flexibly, you can define a rule with the same + name as the action and taking three parameters—targets, sources and + properties. For example: +<programlisting> +rule create-file-from-another ( targets * : sources * : properties * ) +{ + if <variant>debug in $(properties) + { + OPTIONS on $(targets) = --debug ; + } +} +actions create-file-from-another +{ + create-file-from-another $(OPTIONS) $(<) $(>) +} +</programlisting> + In this example, the rule checks if a certain build property is specified. + If so, it sets the variable <varname>OPTIONS</varname> 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 <varname>OPTIONS</varname> in + two unrelated actions would be impossible. + </para> + + <para> + More details can be found in the Jam reference, <xref + linkend="jam.language.rules"/>. + </para> + </section> + + <section id="bbv2.overview.configuration"> + <title>Configuration</title> + + <para> + 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 + directory of your Boost.Build installation or create a copy in your home + 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> + <simpara><code>%BOOST_BUILD_PATH%</code></simpara> + </entry> + </row> + </tbody> + </tgroup> + </table> + + <tip> + <para> + You can use the <command>--debug-configuration</command> option to + find which configuration files are actually loaded. + </para> + </tip> + + <para> + Usually, <filename>user-config.jam</filename> just defines the available compilers + and other tools (see <xref linkend="bbv2.recipies.site-config"/> for more advanced + usage). A tool is configured using the following syntax: + </para> + +<programlisting> +using <replaceable>tool-name</replaceable> : ... ; +</programlisting> +<para> + The <code language="jam">using</code> rule is given the name of tool, and + will make that tool available to Boost.Build. For example, +<programlisting> +using gcc ; +</programlisting> will make the <ulink url="http://gcc.gnu.org">GCC</ulink> compiler available. + </para> + + <para> + All the supported tools are documented in <xref linkend="bbv2.reference.tools"/>, + including the specific options they take. Some general notes that apply to most + C++ compilers are below. + </para> + + <para> + For all the C++ compiler toolsets that Boost.Build supports + out-of-the-box, the list of parameters to + <code language="jam">using</code> is the same: <parameter + class="function">toolset-name</parameter>, <parameter + class="function">version</parameter>, <parameter + class="function">invocation-command</parameter>, and <parameter + class="function">options</parameter>. + </para> + + <para>If you have a single compiler, and the compiler executable + <itemizedlist> + <listitem><para>has its “usual name” and is in the + <envar>PATH</envar>, or</para></listitem> + <listitem><para>was installed in a standard “installation + directory”, or</para></listitem> + <listitem><para>can be found using a global system like the Windows + registry.</para></listitem> + </itemizedlist> + it can be configured by simply:</para> +<programlisting> +using <replaceable>tool-name</replaceable> ; +</programlisting> + <!-- TODO: mention auto-configuration? --> + + <para>If the compiler is installed in a custom directory, you should provide the + command that invokes the compiler, for example:</para> +<programlisting> +using gcc : : g++-3.2 ; +using msvc : : "Z:/Programs/Microsoft Visual Studio/vc98/bin/cl" ; +</programlisting> + <para> + Some Boost.Build toolsets will use that path to take additional actions + required before invoking the compiler, such as calling vendor-supplied + scripts to set up its required environment variables. When the compiler + executables for C and C++ are different, the path to the C++ compiler + executable must be specified. The command can + be any command allowed by the operating system. For example: +<programlisting> +using msvc : : echo Compiling && foo/bar/baz/cl ; +</programlisting> + will work. + </para> + + <para> + To configure several versions of a toolset, simply invoke the + <code language="jam">using</code> rule multiple times: +<programlisting> +using gcc : 3.3 ; +using gcc : 3.4 : g++-3.4 ; +using gcc : 3.2 : g++-3.2 ; +</programlisting> + Note that in the first call to <code language="jam">using</code>, the + compiler found in the <envar>PATH</envar> will be used, and there is no + need to explicitly specify the command. + </para> + +<!-- TODO: This is not actually relevant for gcc now, and we need to rethink this + <para>As shown above, both the <parameter + class="function">version</parameter> and <parameter + class="function">invocation-command</parameter> parameters are + optional, but there's an important restriction: if you configure + the same toolset more than once, you must pass the <parameter + class="function">version</parameter> + parameter every time. For example, the following is not allowed: +<programlisting> +using gcc ; +using gcc : 3.4 : g++-3.4 ; +</programlisting> + because the first <functionname>using</functionname> call does + not specify a <parameter class="function">version</parameter>. + </para> --> + + <para> + 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>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 + <varname>cflags</varname> feature are passed directly to the C + compiler, values of the <varname>cxxflags</varname> feature are + passed directly to the C++ compiler, and values of the + <varname>compileflags</varname> feature are passed to both. For + example, to configure a <command>gcc</command> toolset so that it + always generates 64-bit code you could write: +<programlisting> + using gcc : 3.4 : : <compileflags>-m64 <linkflags>-m64 ; +</programlisting> + </para> + + <warning> + <para> + Although the syntax used to specify toolset options is very similar + to syntax used to specify requirements in Jamfiles, the toolset options + are not the same as features. Don't try to specify a feature value + in toolset initialization. + </para> + </warning> + + </section> + + <section id="bbv2.overview.invocation"> + <title>Invocation</title> + + <para>To invoke Boost.Build, type <command>b2</command> on the command line. Three kinds + of command-line tokens are accepted, in any order:</para> + <variablelist> + <varlistentry> + <term>options</term> + + <listitem><para>Options start with either one or two dashes. The standard options + are listed below, and each project may add additional options</para></listitem> + </varlistentry> + + <varlistentry> + <term>properties</term> + + <listitem><para>Properties specify details of what you want to build (e.g. debug + or release variant). Syntactically, all command line tokens with an equal sign in them + are considered to specify properties. In the simplest form, a property looks like + <command><replaceable>feature</replaceable>=<replaceable>value</replaceable></command> + </para></listitem> + </varlistentry> + + <varlistentry> + <term>target</term> + + <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> + </variablelist> + + <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 +</screen> + </para> + + <para>To build specific targets, specify them on the command line: +<screen> +b2 lib1 subproject//lib2 +</screen> + </para> + + <para>To request a certain value for some property, add <literal> + <replaceable>property</replaceable>=<replaceable>value</replaceable></literal> to the command line: +<screen> +b2 toolset=gcc variant=debug optimization=space +</screen> + </para> + </section> + + <section id="bbv2.overview.invocation.options"> + <title>Options</title> + + <para>Boost.Build recognizes the following command line options.</para> + + <variablelist> + + <varlistentry id="bbv2.reference.init.options.help"> + <term><option>--help</option></term> + <listitem> + <para>Invokes the online help system. This prints general + information on how to use the help system with additional + --help* options. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>--clean</option></term> + <listitem> + <para>Cleans all targets in the current directory and + in any subprojects. Note that unlike the <literal>clean</literal> + target in make, you can use <literal>--clean</literal> + together with target names to clean specific targets.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>--clean-all</option></term> + <listitem> + <para>Cleans all targets, + no matter where they are defined. In particular, it will clean targets + in parent Jamfiles, and targets defined under other project roots. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>--build-dir</option></term> + <listitem> + <para>Changes the build directories for all project roots being built. When + this option is specified, all Jamroot files must declare a project name. + The build directory for the project root will be computed by concatenating + 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). + </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>--abbreviate-paths</option></term> + <listitem> + <para>Compresses target paths by abbreviating each component. + This option is useful to keep paths from becoming longer than + the filesystem supports. See also <xref linkend="bbv2.reference.buildprocess.targetpath"/>. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>--hash</option></term> + <listitem> + <para>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 <xref linkend="bbv2.reference.buildprocess.targetpath"/>. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>--version</option></term> + <listitem> + <para>Prints information on the Boost.Build and Boost.Jam + versions. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-a</option></term> + <listitem> + <para>Causes all files to be rebuilt.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-n</option></term> + <listitem> + <para>Do not execute the commands, only print them.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-q</option></term> + <listitem> + <para>Stop at the first error, as opposed to continuing to build targets + that don't depend on the failed ones.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-j <replaceable>N</replaceable></option></term> + <listitem> + <para>Run up to <replaceable>N</replaceable> commands in parallel.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>--debug-configuration</option></term> + <listitem> + <para>Produces debug information about the loading of Boost.Build + and toolset files.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>--debug-building</option></term> + <listitem> + <para>Prints what targets are being built and with what properties. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>--debug-generators</option></term> + <listitem> + <para>Produces debug output from the generator search process. + Useful for debugging custom generators. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-d0</option></term> + <listitem> + <para>Suppress all informational messages.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-d <replaceable>N</replaceable></option></term> + <listitem> + <para>Enable cumulative 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> + <listitem>Show dependency analysis, and target/source timestamps/paths.</listitem> + <listitem>Show arguments and timing of shell invocations.</listitem> + <listitem>Show rule invocations and variable expansions.</listitem> + <listitem>Show directory/header file/archive scans, and attempts at binding to targets.</listitem> + <listitem>Show variable settings.</listitem> + <listitem>Show variable fetches, variable expansions, and evaluation of '"if"' expressions.</listitem> + <listitem>Show variable manipulation, scanner tokens, and memory usage.</listitem> + <listitem>Show profile information for rules, both timing and memory.</listitem> + <listitem>Show parsing progress of Jamfiles.</listitem> + <listitem>Show graph of target dependencies.</listitem> + <listitem>Show change target status (fate).</listitem> + </orderedlist> + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-d +<replaceable>N</replaceable></option></term> + <listitem> + <para>Enable debugging level <replaceable>N</replaceable>.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-o <replaceable>file</replaceable></option></term> + <listitem> + <para>Write the updating actions to the specified file instead of running them. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><option>-s <replaceable>var</replaceable>=<replaceable>value</replaceable></option></term> + <listitem> + <para>Set the variable <replaceable>var</replaceable> to + <replaceable>value</replaceable> in the global scope of the jam + language interpreter, overriding variables imported from the + environment. + </para> + </listitem> + </varlistentry> + </variablelist> + </section> + + <section id="bbv2.overview.invocation.properties"> + <title>Properties</title> + + <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 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 + in case of problems.</entry> + </row> + + <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> + </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 + <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 + 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 + </para> +<screen> +b2 link=static link=shared threading=single threading=multi +</screen> + <para> + 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> +<screen> +b2 link=static,shared threading=single,multi +</screen> + <para> + The comma has this special meaning only if the feature has a fixed set of values, so + </para> +<screen> +b2 include=static,shared +</screen> + <para>is not treated specially.</para> + + </section> + + <section id="bbv2.overview.invocation.targets"> + <title>Targets</title> + + <para>All command line elements that are neither options nor properties are the names of the + targets to build. See <xref linkend="bbv2.reference.ids"/>. If no target is specified, + the project in the current directory is built.</para> + </section> + + </section> + + <section id="bbv2.overview.targets"> + <title>Declaring Targets</title> + + <para id="bbv2.overview.targets.main"> + A <firstterm>Main target</firstterm> is a user-defined named + entity that can be built, for example an executable file. + Declaring a main target is usually done using one of the main + target rules described in <xref linkend= + "bbv2.reference.rules"/>. The user can also declare + custom main target rules as shown in <xref + linkend="bbv2.extending.rules"/>. + </para> + + <indexterm><primary>main target</primary><secondary>declaration + syntax</secondary></indexterm> + <para>Most main target rules in Boost.Build have the same common + signature:</para> + + <!-- I think we maybe ought to be talking about a common + _signature_ here, having already explained Boost.Jam function + signatures at the beginning of this chapter. Then we could show + ( main-target-name : sources * : requirements * : default-build * : usage-requirements * ) + instead. More precise. + + Also, I suggest replacing "default-build" by "default-properties" everywhere. + --> + +<indexterm><primary>common signature</primary></indexterm> +<anchor id="bbv2.main-target-rule-syntax"/> +<programlisting> +rule <replaceable>rule-name</replaceable> ( + main-target-name : + sources + : + requirements * : + default-build * : + usage-requirements * ) +</programlisting> + + <itemizedlist> + <listitem> + <simpara> + <parameter>main-target-name</parameter> is the name used + to request the target on command line and to use it from + other main targets. A main target name may contain + alphanumeric characters, dashes + (‘<code>-</code>’), and underscores + (‘<code>_</code>’). + </simpara> + </listitem> + + <listitem> + <simpara> + <parameter>sources</parameter> is the list of source files and other main + targets that must be combined. + </simpara> + </listitem> + + <listitem> + <simpara> + <parameter>requirements</parameter> is the list of properties that must always + be present when this main target is built. + </simpara> + </listitem> + + <listitem> + <simpara> + <parameter>default-build</parameter> is the list of properties that will be used + unless some other value of the same feature is already + specified, e.g. on the command line or by propagation from a dependent target. + </simpara> + </listitem> + + <listitem> + <simpara> + <parameter>usage-requirements</parameter> is the list of properties that will be + propagated to all main targets that use this one, i.e. to all its + dependents. + </simpara> + </listitem> + </itemizedlist> + + <para> + Some main target rules have a different list of parameters as explicitly + stated in their documentation. + </para> + + <para>The actual requirements for a target are obtained by refining + the requirements of the project where the target is declared with the + explicitly specified requirements. The same is true for + usage-requirements. More details can be found in + <xref linkend="bbv2.reference.variants.proprefine"/> + </para> + + <section> + <title>Name</title> + + <!-- perphaps we should use 'name-target-name' to closer + bind this description to the rule's signature. Here, and for + other parameters. --> + <para>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 + prefixes. + </para> + + <para>The name of a main target can contain alphanumeric characters, + dashes, undescores and dots. The entire + name is significant when resolving references from other targets. For determining filenames, only the + part before the first dot is taken. For example:</para> +<programlisting> +obj test.release : test.cpp : <variant>release ; +obj test.debug : test.cpp : <variant>debug ; +</programlisting> + <para>will generate two files named <filename>test.obj</filename> (in two different directories), not + two files named <filename>test.release.obj</filename> and <filename>test.debug.obj</filename>. + </para> + + </section> + + <section> + <title>Sources</title> + + <para>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 + list of source files rather than having to spell it out + manually, in which case you can use the + <link linkend="bbv2.reference.rules.glob">glob</link> rule. + Here are two examples:</para> +<programlisting> +exe a : a.cpp ; # a.cpp is the only source file +exe b : [ glob *.cpp ] ; # all .cpp files in this directory are sources +</programlisting> + <para> + Unless you specify a file with an absolute path, the name is + considered relative to the source directory — which is typically + the directory where the Jamfile is located, but can be changed as + described in <xref linkend= + "bbv2.overview.projects.attributes.projectrule"/>. + </para> + + <para> + <!-- use "project-id" here? --> + The list of sources can also refer to other main targets. Targets in + the same project can be referred to by name, while targets in other + projects must be qualified with a directory or a symbolic project + name. The directory/project name is separated from the target name by + a double forward slash. There is no special syntax to distinguish the + directory name from the project name—the part before the double + slash is first looked up as project name, and then as directory name. + For example: + </para> +<programlisting> +lib helper : helper.cpp ; +exe a : a.cpp helper ; +# Since all project ids start with slash, ".." is a directory name. +exe b : b.cpp ..//utils ; +exe c : c.cpp /boost/program_options//program_options ; +</programlisting> + <para> + The first exe uses the library defined in the same project. The second + one uses some target (most likely a library) defined by a Jamfile one + level higher. Finally, the third target uses a <ulink url= + "http://boost.org">C++ Boost</ulink> library, referring to it using + its absolute symbolic name. More information about target references + can be found in <xref linkend="bbv2.tutorial.libs"/> and <xref + linkend="bbv2.reference.ids"/>. + </para> + </section> + + <section id="bbv2.overview.targets.requirements"> + <title>Requirements</title> + <indexterm><primary>requirements</primary></indexterm> + <para>Requirements are the properties that should always be present when + building a target. Typically, they are includes and defines: +<programlisting> +exe hello : hello.cpp : <include>/opt/boost <define>MY_DEBUG ; +</programlisting> + There are a number of other features, listed in + <xref linkend="bbv2.overview.builtins.features"/>. For example if + a library can only be built statically, or a file can't be compiled + with optimization due to a compiler bug, one can use +<programlisting> +lib util : util.cpp : <link>static ; +obj main : main.cpp : <optimization>off ; +</programlisting> + </para> + + <para id="bbv2.overview.targets.requirements.conditional"> + <indexterm><primary>requirements</primary><secondary>conditional</secondary></indexterm> + Sometimes, particular relationships need to be maintained + among a target's build properties. This can be achieved with + <firstterm>conditional + requirements</firstterm>. For example, you might want to set + specific <code>#defines</code> when a library is built as shared, + or when a target's <code>release</code> variant is built in + release mode. +<programlisting> +lib network : network.cpp + : <emphasis role="bold"><link>shared:<define>NETWORK_LIB_SHARED</emphasis> + <variant>release:<define>EXTRA_FAST + ; +</programlisting> + + In the example above, whenever <filename>network</filename> is + built with <code><link>shared</code>, + <code><define>NETWORK_LIB_SHARED</code> will be in its + properties, too. + </para> + + <para>You can use several properties in the condition, for example: +<programlisting> +lib network : network.cpp + : <toolset>gcc,<optimization>speed:<define>USE_INLINE_ASSEMBLER + ; +</programlisting> + </para> + + <para id="bbv2.overview.targets.requirements.indirect"> + <indexterm><primary>requirements</primary><secondary>indirect</secondary></indexterm> + A more powerful variant of conditional requirements + is <firstterm>indirect conditional requirements</firstterm>. + You can provide a rule that will be called with the current build properties and can compute additional properties + to be added. For example: +<programlisting> +lib network : network.cpp + : <conditional>@my-rule + ; +rule my-rule ( properties * ) +{ + local result ; + if <toolset>gcc <optimization>speed in $(properties) + { + result += <define>USE_INLINE_ASSEMBLER ; + } + return $(result) ; +} +</programlisting> + This example is equivalent to the previous one, but for complex cases, indirect conditional + requirements can be easier to write and understand. + </para> + + <para>Requirements explicitly specified for a target are usually + combined with the requirements specified for the containing project. You + can cause a target to completely ignore a specific project requirement + using the syntax by adding a minus sign before the property, for example: +<programlisting> +exe main : main.cpp : <emphasis role="bold">-<define>UNNECESSARY_DEFINE</emphasis> ; +</programlisting> + This syntax is the only way to ignore free properties, such as defines, + from a parent. It can be also useful for ordinary properties. Consider + this example: +<programlisting> +project test : requirements <threading>multi ; +exe test1 : test1.cpp ; +exe test2 : test2.cpp : <threading>single ; +exe test3 : test3.cpp : -<threading>multi ; +</programlisting> + Here, <code>test1</code> inherits the project requirements and will always + be built in multi-threaded mode. The <code>test2</code> target + <emphasis>overrides</emphasis> the project's requirements and will + always be built in single-threaded mode. In contrast, the + <code>test3</code> target <emphasis>removes</emphasis> a property + from the project requirements and will be built either in single-threaded or + multi-threaded mode depending on which variant is requested by the + user.</para> + + <para>Note that the removal of requirements is completely textual: + you need to specify exactly the same property to remove it.</para> + + </section> + + <section> + <title>Default Build</title> + + <para>The <varname>default-build</varname> 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: +<programlisting> +exe hello : hello.cpp : : <threading>multi ; +</programlisting> + would build a multi-threaded target unless the user + explicitly requests a single-threaded version. The difference between + the requirements and the default-build is that the requirements cannot be + overridden in any way. + </para> + </section> + + <section> + <title>Additional Information</title> + + <para> + The ways a target is built can be so different that + describing them using conditional requirements would be + hard. For example, imagine that a library actually uses + different source files depending on the toolset used to build + it. We can express this situation using <firstterm>target + alternatives</firstterm>: +<programlisting> +lib demangler : dummy_demangler.cpp ; # alternative 1 +lib demangler : demangler_gcc.cpp : <toolset>gcc ; # alternative 2 +lib demangler : demangler_msvc.cpp : <toolset>msvc ; # alternative 3 +</programlisting> + In the example above, when built with <literal>gcc</literal> + or <literal>msvc</literal>, <filename>demangler</filename> + will use a source file specific to the toolset. Otherwise, it + will use a generic source file, + <filename>dummy_demangler.cpp</filename>. + </para> + + <para>It is possible to declare a target inline, i.e. the "sources" + parameter may include calls to other main rules. For example:</para> + +<programlisting> +exe hello : hello.cpp + [ obj helpers : helpers.cpp : <optimization>off ] ;</programlisting> + + <para> + Will cause "helpers.cpp" to be always compiled without + optimization. When referring to an inline main target, its declared + name must be prefixed by its parent target's name and two dots. In + the example above, to build only helpers, one should run + <code>b2 hello..helpers</code>. + </para> + + <para>When no target is requested on the command line, all targets in the + current project will be built. If a target should be built only by + explicit request, this can be expressed by the + <link linkend="bbv2.reference.rules.explicit">explicit</link> rule: + <programlisting> +explicit install_programs ;</programlisting> + </para> + + </section> + </section> + + <section id="bbv2.overview.projects"> + <title>Projects</title> + + <para>As mentioned before, targets are grouped into projects, + and each Jamfile is a separate project. Projects are useful + because they allow us to group related targets together, define + properties common to all those targets, and assign a symbolic + name to the project that can be used in referring to its + targets. + </para> + + <para>Projects are named using the + <code language="jam">project</code> rule, which has the + following syntax: +<programlisting> +project <replaceable>id</replaceable> : <replaceable>attributes</replaceable> ; +</programlisting> + Here, <replaceable>attributes</replaceable> is a sequence of + rule arguments, each of which begins with an attribute-name + and is followed by any number of build properties. The list + of attribute names along with its handling is also shown in + the table below. For example, it is possible to write: +<programlisting> +project tennis + : requirements <threading>multi + : default-build release + ; +</programlisting> + </para> + + <para>The possible attributes are listed below.</para> + + <para><emphasis>Project id</emphasis> is a short way to denote a project, as + opposed to the Jamfile's pathname. It is a hierarchical path, + unrelated to filesystem, such as "boost/thread". <link linkend= + "bbv2.reference.ids">Target references</link> make use of project ids to + specify a target.</para> + <!-- + This is actually spelled "project-id," isn't it? You + have to fix all of these and use a code font. Also below + in the table. + --> + + <para><emphasis>Source location</emphasis> specifies the directory where sources + for the project are located.</para> + + <para><emphasis>Project requirements</emphasis> are requirements that apply to + all the targets in the projects as well as all subprojects.</para> + + <para><emphasis>Default build</emphasis> is the build request that should be + used when no build request is specified explicitly.</para> + <!-- + This contradicts your earlier description of default + build and I believe it is incorrect. Specifying a build + request does not neccessarily render default build + ineffective, because it may cover different features. + This description is repeated too many times in the + documentation; you almost *had* to get it wrong once. + --> + + <para id="bbv2.overview.projects.attributes.projectrule"> + The default values for those attributes are + given in the table below. + + <table> + <title/> + <tgroup cols="4"> + <thead> + <row> + <entry>Attribute</entry> + + <entry>Name</entry> + + <entry>Default value</entry> + + <entry>Handling by the <code language="jam">project</code> + rule</entry> + + </row> + </thead> + + <tbody> + + <row> + <entry>Project id</entry> + + <entry>none</entry> + + <entry>none</entry> + + <entry>Assigned from the first parameter of the 'project' rule. + It is assumed to denote absolute project id.</entry> + </row> + + <row> + <entry>Source location</entry> + + <entry><literal>source-location</literal></entry> + + <entry>The location of jamfile for the project</entry> + + <entry>Sets to the passed value</entry> + </row> + + <row> + <entry>Requirements</entry> + + <entry><literal>requirements</literal></entry> + + <entry>The parent's requirements</entry> + + <entry>The parent's requirements are refined with the passed + requirement and the result is used as the project + requirements.</entry> + </row> + + <row> + <entry>Default build</entry> + + <entry><literal>default-build</literal></entry> + + <entry>none</entry> + + <entry>Sets to the passed value</entry> + </row> + + <row> + <entry>Build directory</entry> + + <entry><literal>build-dir</literal></entry> + + <entry>Empty if the parent has no build directory set. + Otherwise, the parent's build directory with the + relative path from parent to the current project + appended to it. + </entry> + + <entry>Sets to the passed value, interpreted as relative to the + project's location.</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + + <para>Besides defining projects and main targets, Jamfiles + often invoke various utility rules. For the full list of rules + that can be directly used in Jamfile see + <xref linkend="bbv2.reference.rules"/>. + </para> + + <para>Each subproject inherits attributes, constants and rules + from its parent project, which is defined by the nearest + Jamfile in an ancestor directory above + the subproject. The top-level project is declared in a file + 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 identically, except + that if the file is called <filename>Jamroot</filename>, the + search for a parent project is not performed. + </para> + + <para>Even when building in a subproject directory, parent + project files are always loaded before those of their + subprojects, so that every definition made in a parent project + is always available to its children. The loading order of any + other projects is unspecified. Even if one project refers to + another via the <code>use-project</code> or a target reference, + no specific order should be assumed. + </para> + + <note> + <para>Giving the root project the special name + “<filename>Jamroot</filename>” ensures that + Boost.Build won't misinterpret a directory above it as the + project root just because the directory contains a Jamfile. + <!-- The logic of the previous reasoning didn't hang together --> + </para> + </note> + + <!-- All this redundancy with the tutorial is bad. The tutorial + should just be made into the introductory sections of this + document, which should be called the "User Guide." It's + perfectly appropriate to start a user guide with that kind + of material. --> + </section> + + <section id="bbv2.overview.build_process"> + <title>The Build Process</title> + + <para>When you've described your targets, you want Boost.Build to run the + right tools and create the needed targets. + <!-- That sentence is awkward and doesn't add much. --> + This section will describe + two things: how you specify what to build, and how the main targets are + actually constructed. + </para> + + <para>The most important thing to note is that in Boost.Build, unlike + other build tools, the targets you declare do not correspond to specific + files. What you declare in a Jamfile is more like a “metatarget.” + <!-- Do we need a new word? We already have “main target.” If + you're going to introduce “metatarget” you should at least + tie it together with the main target concept. It's too + strange to have been saying “main target” all along and now + suddenly start saying “what you declare in a jamfile” --> + Depending on the properties you specify on the command line, + each metatarget will produce a set of real targets corresponding + to the requested properties. It is quite possible that the same + metatarget is built several times with different properties, + producing different files. + </para> + <tip> + <para> + This means that for Boost.Build, you cannot directly obtain a build + variant from a Jamfile. There could be several variants requested by the + user, and each target can be built with different properties. + </para> + </tip> + + <section id="bbv2.overview.build_request"> + <title>Build Request</title> + + <para> + The command line specifies which targets to build and with which + properties. For example: +<programlisting> +b2 app1 lib1//lib1 toolset=gcc variant=debug optimization=full +</programlisting> + would build two targets, "app1" and "lib1//lib1" with the specified + properties. You can refer to any targets, using + <link linkend="bbv2.reference.ids">target id</link> and specify arbitrary + properties. Some of the properties are very common, and for them the name + of the property can be omitted. For example, the above can be written as: +<programlisting> +b2 app1 lib1//lib1 gcc debug optimization=full +</programlisting> + The complete syntax, which has some additional shortcuts, is + described in <xref linkend="bbv2.overview.invocation"/>. + </para> + </section> + + <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 done. Some brief + explanation is provided, and more details are given in <xref + linkend="bbv2.reference.buildprocess"/>. + <orderedlist> + + <listitem><para>Applying default build. If the default-build + property of a target specifies a value of a feature that is not + present in the build request, that value is added.</para> + <!-- + Added to what? Don't say “the build request!” The + request is what was requested; if its meaning changes + the reader will be confused. + --> + </listitem> + + <listitem><para>Selecting the main target alternative to use. For + each alternative we look how many properties are present both in + alternative's requirements, and in build request. The + alternative with largest number of matching properties is selected. + </para></listitem> + + <listitem><para>Determining "common" properties. + <!-- It would be nice to have a better name for this. But + even more importantly, unless you say something about + the reason for choosing whatever term you use, the + reader is going to wonder what it means. --> + The build request + is <link linkend="bbv2.reference.variants.proprefine">refined</link> + with target's requirements. + <!-- It's good that you have the links here and below, + but I'm concerned that it doesn't communicate well + in print and there's not enough information for the + print reader. Maybe we need separate XSL for PDF + printing that generates a readable footnote. --> + The conditional properties in + requirements are handled as well. Finally, default values of + features are added. + </para></listitem> + + <listitem><para>Building targets referred by the sources list and + dependency properties. The list of sources and the properties + can refer to other target using <link + linkend="bbv2.reference.ids">target references</link>. For each + reference, we take all <link + linkend="bbv2.reference.features.attributes.propagated">propagated</link> + properties, refine them by explicit properties specified in the + target reference, and pass the resulting properties as build + request to the other target. + </para></listitem> + + <listitem><para>Adding the usage requirements produced when building + dependencies to the "common" properties. When dependencies are + built in the previous step, they return + <!-- don't assume reader has a mental model for BB internals! --> + both the set of created + "real" targets, and usage requirements. The usage requirements + are added to the common properties and the resulting property + set will be used for building the current target. + </para></listitem> + + <listitem><para>Building the target using generators. To convert the + sources to the desired type, Boost.Build uses "generators" --- + objects that correspond to tools like compilers and linkers. Each + generator declares what type of targets it can produce and what + type of sources it requires. Using this information, Boost.Build + determines which generators must be run to produce a specific + target from specific sources. When generators are run, they return + the "real" targets. + </para></listitem> + + <listitem><para>Computing the usage requirements to be returned. The + conditional properties in usage requirements are expanded + <!-- what does "expanded" mean? --> + and the result is returned.</para></listitem> + </orderedlist> + </para> + </section> + + <section><title>Building a Project</title> + + <para>Often, a user builds a complete project, not just one main + target. In fact, invoking <command>b2</command> without + arguments + <!-- do you know the difference between parameters and + arguments? I only learned this year --> + builds the project defined in the current + directory.</para> + + <para>When a project is built, the build request is passed without + modification to all main targets in that project. + <!-- What does it mean to pass a build request to a target? + --> + It's is possible to + prevent implicit building of a target in a project with the + <code>explicit</code> rule: +<programlisting> +explicit hello_test ; +</programlisting> + would cause the <code>hello_test</code> target to be built only if + explicitly requested by the user or by some other target. + </para> + + <para>The Jamfile for a project can include a number of + <code>build-project</code> rule calls that specify additional projects to + be built. + </para> + + </section> + + </section> + + </chapter> + +<!-- + Local Variables: + mode: nxml + sgml-indent-data: t + sgml-parent-document: ("userman.xml" "chapter") + sgml-set-face: t + End: +--> diff --git a/boost/tools/build/doc/src/path.xml b/boost/tools/build/doc/src/path.xml new file mode 100644 index 00000000..f11906db --- /dev/null +++ b/boost/tools/build/doc/src/path.xml @@ -0,0 +1,249 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<section id="bbv2.reference.modules.path"> + + <title>path</title> + <indexterm> + <primary>path</primary> + <secondary>module</secondary> + </indexterm> + + <para> + Performs various path manipulations. Paths are always in a 'normalized' + representation. In it, a path may be either: + + <itemizedlist> + <listitem><para><code>'.'</code>, or</para></listitem> + <listitem> + <para> + <code>['/'] [ ( '..' '/' )* (token '/')* token ]</code> + </para> + </listitem> + </itemizedlist> + + In plain english, a path can be rooted, <code>'..'</code> + elements are allowed only at the beginning, and it never + ends in slash, except for the path consisting of slash only. + </para> + + <orderedlist> + + <listitem id="bbv2.reference.modules.path.make"> + <indexterm zone="bbv2.reference.modules.path.make"> + <primary>make</primary> + <secondary>path</secondary> + </indexterm> + <code language="jam">rule make ( native )</code> + <para>Converts the native path into normalized form.</para> + </listitem> + + <listitem id="bbv2.reference.modules.path.native"> + <indexterm zone="bbv2.reference.modules.path.native"> + <primary>native</primary> + </indexterm> + <code language="jam">rule native ( path )</code> + <para>Builds the native representation of the path.</para> + </listitem> + + <listitem id="bbv2.reference.modules.path.is-rooted"> + <indexterm zone="bbv2.reference.modules.path.is-rooted"> + <primary>is-rooted</primary> + </indexterm> + <code language="jam">rule is-rooted ( path )</code> + <para>Tests if a path is rooted.</para> + </listitem> + + <listitem id="bbv2.reference.modules.path.has-parent"> + <indexterm zone="bbv2.reference.modules.path.has-parent"> + <primary>has-parent</primary> + </indexterm> + <code language="jam">rule has-parent ( path )</code> + <para>Tests if a path has a parent.</para> + </listitem> + + <listitem id="bbv2.reference.modules.path.basename"> + <indexterm zone="bbv2.reference.modules.path.basename"> + <primary>basename</primary> + </indexterm> + <code language="jam">rule basename ( path )</code> + <para>Returns the path without any directory components.</para> + </listitem> + + <listitem id="bbv2.reference.modules.path.parent"> + <indexterm zone="bbv2.reference.modules.path.parent"> + <primary>parent</primary> + </indexterm> + <code language="jam">rule parent ( path )</code> + <para>Returns the parent directory of the path. If no parent exists, an error is issued.</para> + </listitem> + + <listitem id="bbv2.reference.modules.path.reverse"> + <indexterm zone="bbv2.reference.modules.path.reverse"> + <primary>reverse</primary> + </indexterm> + <code language="jam">rule reverse ( path )</code> + <para> + Returns <code language="jam">path2</code> such that + <code language="jam">[ join path path2 ] = "."</code>. + The path may not contain <code language="jam">".."</code> + element or be rooted. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.path.join"> + <indexterm zone="bbv2.reference.modules.path.join"> + <primary>join</primary> + </indexterm> + <code language="jam">rule join ( elements + )</code> + <para> + 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. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.path.root"> + <indexterm zone="bbv2.reference.modules.path.root"> + <primary>root</primary> + </indexterm> + <code language="jam">rule root ( path root )</code> + <para> + If <code language="jam">path</code> is relative, it is rooted at + <code language="jam">root</code>. Otherwise, it is unchanged. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.path.pwd"> + <indexterm zone="bbv2.reference.modules.path.pwd"> + <primary>pwd</primary> + </indexterm> + <code language="jam">rule pwd ( )</code> + <para>Returns the current working directory.</para> + </listitem> + + <listitem id="bbv2.reference.modules.path.glob"> + <indexterm zone="bbv2.reference.modules.path.glob"> + <primary>glob</primary> + </indexterm> + <code language="jam">rule glob ( dirs * : patterns + : exclude-patterns * )</code> + <para> + 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: + <itemizedlist> + <listitem> + <para>'?' matches any character</para> + </listitem> + <listitem> + <para>'*' matches an arbitrary number of characters</para> + </listitem> + </itemizedlist> + A file $(d)/e1/e2/e3 (where 'd' is in $(dirs)) matches the pattern p1/p2/p3 if and + only if e1 matches p1, e2 matches p2 and so on. + + For example: +<programlisting language="jam"> +[ glob . : *.cpp ] +[ glob . : */build/Jamfile ] +</programlisting> + </para> + </listitem> + + <listitem id="bbv2.reference.modules.path.glob-tree"> + <indexterm zone="bbv2.reference.modules.path.glob-tree"> + <primary>glob-tree</primary> + </indexterm> + <code language="jam">rule glob-tree ( roots * : patterns + : exclude-patterns * )</code> + <para> + Recursive version of <link linkend="bbv2.reference.modules.path.glob">glob</link>. + Builds the glob of files while also searching in + the subdirectories of the given roots. An optional set of exclusion patterns + will filter out the matching entries from the result. The exclusions also + apply to the subdirectory scanning, such that directories that match the + exclusion patterns will not be searched. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.path.exists"> + <indexterm zone="bbv2.reference.modules.path.exists"> + <primary>exists</primary> + </indexterm> + <code language="jam">rule exists ( file )</code> + <para>Returns true if the specified file exists.</para> + </listitem> + + <listitem id="bbv2.reference.modules.path.all-parents"> + <indexterm zone="bbv2.reference.modules.path.all-parents"> + <primary>all-parents</primary> + </indexterm> + <code language="jam">rule all-parents ( path : upper_limit ? : cwd ? )</code> + <para> + 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 language="jam">upper_limit</code> is specified, directories above it + will be pruned. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.path.glob-in-parents"> + <indexterm zone="bbv2.reference.modules.path.glob-in-parents"> + <primary>glob-in-parents</primary> + </indexterm> + <code language="jam">rule glob-in-parents ( dir : patterns + : upper-limit ? )</code> + <para> + Search for <code language="jam">patterns</code> in parent directories + of <code language="jam">dir</code>, up to and including + <code language="jam">upper_limit</code>, if it is specified, or + till the filesystem root otherwise. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.path.relative"> + <indexterm zone="bbv2.reference.modules.path.relative"> + <primary>relative</primary> + </indexterm> + <code language="jam">rule relative ( child parent : no-error ? )</code> + <para> + Assuming <code language="jam">child</code> is a subdirectory of + <code language="jam">parent</code>, return the relative path from + <code language="jam">parent</code> to <code language="jam">child</code>. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.path.relative-to"> + <indexterm zone="bbv2.reference.modules.path.relative-to"> + <primary>relative-to</primary> + </indexterm> + <code language="jam">rule relative-to ( path1 path2 )</code> + <para>Returns the minimal path to path2 that is relative path1.</para> + </listitem> + + <listitem id="bbv2.reference.modules.path.programs-path"> + <indexterm zone="bbv2.reference.modules.path.programs-path"> + <primary>programs-path</primary> + </indexterm> + <code language="jam">rule programs-path ( )</code> + <para> + Returns the list of paths which are used by the operating system for + looking up programs. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.path.mkdirs"> + <indexterm zone="bbv2.reference.modules.path.mkdirs"> + <primary>mkdirs</primary> + </indexterm> + <code language="jam">rule makedirs ( path )</code> + <para> + Creates a directory and all parent directories that do not + already exist. + </para> + </listitem> + + </orderedlist> + +</section> diff --git a/boost/tools/build/doc/src/project-target.xml b/boost/tools/build/doc/src/project-target.xml new file mode 100644 index 00000000..1e4e39a5 --- /dev/null +++ b/boost/tools/build/doc/src/project-target.xml @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<section id="bbv2.reference.class.project-target"> + + <title>Class project-target</title> + <indexterm> + <primary>project-target</primary> + </indexterm> + +<programlisting language="jam"> +class project-target : <link linkend="bbv2.reference.class.abstract-target">abstract-target</link> { + rule <link linkend="bbv2.reference.class.project-target.generate">generate</link> ( property-set ) + rule <link linkend="bbv2.reference.class.project-target.build-dir">build-dir</link> ( ) + rule <link linkend="bbv2.reference.class.project-target.main-target">main-target</link> ( name ) + rule <link linkend="bbv2.reference.class.project-target.has-main-target">has-main-target</link> ( name ) + rule <link linkend="bbv2.reference.class.project-target.find">find</link> ( id : no-error ? ) + + # Methods inherited from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link> + rule <link linkend="bbv2.reference.class.abstract-target.name">name</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.project">project</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.location">location</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.full-name">full-name</link> ( ) +} +</programlisting> + + <para> + This class has the following responsibilities: + <itemizedlist> + <listitem> + <para> + Maintaining a list of main targets in this project and building them. + </para> + </listitem> + </itemizedlist> + </para> + + <orderedlist> + + <listitem id="bbv2.reference.class.project-target.generate"> + <indexterm zone="bbv2.reference.class.project-target.generate"> + <primary>generate</primary> + <secondary>Project Target</secondary> + </indexterm> + <code language="jam">rule generate ( property-set )</code> + <para> + Overrides + <link linkend="bbv2.reference.class.abstract-target.generate">abstract-target.generate</link>. + + Generates virtual targets for all the targets contained in this project. + </para> + + <para> + On success, returns: + <itemizedlist> + <listitem>a property-set with the usage requirements to be applied to dependents</listitem> + <listitem>a list of produced virtual targets, which may be empty.</listitem> + </itemizedlist> + </para> + </listitem> + + <listitem id="bbv2.reference.class.project-target.build-dir"> + <indexterm zone="bbv2.reference.class.project-target.build-dir"> + <primary>build-dir</primary> + <secondary>Project Target Method</secondary> + </indexterm> + <code language="jam">rule build-dir ( )</code> + <para> + Returns the root build directory of the project. + </para> + </listitem> + + <listitem id="bbv2.reference.class.project-target.main-target"> + <indexterm zone="bbv2.reference.class.project-target.main-target"> + <primary>main-target</primary> + <secondary>Project Target Method</secondary> + </indexterm> + <code language="jam">rule main-target ( name )</code> + <para> + Returns a <link linkend="bbv2.reference.class.main-target">main-target</link> + class instance corresponding to <literal>name</literal>. + Can only be called after the project has been fully loaded. + </para> + </listitem> + + <listitem id="bbv2.reference.class.project-target.has-main-target"> + <indexterm zone="bbv2.reference.class.project-target.has-main-target"> + <primary>has-main-target</primary> + <secondary>Project Target Method</secondary> + </indexterm> + <code language="jam">rule has-main-target ( name )</code> + <para> + Returns whether a <link linkend="bbv2.reference.class.main-target">main-target</link> + with the specified name exists. + Can only be called after the project has been fully loaded. + </para> + </listitem> + + <listitem id="bbv2.reference.class.project-target.find"> + <indexterm zone="bbv2.reference.class.project-target.find"> + <primary>find</primary> + <secondary>Project Target Method</secondary> + </indexterm> + <code language="jam">rule find ( id : no-error ? )</code> + <para> + 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 + depending on the <literal>no-error</literal> parameter. + </para> + </listitem> + + <!-- + + I'm not sure whether these should be considered public interfaces. + Leave them out for now (SW): + + rule project-module ( ) + rule get ( attribute ) + + --> + + <!-- + + The following are not documented because I consider them implementation details (SW): + + rule __init__ ( name : project-module parent-project ? + : requirements * : default-build * ) - invoked by the build system. + + rule targets-to-build ( ) - internal to project-target + rule mark-target-as-explicit ( target-name * ) - Implementation of explicit + rule mark-target-as-always ( target-name * ) - Implementation of always + rule add-alternative ( target-instance ) - Implementation of targets.main-target-alternative + rule find-really ( id ) - internal to project-target + rule build-main-targets ( ) - internal to project-target + rule inherit ( parent ) - internal to project-target + rule add-constant ( name : value + : type ? ) - Implementation of constant/path-constant + + --> + + </orderedlist> + +</section> diff --git a/boost/tools/build/doc/src/property-set.xml b/boost/tools/build/doc/src/property-set.xml new file mode 100644 index 00000000..a5b5b8c7 --- /dev/null +++ b/boost/tools/build/doc/src/property-set.xml @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<section id="bbv2.reference.class.property-set"> + + <title>Class property-set</title> + <indexterm> + <primary>property-set</primary> + </indexterm> + + <para>Class for storing a set of properties.</para> + +<programlisting language="jam"> +class property-set { + rule <link linkend="bbv2.reference.class.property-set.raw">raw</link> ( ) + rule <link linkend="bbv2.reference.class.property-set.str">str</link> ( ) + rule <link linkend="bbv2.reference.class.property-set.propagated">propagated</link> ( ) + rule <link linkend="bbv2.reference.class.property-set.add">add</link> ( ps ) + rule <link linkend="bbv2.reference.class.property-set.add-raw">add-raw</link> ( properties * ) + rule <link linkend="bbv2.reference.class.property-set.refine">refine</link> ( ps ) + rule <link linkend="bbv2.reference.class.property-set.get">get</link> ( feature ) +} +</programlisting> + + <para> + There is 1<->1 correspondence between identity and value. No two instances + of the class are equal. To maintain this property, the 'property-set.create' + rule should be used to create new instances. Instances are immutable. + </para> + + <orderedlist> + + <listitem id="bbv2.reference.class.property-set.raw"> + <indexterm zone="bbv2.reference.class.property-set.raw"> + <primary>raw</primary> + <secondary>Property Set Method</secondary> + </indexterm> + <code language="jam">rule raw ( )</code> + <para>Returns a Jam list of the stored properties.</para> + </listitem> + + <listitem id="bbv2.reference.class.property-set.str"> + <indexterm zone="bbv2.reference.class.property-set.str"> + <primary>str</primary> + <secondary>Property Set Method</secondary> + </indexterm> + <code language="jam">rule str ( )</code> + <para>Returns the string repesentation of the stored properties.</para> + </listitem> + + <listitem id="bbv2.reference.class.property-set.propagated"> + <indexterm zone="bbv2.reference.class.property-set.propagated"> + <primary>propagated</primary> + <secondary>Property Set Method</secondary> + </indexterm> + <code language="jam">rule propagated ( )</code> + <para> + Returns a <link linkend="bbv2.reference.class.property-set">property-set</link> + containing all the <link linkend="bbv2.reference.features.attributes.propagated">propagated</link> + properties in this <link linkend="bbv2.reference.class.property-set">property-set</link>. + </para> + </listitem> + + <listitem id="bbv2.reference.class.property-set.add"> + <indexterm zone="bbv2.reference.class.property-set.add"> + <primary>add</primary> + <secondary>Property Set Method</secondary> + </indexterm> + <code language="jam">rule add ( ps )</code> + <para> + Returns a new <link linkend="bbv2.reference.class.property-set"> + property-set</link> containing the union of the properties + in this <link linkend="bbv2.reference.class.property-set"> + property-set</link> and in <literal>ps</literal>. + <note> + <para> + If <literal>ps</literal> contains non-free properties + that should override the values in this object, use + <link linkend="bbv2.reference.class.property-set.refine"> + refine</link> instead. + </para> + </note> + </para> + </listitem> + + <listitem id="bbv2.reference.class.property-set.add-raw"> + <indexterm zone="bbv2.reference.class.property-set.add-raw"> + <primary>add-raw</primary> + <secondary>Property Set Method</secondary> + </indexterm> + <code language="jam">rule add-raw ( properties * )</code> + <para> + Link <link linkend="bbv2.reference.class.property-set.add"> + add</link>, except that it takes a list of properties + instead of a <link linkend="bbv2.reference.class.property-set"> + property-set</link>. + </para> + </listitem> + + <listitem id="bbv2.reference.class.property-set.refine"> + <indexterm zone="bbv2.reference.class.property-set.refine"> + <primary>refine</primary> + <secondary>Property Set Method</secondary> + </indexterm> + <code language="jam">rule refine ( ps )</code> + <para> + Refines properties by overriding any non-free and non-conditional + properties for which a different value is specified in + <literal>ps</literal>. Returns the resulting + <link linkend="bbv2.reference.class.property-set">property-set</link>. + </para> + </listitem> + + <listitem id="bbv2.reference.class.property-set.get"> + <indexterm zone="bbv2.reference.class.property-set.get"> + <primary>get</primary> + <secondary>Property Set Method</secondary> + </indexterm> + <code language="jam">rule get ( feature )</code> + <para> + Returns all the values of <literal>feature</literal>. + </para> + </listitem> + + </orderedlist> + +</section> diff --git a/boost/tools/build/doc/src/recipes.xml b/boost/tools/build/doc/src/recipes.xml new file mode 100644 index 00000000..ec65f28e --- /dev/null +++ b/boost/tools/build/doc/src/recipes.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE appendix PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + + <!-- The file is empty. It's not clear if it will be needed in + future or FAQ completely supercedes it. --> + + <appendix id="bbv2.recipies"> + <title>Boost.Build System V2 recipes</title> + + </appendix> diff --git a/boost/tools/build/doc/src/reference.xml b/boost/tools/build/doc/src/reference.xml new file mode 100644 index 00000000..7e4c4ec8 --- /dev/null +++ b/boost/tools/build/doc/src/reference.xml @@ -0,0 +1,2790 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd" +[ +<!ENTITY toolset_ops "<optional><replaceable>version</replaceable></optional> : <optional><replaceable>c++-compile-command</replaceable></optional> : <optional><replaceable>compiler options</replaceable></optional>"> +<!ENTITY option_list_intro "<para>The following options can be provided, using <literal><<replaceable>option-name</replaceable>><replaceable>option-value</replaceable></literal> syntax:</para>"> +<!ENTITY using_repeation "<para>This statement may be repeated several times, if you want to configure several versions of the compiler.</para>"> +]> + +<chapter id="bbv2.reference" + xmlns:xi="http://www.w3.org/2001/XInclude"> + <title>Reference</title> + + <section id="bbv2.reference.general"> + <title>General information</title> + + <section id="bbv2.reference.init"> + <title>Initialization</title> + + <para> + Immediately upon starting, the Boost.Build engine (<command>b2</command>) + loads the Jam code that implements the build system. To do this, it searches for a file + called <filename>boost-build.jam</filename>, 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 + BOOST_BUILD_PATH. When found, the file is interpreted, and should + specify the build system location by calling the boost-build + rule:</para> + +<programlisting> +rule boost-build ( location ? ) +</programlisting> + + <para> + If location is a relative path, it is treated as relative to + the directory of <filename>boost-build.jam</filename>. The directory specified by + that location and the directories in BOOST_BUILD_PATH are then searched for + a file called <filename>bootstrap.jam</filename>, which is expected to + bootstrap the build system. This arrangement allows the build + system to work without any command-line or environment variable + settings. For example, if the build system files were located in a + directory "build-system/" at your project root, you might place a + <filename>boost-build.jam</filename> at the project root containing: + +<programlisting> +boost-build build-system ; +</programlisting> + + In this case, running <command>b2</command> anywhere in the project tree will + automatically find the build system.</para> + + <para>The default <filename>bootstrap.jam</filename>, after loading some standard + definitions, loads both <filename>site-config.jam</filename> and <filename>user-config.jam</filename>.</para> + + </section> + + </section> + + <section id="bbv2.reference.rules"> + <title>Builtin rules</title> + + <para>This section contains the list of all rules that + can be used in Jamfile—both rules that define new + targets and auxiliary rules.</para> + + <variablelist> + <varlistentry> + <term><literal>exe</literal></term> + + <listitem><para>Creates an executable file. See + <xref linkend="bbv2.tasks.programs"/>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>lib</literal></term> + + <listitem><para>Creates an library file. See + <xref linkend="bbv2.tasks.libraries"/>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>install</literal></term> + + <listitem><para>Installs built targets and other files. See + <xref linkend="bbv2.tasks.installing"/>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>alias</literal></term> + + <listitem><para>Creates an alias for other targets. See + <xref linkend="bbv2.tasks.alias"/>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>unit-test</literal></term> + + <listitem><para>Creates an executable that will be automatically run. See + <xref linkend="bbv2.builtins.testing"/>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>compile</literal></term> + <term><literal>compile-fail</literal></term> + <term><literal>link</literal></term> + <term><literal>link-fail</literal></term> + <term><literal>run</literal></term> + <term><literal>run-fail</literal></term> + + <listitem><para>Specialized rules for testing. See + <xref linkend="bbv2.builtins.testing"/>.</para></listitem> + </varlistentry> + + <varlistentry id="bbv2.reference.check-target-builds"> + <indexterm><primary>check-target-builds</primary></indexterm> + <term><literal>check-target-builds</literal></term> + + <listitem><para>The <literal>check-target-builds</literal> 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: + </para> + <programlisting> +rule check-target-builds ( target message ? : true-properties * : false-properties * ) + </programlisting> + + <para>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 available, one has use the following:</para> + <programlisting> +exe app : app.cpp : [ check-target-builds has_foo "System has foo" : <library>foo : <define>FOO_MISSING=1 ] ; + </programlisting> + + <para>For another example, the alias rule can be used to consolidate configuration + choices and make them available to other metatargets, like so:</para> + <programlisting> +alias foobar : : : : [ check-target-builds has_foo "System has foo" : <library>foo : <library>bar ] ; + </programlisting> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>obj</literal></term> + + <listitem><para>Creates an object file. Useful when a single source + file must be compiled with special properties.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>preprocessed</literal></term> + <indexterm><primary>preprocessed</primary></indexterm> + + <listitem><para>Creates an preprocessed source file. The arguments follow the + <link linkend="bbv2.main-target-rule-syntax">common syntax</link>.</para></listitem> + </varlistentry> + + <varlistentry id="bbv2.reference.rules.glob"> + <term><literal>glob</literal></term> + + <listitem><para>The <code>glob</code> rule takes a list shell pattern + and returns the list of files in the project's source directory that + match the pattern. For example: + <programlisting> +lib tools : [ glob *.cpp ] ; + </programlisting> + It is possible to also pass a second argument—the list of + exclude patterns. The result will then include the list of + files matching any of include patterns, and not matching any + of the exclude patterns. For example: + <programlisting> +lib tools : [ glob *.cpp : file_to_exclude.cpp bad*.cpp ] ; + </programlisting> + </para></listitem> + </varlistentry> + + <varlistentry id="bbv2.reference.glob-tree"> + <indexterm><primary>glob-tree</primary></indexterm> + <term><literal>glob-tree</literal></term> + + <listitem><para>The <code>glob-tree</code> is similar to the + <code>glob</code> except that it operates recursively from + the directory of the containing Jamfile. For example: + <programlisting> +ECHO [ glob-tree *.cpp : .svn ] ; + </programlisting> + will print the names of all C++ files in your project. The + <literal>.svn</literal> exclude pattern prevents the + <code>glob-tree</code> rule from entering administrative + directories of the Subversion version control system. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>project</literal></term> + + <listitem><para>Declares project id and attributes, including + project requirements. See <xref linkend="bbv2.overview.projects"/>. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>use-project</literal></term> + + <listitem><para>Assigns a symbolic project ID to a project at + a given path. This rule must be better documented! + </para></listitem> + </varlistentry> + + <varlistentry id="bbv2.reference.rules.explicit"> + <term><literal>explicit</literal></term> + + <listitem><para>The <literal>explicit</literal> rule takes a single + parameter—a list of target names. The named targets will + be marked explicit, and will be built only if they are explicitly + requested on the command line, or if their dependents are built. + Compare this to ordinary targets, that are built implicitly when + their containing project is built.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>always</literal></term> + <indexterm><primary>always building a metatarget</primary></indexterm> + + <listitem><para>The <literal>always</literal> function takes a single + parameter—a list of metatarget names. The top-level targets produced + by the named metatargets will be always considered out of date. Consider this example: + </para> +<programlisting> +exe hello : hello.cpp ; +exe bye : bye.cpp ; +always hello ; +</programlisting> + <para>If a build of <filename>hello</filename> is requested, then the binary will + always be relinked. The object files will not be recompiled, though. Note that if + a build of <filename>hello</filename> is not requested, for example you specify just + <filename>bye</filename> on the command line, <filename>hello</filename> will not + be relinked.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>constant</literal></term> + + <listitem><para>Sets project-wide constant. Takes two + parameters: variable name and a value and makes the specified + variable name accessible in this Jamfile and any child Jamfiles. + For example: + <programlisting> +constant VERSION : 1.34.0 ; + </programlisting> + </para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>path-constant</literal></term> + + <listitem><para>Same as <literal>constant</literal> except that + the value is treated as path relative to Jamfile location. For example, + if <command>b2</command> is invoked in the current directory, + and Jamfile in <filename>helper</filename> subdirectory has: + <programlisting> +path-constant DATA : data/a.txt ; + </programlisting> + then the variable <varname>DATA</varname> will be set to + <literal>helper/data/a.txt</literal>, and if <command>b2</command> + is invoked from the <filename>helper</filename> directory, then + the variable <varname>DATA</varname> will be set to + <literal>data/a.txt</literal>. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>build-project</literal></term> + + <listitem><para>Cause some other project to be built. This rule + takes a single parameter—a directory name relative to + the containing Jamfile. When the containing Jamfile is built, + the project located at that directory will be built as well. + At the moment, the parameter to this rule should be a directory + name. Project ID or general target references are not allowed. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>test-suite</literal></term> + + <listitem><para>This rule is deprecated and equivalent to + <code>alias</code>.</para></listitem> + </varlistentry> + + </variablelist> + + </section> + + <section id="bbv2.overview.builtins.features"> + <title>Builtin features</title> + + <para>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.</para> + + <indexterm><primary>features</primary><secondary>builtin</secondary></indexterm> + + <variablelist> + <varlistentry><term><literal>variant</literal></term> + <indexterm><primary>variant</primary></indexterm> + + <listitem> + <para> + A feature combining several low-level features, making it easy to + request common build configurations. + </para> + + <para> + <emphasis role="bold">Allowed values:</emphasis> + <literal>debug</literal>, <literal>release</literal>, + <literal>profile</literal>. + </para> + + <para> + The value <literal>debug</literal> expands to + </para> + +<programlisting> +<optimization>off <debug-symbols>on <inlining>off <runtime-debugging>on +</programlisting> + + <para> + The value <literal>release</literal> expands to + </para> + +<programlisting> +<optimization>speed <debug-symbols>off <inlining>full <runtime-debugging>off +</programlisting> + + <para> + The value <literal>profile</literal> expands to the same as + <literal>release</literal>, plus: + </para> + +<programlisting> +<profiling>on <debug-symbols>on +</programlisting> + + <para> + Users can define their own build variants using the + <code>variant</code> rule from the <code>common</code> module. + </para> + + <para> + <emphasis role="bold">Note:</emphasis> Runtime debugging is on in + debug builds to suit the expectations of people used to various + IDEs. + <!-- Define "runtime debugging". Why will those people expect it to + be on in debug builds? --> + </para> + </listitem> + </varlistentry> + + <varlistentry id="bbv2.overview.builtins.features.link"> + <term><literal>link</literal></term> + <indexterm><primary>link</primary></indexterm> + + <listitem> + + <para><emphasis role="bold">Allowed values:</emphasis> <literal>shared</literal>, + <literal>static</literal></para> + + <simpara> + A feature controlling how libraries are built. + </simpara> + + </listitem> + </varlistentry> + + <varlistentry id="bbv2.overview.builtins.features.runtime-link"> + <indexterm><primary>runtime linking</primary></indexterm> + <term><literal>runtime-link</literal></term> + + <listitem> + <para><emphasis role="bold">Allowed values:</emphasis> <literal>shared</literal>, + <literal>static</literal></para> + + <simpara> + Controls if a static or shared C/C++ runtime should be used. There + are some restrictions how this feature can be used, for example + on some compilers an application using static runtime should + not use shared libraries at all, and on some compilers, + mixing static and shared runtime requires extreme care. Check + your compiler documentation for more details. + </simpara> + + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>threading</literal></term> + <indexterm><primary>threading</primary></indexterm> + + <listitem> + + <para><emphasis role="bold">Allowed values:</emphasis> <literal>single</literal>, + <literal>multi</literal></para> + + <simpara> + Controls if the project should be built in multi-threaded mode. This feature does not + necessary change code generation in the compiler, but it causes the compiler to link + to additional or different runtime libraries, and define additional preprocessor + symbols (for example, <code>_MT</code> on Windows and <code>_REENTRANT</code> on Linux). + How those symbols affect the compiled code depends on the code itself. + </simpara> + + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>source</literal></term> + <indexterm><primary>source</primary></indexterm> + + <listitem> + <simpara> + The <code><source>X</code> feature has the same effect on + building a target as putting X in the list of sources. It is useful + when you want to add the same source to all targets in the project + (you can put <source> in requirements) or to conditionally + include a source (using conditional requirements, see <xref linkend= + "bbv2.tutorial.conditions"/>). See also the <code><library> + </code> feature. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>library</literal></term> + <indexterm><primary>library</primary></indexterm> + + <listitem> + <simpara> + This feature is almost equivalent to the <code><source></code> + feature, except that it takes effect only for linking. When you want + to link all targets in a Jamfile to certain library, the + <code><library></code> feature is preferred over + <code><source>X</code>—the latter will add the library to + all targets, even those that have nothing to do with libraries. + </simpara> + </listitem> + </varlistentry> + + <varlistentry><term><anchor id="bbv2.builtin.features.dependency"/> + <literal>dependency</literal></term> + <indexterm><primary>dependency</primary></indexterm> + + <listitem> + <simpara> + Introduces a dependency on the target named by the value of this + feature (so it will be brought up-to-date whenever the target being + declared is). The dependency is not used in any other way. + + <!-- + ==================================================================== + An example and a motivation is needed here. Below is some commented + out content that used to be here but did not make any sense and + seems to have been left unfinished in some previous revision. Should + be fixed and this whole feature should be retested and fixed as + needed. + ==================================================================== + For example, in application with plugins, the plugins are not used + when linking the application, application might have a dependency on + its plugins, even though + + and + adds its usage requirements to the build properties + of the target being declared. + + The primary use case is when you want + the usage requirements (such as <code>#include</code> paths) of some + library to be applied, but do not want to link to it. + + It is hard to picture why anyone would want to do that. Please flesh + out this motivation. + ==================================================================== + --> + </simpara> + </listitem> + </varlistentry> + + <varlistentry><term><anchor id="bbv2.builtin.features.implicit-dependency"/> + <literal>implicit-dependency</literal></term> + <indexterm><primary>implicit-dependency</primary></indexterm> + + <listitem> + <simpara> + Indicates that the target named by the value of this feature + may produce files that are included by the sources of the + target being declared. See <xref linkend="bbv2.reference.generated_headers"/> + for more information. + </simpara> + </listitem> + </varlistentry> + + + <varlistentry><term><anchor id="bbv2.builtin.features.use"/> + <literal>use</literal></term> + <indexterm><primary>use</primary></indexterm> + + <listitem> + <simpara> + Introduces a dependency on the target named by the value of this + feature (so it will be brought up-to-date whenever the target being + declared is), and adds its usage requirements to the build + properties + <!-- Do you really mean "to the requirements?" --> + of the target being declared. The dependency is not used in any + other way. The primary use case is when you want the usage + requirements (such as <code>#include</code> paths) of some library + to be applied, but do not want to link to it. + <!-- It is hard to picture why anyone would want to do that. Please + flesh out this motivation. --> + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term><anchor id="bbv2.reference.features.dll-path"/> + <literal>dll-path</literal></term> + <indexterm><primary>dll-path</primary></indexterm> + + <listitem> + <simpara> + Specify an additional directory where the system should + look for shared libraries when the executable or shared + library is run. This feature only affects Unix + compilers. Please see <xref linkend="bbv2.faq.dll-path"/> + in <xref linkend="bbv2.faq"/> for details. + </simpara> + </listitem></varlistentry> + + <varlistentry> + <term><literal>hardcode-dll-paths</literal></term> + <indexterm><primary>hardcode-dll-paths</primary></indexterm> + + <listitem> + <simpara> + Controls automatic generation of dll-path properties. + </simpara> + + <para><emphasis role="bold">Allowed values:</emphasis> + <literal>true</literal>, <literal>false</literal>. This property is + specific to Unix systems. If an executable is built with + <code><hardcode-dll-paths>true</code>, the generated binary + will contain the list of all the paths to the used shared libraries. + As the result, the executable can be run without changing system + paths to shared libraries or installing the libraries to system + paths. This <!-- you need an antecedent. This _what_? --> is very + convenient during development. Please see the <link linkend= + "bbv2.faq.dll-path">FAQ entry</link> for details. Note that on Mac + OSX, the paths are unconditionally hardcoded by the linker, and it + is not possible to disable that behaviour.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>cflags</literal></term> + <term><literal>cxxflags</literal></term> + <term><literal>linkflags</literal></term> + + <listitem> + <simpara> + The value of those features is passed without modification to the + corresponding tools. For <code>cflags</code> that is both the C and + C++ compilers, for <code>cxxflags</code> that is the C++ compiler, + and for <code>linkflags</code> that is the linker. The features are + handy when you are trying to do something special that cannot be + achieved by a higher-level feature in Boost.Build. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>include</literal></term> + <indexterm><primary>include</primary></indexterm> + + <listitem> + <simpara> + Specifies an additional include path that is to be passed to C and + C++ compilers. + </simpara> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>define</literal></term> + <indexterm><primary>define</primary></indexterm> + + <listitem> + <simpara> + Specifies an preprocessor symbol that should be defined on the command + line. You may either specify just the symbol, which will be defined + without any value, or both the symbol and the value, separated by + equal sign. + </simpara> + </listitem> + </varlistentry> + + + <varlistentry><term><literal>warnings</literal></term> + <listitem> + <simpara> + The <code><warnings></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> + <listitem><para><code>all</code> - enables all warnings.</para></listitem> + </itemizedlist> + Default value is <code>all</code>. + </simpara> + </listitem> + </varlistentry> + + <varlistentry><term><literal>warnings-as-errors</literal></term> + <listitem> + <simpara> + The <code><warnings-as-errors></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> + </varlistentry> + + <varlistentry><term><literal>build</literal></term> + + <listitem> + <para><emphasis role="bold">Allowed values:</emphasis> <literal>no</literal></para> + + <para> + The <code>build</code> feature is used to conditionally disable + build of a target. If <code><build>no</code> is in properties + when building a target, build of that target is skipped. Combined + with conditional requirements this allows you to skip building some + target in configurations where the build is known to fail. + </para> + </listitem> + </varlistentry> + + <varlistentry><term><anchor id="bbv2.builtin.features.tag"/><literal>tag</literal></term> + + <listitem><para>The <literal>tag</literal> feature is used to customize + the name of the generated files. The value should have the form: +<programlisting>@<replaceable>rulename</replaceable></programlisting> where + <replaceable>rulename</replaceable> should be a name of a rule with the + following signature: +<programlisting>rule tag ( name : type ? : property-set )</programlisting> + The rule will be called for each target with the default name computed + by Boost.Build, the type of the target, and property set. The rule can + either return a string that must be used as the name of the target, or + an empty string, in which case the default name will be used. + </para> + + <para>Most typical use of the <literal>tag</literal> feature is to + encode build properties, or library version in library target names. You + should take care to return non-empty string from the tag rule only for + types you care about — otherwise, you might end up modifying + names of object files, generated header file and other targets for which + changing names does not make sense.</para> + </listitem> + </varlistentry> + + <varlistentry><term><literal>debug-symbols</literal></term> + + <listitem> + <para><emphasis role="bold">Allowed values:</emphasis> <literal>on</literal>, <literal>off</literal>.</para> + + <para>The <literal>debug-symbols</literal> feature specifies if + produced object files, executables, and libraries should include + debug information. + Typically, the value of this feature is implicitly set by the + <literal>variant</literal> feature, but it can be explicitly + specified by the user. The most common usage is to build + release variant with debugging information.</para> + </listitem> + </varlistentry> + + <varlistentry><term><literal>runtime-debugging</literal></term> + + <listitem> + <para><emphasis role="bold">Allowed values:</emphasis> <literal>on</literal>, <literal>off</literal>.</para> + + <para>The <literal>runtime-debugging</literal> feature specifies + whether 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 + <literal>variant</literal> feature, but it can be explicitly + specified by the user. The most common usage is to build + release variant with debugging output.</para> + </listitem> + </varlistentry> + + <varlistentry><term><literal>target-os</literal></term> + <listitem> + + <anchor id="bbv2.reference.features.target-os"/> + + <para> + The operating system for which the code is to be generated. The + compiler you used should be the compiler for that operating + system. This option causes Boost.Build to use naming conventions + suitable for that operating system, and adjust build process + accordingly. For example, with gcc, it controls if import + libraries are produced for shared libraries or not. + </para> + + <para>The complete list of possible values for this feature is: + aix, appletv, bsd, cygwin, darwin, freebsd, hpux, iphone, linux, netbsd, + openbsd, osf, qnx, qnxnto, sgi, solaris, unix, unixware, windows. + </para> + + <para>See <xref linkend="bbv2.tasks.crosscompile"/> for details of + crosscompilation</para> + + </listitem> + </varlistentry> + + + <varlistentry><term><literal>architecture</literal></term> + <listitem> + + <para> + <emphasis role="bold">Allowed values:</emphasis> + <literal>x86</literal>, + <literal>ia64</literal>, + <literal>sparc</literal>, + <literal>power</literal>, + <literal>mips1</literal>, + <literal>mips2</literal>, + <literal>mips3</literal>, + <literal>mips4</literal>, + <literal>mips32</literal>, + <literal>mips32r2</literal>, + <literal>mips64</literal>, + <literal>parisc</literal>, + <literal>arm</literal>, + <literal>combined</literal>, + <literal>combined-x86-power</literal>. + </para> + + <para>The <literal>architecture</literal> features specifies + the general processor family to generate code for.</para> + + </listitem> + </varlistentry> + + <varlistentry><term><literal>instruction-set</literal></term> + <indexterm><primary>instruction-set</primary></indexterm> + <listitem> + <para> + <emphasis role="bold">Allowed values:</emphasis> depend on the used + toolset. + </para> + + <para>The <literal>instruction-set</literal> specifies for which + specific instruction set the code should be generated. The + code in general might not run on processors with older/different + instruction sets.</para> + + <para>While Boost.Build allows a large set of possible values + for this features, whether a given value works depends on which + compiler you use. Please see + <xref linkend="bbv2.reference.tools.compilers"/> for details. + </para> + + </listitem> + </varlistentry> + + <varlistentry><term><literal>address-model</literal></term> + <indexterm><primary>64-bit compilation</primary></indexterm> + <listitem> + <para><emphasis role="bold">Allowed values:</emphasis> <literal>32</literal>, <literal>64</literal>.</para> + + <para>The <literal>address-model</literal> specifies if 32-bit or + 64-bit code should be generated by the compiler. Whether this feature + works depends on the used compiler, its version, how the compiler is + configured, and the values of the <literal>architecture</literal> + <literal>instruction-set</literal> + features. Please see <xref linkend="bbv2.reference.tools.compilers"/> + for details.</para> + </listitem> + </varlistentry> + + <varlistentry><term><literal>c++-template-depth</literal></term> + <listitem> + <para> + <emphasis role="bold">Allowed values:</emphasis> Any positive + integer. + </para> + + <para> + This feature allows configuring a C++ compiler with the maximal + template instantiation depth parameter. Specific toolsets may or may + not provide support for this feature depending on whether their + compilers provide a corresponding command-line option. + </para> + + <para> + <emphasis role="bold">Note:</emphasis> Due to some internal details + 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 + calling the feature.extend rule. + </para> + </listitem> + </varlistentry> + + <varlistentry><term><literal>embed-manifest</literal></term> + <listitem> + + <indexterm><primary>manifest file</primary><secondary>embedding</secondary></indexterm> + <indexterm><primary>embed-manifest</primary></indexterm> + + <para> + <emphasis role="bold">Allowed values:</emphasis> on, off. + </para> + + <para>This feature is specific to the msvc toolset (see + <xref linkend="bbv2.reference.tools.compiler.msvc"/>), + and controls whether the manifest files should be embedded inside + executables and shared libraries, or placed alongside them. This + feature corresponds to the IDE option found in the project settings dialog, + under <menuchoice><guimenu>Configuration Properties</guimenu> + <guisubmenu>Manifest Tool</guisubmenu> + <guisubmenu>Input and Output</guisubmenu> + <guimenuitem>Embed manifest</guimenuitem> </menuchoice>. + </para> + + </listitem> + </varlistentry> + + <varlistentry><term><literal>embed-manifest-file</literal></term> + <listitem> + + <indexterm><primary>manifest file</primary><secondary>embedding</secondary></indexterm> + <indexterm><primary>embed-manifest-file</primary></indexterm> + + <para>This feature is specific to the msvc toolset (see + <xref linkend="bbv2.reference.tools.compiler.msvc"/>), + 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 <menuchoice><guimenu>Configuration Properties</guimenu> + <guisubmenu>Manifest Tool</guisubmenu> + <guisubmenu>Input and Output</guisubmenu> + <guimenuitem>Additional Manifest Files</guimenuitem> </menuchoice>. + </para> + + </listitem> + </varlistentry> + + + </variablelist> + </section> + + <section id="bbv2.reference.tools"> + <title>Builtin tools</title> + + <para>Boost.Build comes with support for a large number of C++ compilers, + and other tools. This section documents how to use those tools.</para> + + <para>Before using any tool, you must declare your intention, and possibly + specify additional information about the tool's configuration. This is + done by calling the <code>using</code> rule, typically in your + <filename>user-config.jam</filename>, for example:</para> +<programlisting> +using gcc ; +</programlisting> + <para>additional parameters can be passed just like for other rules, for example:</para> +<programlisting> +using gcc : 4.0 : g++-4.0 ; +</programlisting> + + + + <para>The options that can be passed to each tool are documented in the + subsequent sections.</para> + + <section id="bbv2.reference.tools.compilers"> + + <title>C++ Compilers</title> + + <para>This section lists all Boost.Build modules that support C++ + compilers and documents how each one can be initialized. The name + of support module for compiler is also the value for + the <code>toolset</code> feature that can be used to explicitly + request that compiler. </para> + + <section id="bbv2.reference.tools.compiler.gcc"> + + <title>GNU C++</title> + + <para>The <code>gcc</code> module supports the + <ulink url="http://gcc.gnu.org">GNU C++ compiler</ulink> + on Linux, a number of Unix-like system including SunOS and on Windows + (either <ulink url="http://www.cygwin.com">Cygwin</ulink> or + <ulink url="http://www.mingw.org">MinGW</ulink>). On Mac OSX, it is recommended + to use system gcc, see <xref linkend="bbv2.reference.tools.compiler.darwin"/>. + </para> + + <para>The <code>gcc</code> module is initialized using the following + syntax:</para> + <programlisting> +using gcc : &toolset_ops; ;</programlisting> + + &using_repeation; + + <!-- FIXME: mention everywhere what is the semantic + of version is --> + + <para> + If the version is not explicitly specified, it will be + automatically detected by running the compiler with the <code>-v</code> + option. If the command is not specified, the <command>g++</command> + binary will be searched in <envar>PATH</envar>.</para> + + &option_list_intro; + <variablelist> + + <xi:include href="fragments.xml" xpointer="xpointer(id('common_options')/*)" + parse="xml"/> + + <xi:include href="fragments.xml" xpointer="xpointer(id('root_option')/*)" + parse="xml"/> + + <varlistentry> + <term><literal>archiver</literal></term> + + <listitem> + <para>Specifies the archiver command that is used to produce static + libraries. Normally, it is autodetected using gcc + <command>-print-prog-name</command> option or defaulted to <command>ar</command>, + but in some cases you might want to override it, for example to explicitly + use a system version instead of one included with gcc.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>ranlib</literal></term> + + <listitem> + <para>Specifies the ranlib command that is used to generated symbol table + for static libraries. Normally, it is autodetected using gcc + <command>-print-prog-name</command> option or defaulted to <command>ranlib</command>, + but in some cases you might want to override it, for example to explicitly + use a system version instead of one included with gcc.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>rc</literal></term> + + <listitem> + <para>Specifies the resource compiler command + that will be used with the version of gcc that is being + configured. This setting makes sense only for Windows and only + if you plan to use resource files. By + default <command>windres</command> will be used.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>rc-type</literal></term> + + <listitem> + <para>Specifies the type of resource compiler. The value can + be either <code>windres</code> for msvc resource compiler, + or <code>rc</code> for borland's resource compiler.</para> + </listitem> + </varlistentry> + + </variablelist> + + <indexterm><primary>64-bit compilation</primary> + <secondary>gcc</secondary></indexterm> + + In order to compile 64-bit applications, you have to specify + <code>address-model=64</code>, and the <code>instruction-set</code> + feature should refer to a 64 bit processor. Currently, those + include <literal>nocona</literal>, <literal>opteron</literal>, + <literal>athlon64</literal> and <literal>athlon-fx</literal>. + + </section> + + <section id="bbv2.reference.tools.compiler.darwin"> + + <title>Apple Darwin gcc</title> + + <para>The <code>darwin</code> module supports the version of gcc that is + modified and provided by Apple. The configuration is essentially identical + to that of the gcc module. + </para> + + <para> + <indexterm><primary>fat binaries</primary></indexterm> + 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 + on Intel and PowerPC processors, specify + <code>architecture=combined</code>. To build a binary that can run + both in 32-bit and 64-bit modes, specify + <code>address-model=32_64</code>. If you specify both of those + properties, a "4-way" fat binary will be generated. + </para> + + </section> + + <section id="bbv2.reference.tools.compiler.msvc"> + + <title>Microsoft Visual C++</title> + + <para>The <code>msvc</code> module supports the + <ulink url="http://msdn.microsoft.com/visualc/">Microsoft Visual + C++</ulink> command-line tools on Microsoft Windows. The supported + products and versions of command line tools are listed below:</para> + <itemizedlist> + <listitem><para>Visual Studio 2015—14.0</para></listitem> + <listitem><para>Visual Studio 2013—12.0</para></listitem> + <listitem><para>Visual Studio 2012—11.0</para></listitem> + <listitem><para>Visual Studio 2010—10.0</para></listitem> + <listitem><para>Visual Studio 2008—9.0</para></listitem> + <listitem><para>Visual Studio 2005—8.0</para></listitem> + <listitem><para>Visual Studio .NET 2003—7.1</para></listitem> + <listitem><para>Visual Studio .NET—7.0</para></listitem> + <listitem><para>Visual Studio 6.0, Service Pack 5—6.5</para></listitem> + </itemizedlist> + + <para>The <code>msvc</code> module is initialized using the following + syntax:</para> + <programlisting> +using msvc : &toolset_ops; ; + </programlisting> + &using_repeation; + <para>If the version is not explicitly specified, the most recent + version found in the registry will be used instead. If the special + value <code>all</code> is passed as the version, all versions found in + the registry will be configured. If a version is specified, but the + command is not, the compiler binary will be searched in standard + installation paths for that version, followed by <envar>PATH</envar>. + </para> + + <para>The compiler command should be specified using forward slashes, + and quoted.</para> + + &option_list_intro; + <variablelist> + + <xi:include href="fragments.xml" xpointer="xpointer(id('common_options')/*)" + parse="xml"/> + + <varlistentry> + <term><literal>assembler</literal></term> + + <listitem><para>The command that compiles assembler sources. If + not specified, <command>ml</command> will be used. The command + will be invoked after the setup script was executed and adjusted + the <envar>PATH</envar> variable.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>compiler</literal></term> + + <listitem><para>The command that compiles C and C++ sources. If + not specified, <command>cl</command> will be used. The command + will be invoked after the setup script was executed and adjusted + the <envar>PATH</envar> variable.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>compiler-filter</literal></term> + + <listitem><para>Command through which to pipe the output of + running the compiler. For example to pass the output to STLfilt. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>idl-compiler</literal></term> + + <listitem><para>The command that compiles Microsoft COM interface + definition files. If not specified, <command>midl</command> will + be used. The command will be invoked after the setup script was + executed and adjusted the <envar>PATH</envar> variable.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>linker</literal></term> + + <listitem><para>The command that links executables and dynamic + libraries. If not specified, <command>link</command> will be used. + The command will be invoked after the setup script was executed + and adjusted the <envar>PATH</envar> variable.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>mc-compiler</literal></term> + + <listitem><para>The command that compiles Microsoft message + catalog files. If not specified, <command>mc</command> will be + used. The command will be invoked after the setup script was + executed and adjusted the <envar>PATH</envar> variable.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>resource-compiler</literal></term> + + <listitem><para>The command that compiles resource files. If not + specified, <command>rc</command> will be used. The command will be + invoked after the setup script was executed and adjusted the + <envar>PATH</envar> variable.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>setup</literal></term> + + <listitem><para>The filename of the global environment setup + script to run before invoking any of the tools defined in this + toolset. Will not be used in case a target platform specific + script has been explicitly specified for the current target + platform. Used setup script will be passed the target platform + identifier (x86, x86_amd64, x86_ia64, amd64 or ia64) as a + parameter. If not specified a default script is chosen based on the + used compiler binary, e.g. <command>vcvars32.bat</command> or + <command>vsvars32.bat</command>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><literal>setup-amd64</literal></term> + <term><literal>setup-i386</literal></term> + <term><literal>setup-ia64</literal></term> + + <listitem><para>The filename of the target platform specific + environment setup script to run before invoking any of the tools + defined in this toolset. If not specified the global environment + setup script is used.</para></listitem> + </varlistentry> + </variablelist> + + <section id="v2.reference.tools.compiler.msvc.64"> + <title>64-bit support</title> + + <indexterm><primary>64-bit compilation</primary> + <secondary>Microsoft Visual Studio</secondary></indexterm> + + <para>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):</para> + + <itemizedlist> + <listitem><para>32-bit x86 host, 32-bit x86 target</para> + </listitem> + <listitem><para>32-bit x86 host, 64-bit AMD64 target</para> + </listitem> + <listitem><para>32-bit x86 host, 64-bit IA64 target</para> + </listitem> + <listitem><para>64-bit AMD64 host, 64-bit AMD64 target</para> + </listitem> + <listitem><para>64-bit IA64 host, 64-bit IA64 target</para> + </listitem> + </itemizedlist> + <para> + The 32-bit host compilers can be always used, even on 64-bit + Windows. On the contrary, 64-bit host compilers require both 64-bit + host processor and 64-bit Windows, but can be faster. By default, + only 32-bit host, 32-bit target compiler is installed, and + additional compilers need to be installed explicitly. + </para> + + <para>To use 64-bit compilation you should:</para> + <orderedlist> + <listitem><para>Configure you compiler as usual. If you provide a + path to the compiler explicitly, provide the path to the 32-bit + compiler. If you try to specify the path to any of 64-bit + compilers, configuration will not work.</para></listitem> + + <listitem><para>When compiling, use <code>address-model=64</code>, + to generate AMD64 code.</para></listitem> + + <listitem><para>To generate IA64 code, use + <code>architecture=ia64</code></para></listitem> + </orderedlist> + + <para>The (AMD64 host, AMD64 target) compiler will be used + automatically when you are generating AMD64 code and are running + 64-bit Windows on AMD64. The (IA64 host, IA64 target) compiler will + never be used, since nobody has an IA64 machine to test.</para> + + <para>It is believed that AMD64 and EM64T targets are essentially + compatible. The compiler options <code>/favor:AMD64</code> and + <code>/favor:EM64T</code>, which are accepted only by AMD64 + targeting compilers, cause the generated code to be tuned to a + specific flavor of 64-bit x86. Boost.Build will make use of those + options depending on the value of the<code>instruction-set</code> + feature.</para> + </section> + + <section id="v2.reference.tools.compiler.msvc.winrt"> + <title>Windows Runtime support</title> + + <indexterm><primary>Windows Runtime support</primary> + <secondary>Microsoft Visual Studio</secondary></indexterm> + + <para> + 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 <literal>windows-api</literal> feature. + Available options are <literal>desktop</literal>, + <literal>store</literal>, or <literal>phone</literal>. If not + specified, <literal>desktop</literal> will be used. + </para> + + <para> + When using <literal>store</literal> or <literal>phone</literal> + the specified toolset determines what Windows version is + targeted. The following options are available: + </para> + + <itemizedlist> + <listitem><para>Windows 8.0: toolset=msvc-11.0 windows-api=store</para> + </listitem> + <listitem><para>Windows 8.1: toolset=msvc-12.0 windows-api=store</para> + </listitem> + <listitem><para>Windows Phone 8.0: toolset=msvc-11.0 windows-api=phone</para> + </listitem> + <listitem><para>Windows Phone 8.1: toolset=msvc-12.0 windows-api=phone</para> + </listitem> + </itemizedlist> + + <para> + For example use the following to build for Windows Store 8.1 + with the ARM architecture: + </para> + <programlisting> +.\b2 toolset=msvc-12.0 windows-api=store architecture=arm</programlisting> + + <para> + 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 + <ulink url="http://blogs.msdn.com/b/vcblog/archive/2014/07/18/using-boost-libraries-in-windows-store-and-phone-applications.aspx">here</ulink>. + </para> + + </section> + </section> + + <section id="bbv2.reference.tools.compiler.intel"> + + <title>Intel C++</title> + + <para>The <code>intel-linux</code> and <code>intel-win</code> modules + support the Intel C++ command-line compiler—the <ulink url= + "http://www.intel.com/software/products/compilers/clin/index.htm">Linux</ulink> + and <ulink url= + "http://www.intel.com/cd/software/products/asmo-na/eng/compilers/284527.htm"> + Windows</ulink> versions respectively.</para> + + <para>The module is initialized using the following syntax:</para> + <programlisting> +using intel-linux : &toolset_ops; ;</programlisting> + <para>or</para> + <programlisting> +using intel-win : &toolset_ops; ;</programlisting> + <para>respectively.</para> + + &using_repeation; + + <para> + If compiler command is not specified, then Boost.Build will + look in <envar>PATH</envar> for an executable <command>icpc</command> + (on Linux), or <command>icc.exe</command> (on Windows). + </para> + + &option_list_intro; + <variablelist> + + <xi:include href="fragments.xml" xpointer="xpointer(id('common_options')/*)" + parse="xml"/> + + </variablelist> + + <para>The Linux version supports the following additional options:</para> + <variablelist> + + <xi:include href="fragments.xml" xpointer="xpointer(id('root_option')/*)" + parse="xml"/> + + </variablelist> + + <!-- the compatibility option appears to be messed up --> + + </section> + + <section id="bbv2.reference.tools.compiler.acc"> + + <title>HP aC++ compiler</title> + + <para>The <code>acc</code> module supports the +<ulink url="http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,1740,00.html">HP aC++ compiler</ulink> + for the HP-UX operating system.</para> + + <para>The module is initialized using the following + syntax:</para> + <programlisting> +using acc : &toolset_ops; ;</programlisting> + + &using_repeation; + + + <para> + If the command is not specified, the <command>aCC</command> + binary will be searched in <envar>PATH</envar>.</para> + + &option_list_intro; + <variablelist> + <xi:include href="fragments.xml" xpointer="xpointer(id('common_options')/*)" + parse="xml"/> + </variablelist> + + </section> + + <section id="bbv2.reference.tools.compiler.borland"> + + <title>Borland C++ Compiler</title> + + <para>The <code>borland</code> module supports the command line + C++ compiler included in + <ulink url="http://www.borland.com/us/products/cbuilder/index.html">C++ Builder 2006</ulink> + product and earlier version of it, running on Microsoft Windows.</para> + + <para>The supported products are listed below. The version reported + by the command lines tools is also listed for reference.:</para> + <itemizedlist> + <listitem><para>C++ Builder 2006—5.8.2</para></listitem> + <listitem><para>CBuilderX—5.6.5, 5.6.4 (depending on release)</para></listitem> + <listitem><para>CBuilder6—5.6.4</para></listitem> + <listitem><para>Free command line tools—5.5.1</para></listitem> + </itemizedlist> + + <para>The module is initialized using the following syntax:</para> + <programlisting> +using borland : &toolset_ops; ;</programlisting> + + &using_repeation; + + <para>If the command is not specified, Boost.Build will search for + a binary named <command>bcc32</command> in <envar>PATH</envar>.</para> + + &option_list_intro; + <variablelist> + <xi:include href="fragments.xml" xpointer="xpointer(id('common_options')/*)" + parse="xml"/> + </variablelist> + + </section> + + <section id="bbv2.reference.tools.compiler.como"> + + <title>Comeau C/C++ Compiler</title> + + <para>The <code>como-linux</code> and the <code>como-win</code> + modules supports the + <ulink url="http://www.comeaucomputing.com/">Comeau C/C++ Compiler</ulink> + on Linux and Windows respectively.</para> + + <para>The module is initialized using the following syntax:</para> + <programlisting> +using como-linux : &toolset_ops; ;</programlisting> + + &using_repeation; + + <para>If the command is not specified, Boost.Build will search for + a binary named <command>como</command> in + <envar>PATH</envar>.</para> + + &option_list_intro; + <variablelist> + <xi:include href="fragments.xml" xpointer="xpointer(id('common_options')/*)" + parse="xml"/> + </variablelist> + + <para>Before using the Windows version of the compiler, you need to + setup necessary environment variables per compiler's documentation. In + particular, the <envar>COMO_XXX_INCLUDE</envar> variable should be + set, where <envar>XXX</envar> corresponds to the used backend C + compiler.</para> + </section> + + <section id="bbv2.reference.tools.compiler.cw"> + + <title>Code Warrior</title> + + <para>The <code>cw</code> module support CodeWarrior compiler, + originally produced by Metrowerks and presently developed by + Freescale. Boost.Build supports only the versions of the compiler that + target x86 processors. All such versions were released by Metrowerks + before acquisition and are not sold any longer. The last version known + to work is 9.4.</para> + + <para>The module is initialized using the following syntax:</para> + <programlisting> +using cw : &toolset_ops; ;</programlisting> + + &using_repeation; + + <para>If the command is not specified, Boost.Build will search for a + binary named <command>mwcc</command> in default installation paths and + in <envar>PATH</envar>.</para> + + &option_list_intro; + <variablelist> + + <xi:include href="fragments.xml" xpointer="xpointer(id('common_options')/*)" + parse="xml"/> + + <xi:include href="fragments.xml" xpointer="xpointer(id('root_option')/*)" + parse="xml"/> + + <varlistentry> + <term><literal>setup</literal></term> + + <listitem><para>The command that sets up environment variables + prior to invoking the compiler. If not specified, + <command>cwenv.bat</command> alongside the compiler binary + will be used.</para> + </listitem> + </varlistentry> + + + <varlistentry> + <term><literal>compiler</literal></term> + + <listitem><para>The command that compiles C and C++ sources. + If not specified, <command>mwcc</command> will be used. The + command will be invoked after the setup script was + executed and adjusted the <envar>PATH</envar> variable.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>linker</literal></term> + + <listitem><para>The command that links executables and dynamic + libraries. + If not specified, <command>mwld</command> will be used. The + command will be invoked after the setup script was + executed and adjusted the <envar>PATH</envar> variable.</para> + </listitem> + </varlistentry> + + </variablelist> + + </section> + + <section id="bbv2.reference.tools.compiler.dmc"> + + <title>Digital Mars C/C++ Compiler</title> + + <para>The <code>dmc</code> module supports the + <ulink url="http://www.digitalmars.com/">Digital Mars C++ compiler.</ulink> + </para> + + <para>The module is initialized using the following syntax:</para> + <programlisting> +using dmc : &toolset_ops; ;</programlisting> + + &using_repeation; + + <para>If the command is not specified, Boost.Build will search for + a binary named <command>dmc</command> in + <envar>PATH</envar>.</para> + + &option_list_intro; + <variablelist> + <xi:include href="fragments.xml" xpointer="xpointer(id('common_options')/*)" + parse="xml"/> + </variablelist> + + </section> + + <section id="bbv2.reference.tools.compiler.hp_cxx"> + + <title>HP C++ Compiler for Tru64 Unix</title> + + <para>The <code>hp_cxx</code> modules supports the + <ulink url="http://h30097.www3.hp.com/cplus/?jumpid=reg_R1002_USEN"> + HP C++ Compiler</ulink> for Tru64 Unix.</para> + + <para>The module is initialized using the following syntax:</para> + <programlisting> +using hp_cxx : &toolset_ops; ;</programlisting> + + &using_repeation; + + <para>If the command is not specified, Boost.Build will search for + a binary named <command>hp_cxx</command> in <envar>PATH</envar>.</para> + + &option_list_intro; + <variablelist> + <xi:include href="fragments.xml" xpointer="xpointer(id('common_options')/*)" + parse="xml"/> + </variablelist> + + </section> + + <section id="bbv2.reference.tools.compiler.sun"> + + <title>Sun Studio</title> + + <para>The <code>sun</code> module supports the + <ulink url="http://developers.sun.com/sunstudio/index.jsp"> + Sun Studio</ulink> C++ compilers for the Solaris OS.</para> + + <para>The module is initialized using the following syntax:</para> + <programlisting> +using sun : &toolset_ops; ;</programlisting> + + &using_repeation; + + <para>If the command is not specified, Boost.Build will search for + a binary named <command>CC</command> + in <filename>/opt/SUNWspro/bin</filename> and in + <envar>PATH</envar>.</para> + + <para>When using this compiler on complex C++ code, such as the + <ulink url="http://boost.org">Boost C++ library</ulink>, it is + recommended to specify the following options when initializing the + <code>sun</code> module: + <screen> +-library=stlport4 -features=tmplife -features=tmplrefstatic + </screen> See the <ulink url="http://blogs.sun.com/sga/entry/command_line_options"> + Sun C++ Frontend Tales</ulink> for details.</para> + + &option_list_intro; + <variablelist> + <xi:include href="fragments.xml" xpointer="xpointer(id('common_options')/*)" + parse="xml"/> + </variablelist> + + <indexterm><primary>64-bit compilation</primary> + <secondary>Sun Studio</secondary></indexterm> + Starting with Sun Studio 12, you can create 64-bit applications + by using the <code>address-model=64</code> property. + + </section> + + <section id="bbv2.reference.tools.compiler.vacpp"> + + <title>IBM Visual Age</title> + <para>The <code>vacpp</code> module supports the + <ulink url="http://www.ibm.com/software/ad/vacpp">IBM Visual + Age</ulink> C++ Compiler, for the AIX operating system. Versions + 7.1 and 8.0 are known to work.</para> + + <para>The module is initialized using the following + syntax:</para> + <programlisting> +using vacpp ;</programlisting> + + <para>The module does not accept any initialization options. The + compiler should be installed in the <filename>/usr/vacpp/bin</filename> + directory.</para> + + <para>Later versions of Visual Age are known as XL C/C++. They + were not tested with the the <code>vacpp</code> module.</para> + + </section> + + </section> + + <section> + <title>Third-party libraries</title> + + <para>Boost.Build provides special support for some + third-party C++ libraries, documented below.</para> + + <section id="bbv2.reference.tools.libraries.stlport"> + <title>STLport library</title> + <indexterm><primary>STLport</primary></indexterm> + + <para>The <ulink url="http://stlport.org">STLport</ulink> library + is an alternative implementation of C++ runtime library. Boost.Build + supports using that library on Windows platform. Linux is + hampered by different naming of libraries in each STLport + version and is not officially supported.</para> + + <para>Before using STLport, you need to configure it in + <filename>user-config.jam</filename> using the following syntax: + </para> + <programlisting> +using stlport : <optional><replaceable>version</replaceable></optional> : <replaceable>header-path</replaceable> : <optional><replaceable>library-path</replaceable></optional> ; +</programlisting> + <para> + Where <replaceable>version</replaceable> is the version of + STLport, for example <literal>5.1.4</literal>, + <replaceable>headers</replaceable> is the location where + STLport headers can be found, and <replaceable>libraries</replaceable> + is the location where STLport libraries can be found. + The version should always be provided, and the library path should + be provided if you're using STLport's implementation of + iostreams. Note that STLport 5.* always uses its own iostream + implementation, so the library path is required. + </para> + + <para>When STLport is configured, you can build with STLport by + requesting <literal>stdlib=stlport</literal> on the command line. + </para> + + </section> + + <section id="bbv2.reference.tools.libraries.zlib"> + <title>zlib</title> + <indexterm><primary>zlib</primary></indexterm> + + <para>Provides support for the + <ulink url="http://www.zlib.net">zlib</ulink> library. zlib + can be configured either to use precompiled binaries or to + build the library from source.</para> + + <para>zlib can be initialized using the following syntax</para> + <programlisting> +using zlib : <optional><replaceable>version</replaceable></optional> : <optional><replaceable>options</replaceable></optional> : <optional><replaceable>condition</replaceable></optional> : <optional><replaceable>is-default</replaceable></optional> ; + </programlisting> + <para>Options for using a prebuilt library:</para> + <variablelist> + <varlistentry> + <term><literal>search</literal></term> + <listitem> + <para>The directory containing the zlib binaries.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>name</literal></term> + <listitem> + <para>Overrides the default library name.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>include</literal></term> + <listitem> + <para>The directory containing the zlib headers.</para> + </listitem> + </varlistentry> + </variablelist> + <para>If none of these options is specified, then the environmental + variables ZLIB_LIBRARY_PATH, ZLIB_NAME, and ZLIB_INCLUDE will be + used instead.</para> + <para>Options for building zlib from source:</para> + <variablelist> + <varlistentry> + <term><literal>source</literal></term> + <listitem> + <para>The zlib source directory. Defaults to the + environmental variable ZLIB_SOURCE.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>tag</literal></term> + <listitem> + <para>Sets the <link linkend="bbv2.builtin.features.tag">tag</link> + property to adjust the file name of the library. Ignored + when using precompiled binaries.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>build-name</literal></term> + <listitem> + <para>The base name to use for the compiled library. + Ignored when using precompiled binaries.</para> + </listitem> + </varlistentry> + </variablelist> + <para>Examples:</para> + <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 ; +</programlisting> + </section> + + </section> + + <section> + <title>Documentation tools</title> + + <para>Boost.Build support for the Boost documentation tools is + documented below. + </para> + + <section id="bbv2.reference.tools.doc.xsltproc"> + <title>xsltproc</title> + <indexterm><primary>xsltproc</primary></indexterm> + + <para>To use xsltproc, you first need to configure it using the following syntax:</para> + <programlisting> +using xsltproc : <optional><replaceable>xsltproc</replaceable></optional> ; +</programlisting> + <para> + Where <replaceable>xsltproc</replaceable> is the xsltproc executable. + If <replaceable>xsltproc</replaceable> is not specified, and the + variable XSLTPROC is set, the value of XSLTPROC will be used. + Otherwise, xsltproc will be searched for in PATH. + </para> + + + &option_list_intro; + <variablelist> + + <varlistentry> + <indexterm><primary>xsl:param</primary></indexterm> + <term><literal>xsl:param</literal></term> + <listitem> + <para>Values should have the form + <replaceable>name</replaceable>=<replaceable>value</replaceable></para> + </listitem> + </varlistentry> + + <varlistentry> + <indexterm><primary>xsl:path</primary></indexterm> + <term><literal>xsl:path</literal></term> + <listitem> + <para>Sets an additional search path for xi:include elements.</para> + </listitem> + </varlistentry> + + <varlistentry> + <indexterm><primary>catalog</primary></indexterm> + <term><literal>catalog</literal></term> + <listitem> + <para>A catalog file used to rewrite remote URL's to a local copy.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>The xsltproc module provides the following rules. Note that + these operate on jam targets and are intended to be used by another + toolset, such as boostbook, rather than directly by users. + </para> + <variablelist> + + <varlistentry> + <indexterm><primary>xslt</primary></indexterm> + <term><literal>xslt</literal></term> + <listitem> + <programlisting> +rule xslt ( target : source stylesheet : properties * ) +</programlisting> + <para>Runs xsltproc to create a single output file.</para> + </listitem> + </varlistentry> + + <varlistentry> + <indexterm><primary>xslt-dir</primary></indexterm> + <term><literal>xslt-dir</literal></term> + <listitem> + <programlisting> +rule xslt-dir ( target : source stylesheet : properties * : dirname ) +</programlisting> + <para>Runs xsltproc to create multiple outputs in a directory. + <literal>dirname</literal> is unused, but exists for + historical reasons. The output directory is determined from the + target. + </para> + </listitem> + </varlistentry> + + </variablelist> + + </section> + + <section id="bbv2.reference.tools.doc.boostbook"> + <title>boostbook</title> + <indexterm><primary>boostbook</primary><secondary>module</secondary></indexterm> + + <para>To use boostbook, you first need to configure it using the following syntax:</para> + <programlisting> +using boostbook : <optional><replaceable>docbook-xsl-dir</replaceable></optional> : <optional><replaceable>docbook-dtd-dir</replaceable></optional> : <optional><replaceable>boostbook-dir</replaceable></optional> ; +</programlisting> + <para> + <replaceable>docbook-xsl-dir</replaceable> is the DocBook XSL stylesheet + directory. If not provided, we use DOCBOOK_XSL_DIR from the environment + (if available) or look in standard locations. Otherwise, we let the + XML processor load the stylesheets remotely. + </para> + + <para> + <replaceable>docbook-dtd-dir</replaceable> is the DocBook DTD directory. + If not provided, we use DOCBOOK_DTD_DIR From the environment (if + available) or look in standard locations. Otherwise, we let the XML + processor load the DTD remotely. + </para> + + <para> + <replaceable>boostbook-dir</replaceable> is the BoostBook directory + with the DTD and XSL subdirs. + </para> + + <para>The boostbook module depends on xsltproc. For pdf or ps output, + it also depends on fop. + </para> + + &option_list_intro; + <variablelist> + + <varlistentry> + <indexterm><primary>format</primary></indexterm> + <indexterm><primary>html</primary></indexterm> + <indexterm><primary>xhtml</primary></indexterm> + <indexterm><primary>htmlhelp</primary></indexterm> + <indexterm><primary>onehtml</primary></indexterm> + <indexterm><primary>man</primary></indexterm> + <indexterm><primary>pdf</primary></indexterm> + <indexterm><primary>ps</primary></indexterm> + <indexterm><primary>docbook</primary></indexterm> + <indexterm><primary>fo</primary></indexterm> + <indexterm><primary>tests</primary></indexterm> + <term><literal>format</literal></term> + <listitem> + <para> + <emphasis role="bold">Allowed values:</emphasis> + <literal>html</literal>, <literal>xhtml</literal>, + <literal>htmlhelp</literal>, <literal>onehtml</literal>, + <literal>man</literal>, <literal>pdf</literal>, + <literal>ps</literal>, <literal>docbook</literal>, + <literal>fo</literal>, <literal>tests</literal>. + </para> + + + <para>The <literal>format</literal> feature determines the type + of output produced by the boostbook rule.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>The boostbook module defines a rule for creating a target + following the common syntax.</para> + + <variablelist> + + <varlistentry> + <indexterm><primary>boostbook</primary><secondary>rule</secondary></indexterm> + <term><literal>boostbook</literal></term> + <listitem> + <programlisting> +rule boostbook ( target-name : sources * : requirements * : default-build * ) +</programlisting> + <para>Creates a boostbook target.</para> + </listitem> + </varlistentry> + + </variablelist> + + </section> + + <section id="bbv2.reference.tools.doc.doxygen"> + <title>doxygen</title> + <indexterm><primary>doxygen</primary></indexterm> + + <para>To use doxygen, you first need to configure it using the following syntax:</para> + <programlisting> +using doxygen : <optional><replaceable>name</replaceable></optional> ; +</programlisting> + <para> + <replaceable>name</replaceable> is the doxygen command. + If it is not specified, it will be found in the PATH. + </para> + + <para>The doxygen module depends on the boostbook module when + generating BoostBook XML. + </para> + + &option_list_intro; + <variablelist> + + <varlistentry> + <indexterm><primary>doxygen:param</primary></indexterm> + <term><literal>doxygen:param</literal></term> + <listitem> + <para>All the values of <literal>doxygen:param</literal> + are added to the doxyfile.</para> + </listitem> + </varlistentry> + + <varlistentry> + <indexterm><primary>prefix</primary></indexterm> + <term><literal>prefix</literal></term> + <listitem> + <para>Specifies the common prefix of all headers + when generating BoostBook XML. Everything before + this will be stripped off. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <indexterm><primary>reftitle</primary></indexterm> + <term><literal>reftitle</literal></term> + <listitem> + <para>Specifies the title of the library-reference section, + when generating BoostBook XML.</para> + </listitem> + </varlistentry> + + <varlistentry> + <indexterm><primary>doxygen:xml-imagedir</primary></indexterm> + <term><literal>doxygen:xml-imagedir</literal></term> + <listitem> + <para>When generating BoostBook XML, specifies the + directory in which to place the images generated + from LaTex formulae.</para> + <warning><para>The path is interpreted relative to the + current working directory, not relative to the Jamfile. + This is necessary to match the behavior of BoostBook. + </para></warning> + </listitem> + </varlistentry> + + </variablelist> + + <para>The doxygen module defines a rule for creating a target + following the common syntax.</para> + + <variablelist> + + <varlistentry> + <indexterm><primary>doxygen</primary><secondary>rule</secondary></indexterm> + <term><literal>doxygen</literal></term> + <listitem> + <programlisting> +rule doxygen ( target : sources * : requirements * : default-build * : usage-requirements * ) +</programlisting> + <para>Creates a doxygen target. If the target name + ends with .html, then this will generate an html + directory. Otherwise it will generate BoostBook XML. + </para> + </listitem> + </varlistentry> + + </variablelist> + + </section> + + <section id="bbv2.reference.tools.doc.quickbook"> + <title>quickbook</title> + <indexterm><primary>quickbook</primary></indexterm> + + <para>The quickbook module provides a generator to convert from + Quickbook to BoostBook XML.</para> + + <para>To use quickbook, you first need to configure it using the following syntax:</para> + <programlisting> +using quickbook : <optional><replaceable>command</replaceable></optional> ; +</programlisting> + <para> + <replaceable>command</replaceable> is the quickbook executable. + If it is not specified, Boost.Build will compile it from source. + If it is unable to find the source it will search for a quickbook + executable in PATH. + </para> + + </section> + + <section id="bbv2.reference.tools.doc.fop"> + <title>fop</title> + <indexterm><primary>fop</primary></indexterm> + + <para>The fop module provides generators to convert from + XSL formatting objects to Postscript and PDF.</para> + + <para>To use fop, you first need to configure it using the following syntax:</para> + <programlisting> +using fop : <optional><replaceable>fop-command</replaceable></optional> : <optional><replaceable>java-home</replaceable></optional> : <optional><replaceable>java</replaceable></optional> ; +</programlisting> + <para> + <replaceable>fop-command</replaceable> is the command to run fop. + If it is not specified, Boost.Build will search for it in PATH and + FOP_HOME. + </para> + <para> + Either <replaceable>java-home</replaceable> or + <replaceable>java</replaceable> + can be used to specify where to find java. + </para> + + </section> + + </section> + + </section> + + <section id="bbv2.reference.modules"> + <title>Builtin modules</title> + + <para> + This section describes the modules that are provided + by Boost.Build. The import rule allows rules from + one module to be used in another module or Jamfile. + </para> + + <section id="bbv2.reference.modules.modules"> + <title>modules</title> + <indexterm><primary>modules</primary></indexterm> + + <para> + The <code>modules</code> module defines basic functionality + for handling modules. + </para> + + <para> + A module defines a number of rules that can be used in other + modules. Modules can contain code at the top level to initialize + the module. This code is executed the first time the + module is loaded. + <note> + <para> + A Jamfile is a special kind of module which is managed by + the build system. Although they cannot be loaded directly + by users, the other features of modules are still useful + for Jamfiles. + </para> + </note> + </para> + + <para> + Each module has its own namespaces for variables and rules. If two + modules A and B both use a variable named X, each one gets its own + copy of X. They won't interfere with each other in any way. + Similarly, importing rules into one module has no effect on any other + module. + </para> + + <para> + Every module has two special variables. + <code>$(__file__)</code> contains the name of the file that + the module was loaded from and <code>$(__name__)</code> + contains the name of the module. + <note><para><code>$(__file__)</code> does not contain + the full path to the file. If you need this, use + <code>modules.binding</code>.</para></note> + </para> + + <orderedlist> + + <listitem id="bbv2.reference.modules.modules.binding"> + <indexterm zone="bbv2.reference.modules.modules.binding"><primary>binding</primary></indexterm> + <code language="jam">rule binding ( module-name )</code> + <para>Returns the filesystem binding of the given module.</para> + <para>For example, a module can get its own location with: + <programlisting language="jam">me = [ modules.binding $(__name__) ] ;</programlisting> + </para> + </listitem> + + <listitem id="bbv2.reference.modules.modules.poke"> + <indexterm zone="bbv2.reference.modules.modules.poke"><primary>poke</primary></indexterm> + <code language="jam">rule poke ( module-name ? : variables + : value * )</code> + <para>Sets the module-local value of a variable.</para> + <para>For example, to set a variable in the global module: + <programlisting language="jam">modules.poke : ZLIB_INCLUDE : /usr/local/include ;</programlisting> + </para> + </listitem> + + <listitem id="bbv2.reference.modules.modules.peek"> + <indexterm zone="bbv2.reference.modules.modules.peek"><primary>peek</primary></indexterm> + <code language="jam">rule peek ( module-name ? : variables + )</code> + <para>Returns the module-local value of a variable.</para> + <para> + For example, to read a variable from the global module: + <programlisting language="jam">local ZLIB_INCLUDE = [ modules.peek : ZLIB_INCLUDE ] ;</programlisting> + </para> + </listitem> + + <listitem id="bbv2.reference.modules.modules.call-in"> + <indexterm zone="bbv2.reference.modules.modules.call-in"><primary>call-in</primary></indexterm> + <code language="jam">rule call-in ( module-name ? : rule-name args * : * ) </code> + <para>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 + is a local rule). + <note><para>rules called this way may accept at most + 8 parameters.</para></note></para> + <para>Example: +<programlisting language="jam"> +rule filter ( f : values * ) +{ + local m = [ CALLER_MODULE ] ; + local result ; + for v in $(values) + { + if [ modules.call-in $(m) : $(f) $(v) ] + { + result += $(v) ; + } + } + return result ; +} +</programlisting> + </para> + </listitem> + + <listitem id="bbv2.reference.modules.modules.load"> + <indexterm zone="bbv2.reference.modules.modules.load"><primary>load</primary></indexterm> + <code language="jam">rule load ( module-name : filename ? : search * )</code> + <para>Load the indicated module if it is not already loaded.</para> + <variablelist> + <varlistentry> + <term><literal>module-name</literal></term> + <listitem><para>Name of module to load.</para></listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term><literal>filename</literal></term> + <listitem><para>(partial) path to file; Defaults to <code>$(module-name).jam</code></para></listitem> + </varlistentry> + </variablelist> + <variablelist> + <varlistentry> + <term><literal>search</literal></term> + <listitem><para>Directories in which to search for filename. + Defaults to <code>$(BOOST_BUILD_PATH)</code>.</para></listitem> + </varlistentry> + </variablelist> + </listitem> + + <listitem id="bbv2.reference.modules.modules.import"> + <indexterm zone="bbv2.reference.modules.modules.import"><primary>import</primary></indexterm> + <code language="jam">rule import ( module-names + : rules-opt * : rename-opt * )</code> + <para>Load the indicated module and import rule names into the + current module. Any members of <code>rules-opt</code> will be + available without qualification in the caller's module. Any + members of <code>rename-opt</code> will be taken as the names + of the rules in the caller's module, in place of the names they + have in the imported module. If <code>rules-opt = '*'</code>, + all rules from the indicated module are imported into the + caller's module. If <code>rename-opt</code> is supplied, it must have the + same number of elements as <code>rules-opt</code>.</para> + <note><para>The <literal>import</literal> rule is available + without qualification in all modules.</para></note> + <para>Examples: +<programlisting language="jam"> +import path ; +import path : * ; +import path : join ; +import path : native make : native-path make-path ; +</programlisting> + </para> + </listitem> + + <listitem id="bbv2.reference.modules.modules.clone-rules"> + <indexterm zone="bbv2.reference.modules.modules.clone-rules"><primary>clone-rules</primary></indexterm> + <code language="jam">rule clone-rules ( source-module target-module )</code> + <para>Define exported copies in <code>$(target-module)</code> + of all rules exported from <code>$(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 + in <code>$(target-module)</code>.</para> + </listitem> + + </orderedlist> + + </section> + + <xi:include href="path.xml"/> + <xi:include href="regex.xml"/> + <xi:include href="sequence.xml"/> + <xi:include href="type.xml"/> + + </section> + + <section id="bbv2.reference.class"> + <title>Builtin classes</title> + <xi:include href="abstract-target.xml"/> + <xi:include href="project-target.xml"/> + <xi:include href="main-target.xml"/> + <xi:include href="basic-target.xml"/> + <xi:include href="typed-target.xml"/> + <xi:include href="property-set.xml"/> + </section> + + <section id="bbv2.reference.buildprocess"> + <title>Build process</title> + + <para>The general overview of the build process was given in the + <link linkend="bbv2.overview.build_process">user documentation</link>. + This section provides additional details, and some specific rules. + </para> + + <para>To recap, building a target with specific properties includes the + following steps: + <orderedlist> + + <listitem><para>applying default build,</para></listitem> + + <listitem><para>selecting the main target alternative to use, + </para></listitem> + + <listitem><para>determining "common" properties,</para></listitem> + + <listitem><para>building targets referred by the sources list and + dependency properties,</para></listitem> + + <listitem><para>adding the usage requirements produces when building + dependencies to the "common" properties,</para></listitem> + + <listitem><para>building the target using generators,</para></listitem> + + <listitem><para>computing the usage requirements to be returned.</para></listitem> + + </orderedlist> + </para> + + <section id="bbv2.reference.buildprocess.alternatives"> + <title>Alternative selection</title> + + <para>When there are several alternatives, one of them must be + selected. The process is as follows:</para> + + <orderedlist> + <listitem> + <simpara> + For each alternative <emphasis>condition</emphasis> is defined as + the set of base properties in requirements. [Note: it might be + better to specify the condition explicitly, as in conditional + requirements]. + </simpara> + </listitem> + + <listitem> + <simpara> + An alternative is viable only if all properties in condition + are present in build request. + </simpara> + </listitem> + + <listitem> + <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, if the set of properties + in b's condition is a strict subset of the set of properties of + 'a's condition. If there's one viable alternative, which is + better than all others, it's selected. Otherwise, an error is + reported. + </simpara> + </listitem> + </orderedlist> + + </section> + + <section id="bbv2.reference.buildprocess.common"> + <title>Determining common properties</title> + + <para>The "common" properties is a somewhat artificial term. Those are + the intermediate property set from which both the build request for + dependencies and properties for building the target are derived. + </para> + + <para>Since default build and alternatives are already handled, we have + only two inputs: build requests and requirements. Here are the rules + about common properties. + </para> + + <orderedlist> + <listitem><para>Non-free feature can have only one + value</para></listitem> + + <listitem><para>A non-conditional property in requirement in always + present in common properties.</para></listitem> + + <listitem><para>A property in build request is present in + common properties, unless (2) tells otherwise.</para></listitem> + + <listitem><para>If either build request, or requirements (non-conditional + or conditional) include an expandable property (either composite, + or property with specified subfeature value), the behaviour is + equivalent to explicitly adding all expanded properties to build + request or requirements.</para></listitem> + + <listitem><para>If requirements include a conditional property, and + condition of this property is true in context of common + properties, then the conditional property should be in common + properties as well.</para></listitem> + + <listitem><para>If no value for a feature is given by other rules + here, it has default value in common properties.</para></listitem> + </orderedlist> + + <para>Those rules are declarative, they don't specify how to compute the + common properties. However, they provide enough information for the + user. The important point is the handling of conditional + requirements. The condition can be satisfied either by property in + build request, by non-conditional requirements, or even by another + conditional property. For example, the following example works as + expected: +<programlisting> +exe a : a.cpp + : <toolset>gcc:<variant>release + <variant>release:<define>FOO ; +</programlisting> + </para> + + </section> + + <section id="bbv2.reference.buildprocess.targetpath"> + <title>Target Paths</title> + <indexterm><primary>path</primary><secondary>for targets</secondary></indexterm> + + <para>Several factors determine the location of a concrete + file target. All files in a project are built under + the directory bin unless this is overridden by the build-dir project + attribute. Under bin is a path that depends on the properties + used to build each target. This path is uniquely determined by + all non-free, non-incidental properties. For example, + given a property set containing: + <code><toolset>gcc <toolset-gcc:version>4.6.1 <variant>debug + <warnings>all <define>_DEBUG <include>/usr/local/include + <link>static</code>, + the path will be gcc-4.6.1/debug/link-static. <warnings> is an + incidental feature and <define> and <include> are + free features, so they do not affect the path.</para> + + <para>Sometimes the paths produced by Boost.Build can become excessively + long. There are a couple of command line options that can help with this. + --abbreviate-paths reduces each element to no more than five characters. + For example, link-static becomes lnk-sttc. The --hash option reduces the + path to a single directory using an MD5 hash.</para> + + <para>There are two features that affect the build + directory. The <location> feature completely + overrides the default build directory. For example, + <programlisting>exe a : a.cpp : <location>. ;</programlisting> + builds all the files produced by <code>a</code> + in the directory of the Jamfile. This is generally + discouraged, as it precludes variant builds.</para> + + <para>The <location-prefix> feature adds a + prefix to the path, under the project's build + directory. For example, + <programlisting>exe a : a.cpp : <location-prefix>subdir ;</programlisting> + will create the files for <code>a</code> in bin/subdir/gcc-4.6.1/debug</para> + + </section> + + </section> + + + + <section id="bbv2.reference.definitions"> + + <title>Definitions</title> + + <section id="bbv2.reference.features"> + <title>Features and properties</title> + + <para>A <emphasis>feature</emphasis> is a normalized (toolset-independent) + aspect of a build configuration, such as whether inlining is + enabled. Feature names may not contain the '<literal>></literal>' + character.</para> + + <!-- + And what about dash? + --> + + <para>Each feature in a build configuration has one or more + associated <emphasis>value</emphasis>s. Feature values for non-free features + may not contain the '<literal><</literal>', '<literal>:</literal>', or + '<literal>=</literal>' characters. Feature values for free features may not + contain the '<literal><</literal>' character.</para> + + <para>A <emphasis>property</emphasis> is a (feature,value) pair, expressed as + <feature>value.</para> + + <para>A <emphasis>subfeature</emphasis> is a feature that only exists in the + presence of its parent feature, and whose identity can be derived + (in the context of its parent) from its value. A subfeature's + parent can never be another subfeature. Thus, features and their + subfeatures form a two-level hierarchy.</para> + + <para>A <emphasis>value-string</emphasis> for a feature <emphasis role="bold">F</emphasis> is a string of + the form + <literal>value-subvalue1-subvalue2</literal>...<literal>-subvalueN</literal>, where + <literal>value</literal> is a legal value for <emphasis role="bold">F</emphasis> and + <literal>subvalue1</literal>...<literal>subvalueN</literal> are legal values of some + of <emphasis role="bold">F</emphasis>'s subfeatures. For example, the properties + <literal><toolset>gcc <toolset-version>3.0.1</literal> can be + expressed more concisely using a value-string, as + <literal><toolset>gcc-3.0.1</literal>.</para> + + <para>A <emphasis>property set</emphasis> is a set of properties (i.e. a + collection without duplicates), for instance: + <literal><toolset>gcc <runtime-link>static</literal>.</para> + + <para>A <emphasis>property path</emphasis> is a property set whose elements have + been joined into a single string separated by slashes. A property + path representation of the previous example would be + <literal><toolset>gcc/<runtime-link>static</literal>.</para> + + <para>A <emphasis>build specification</emphasis> is a property set that fully + describes the set of features used to build a target.</para> + + <section id="bbv2.reference.features.validity"> + <title>Property Validity</title> + + <para> + For <link linkend= + "bbv2.reference.features.attributes.free">free</link> + features, all values are valid. For all other features, + the valid values are explicitly specified, and the build + system will report an error for the use of an invalid + feature-value. Subproperty validity may be restricted so + that certain values are valid only in the presence of + certain other subproperties. For example, it is possible + to specify that the <code><gcc-target>mingw</code> + property is only valid in the presence of + <code><gcc-version>2.95.2</code>. + </para> + + </section> + <section id="bbv2.reference.features.attributes"> + <title>Feature Attributes</title> + + <para>Each feature has a collection of zero or more of the following + attributes. Feature attributes are low-level descriptions of how the + build system should interpret a feature's values when they appear in + a build request. We also refer to the attributes of properties, so + that an <emphasis>incidental</emphasis> property, for example, is + one whose feature has the <emphasis>incidental</emphasis> + attribute.</para> + + <itemizedlist> + <listitem> + <para><emphasis>incidental</emphasis></para> + + <para>Incidental features are assumed not to affect build + products at all. As a consequence, the build system may use + the same file for targets whose build specification differs + only in incidental features. A feature that controls a + compiler's warning level is one example of a likely + incidental feature.</para> + + <para>Non-incidental features are assumed to affect build + products, so the files for targets whose build specification + differs in non-incidental features are placed in different + directories as described in <xref linkend="bbv2.reference.buildprocess.targetpath"/>. + </para> + </listitem> + + <listitem> + <para> + <anchor id="bbv2.reference.features.attributes.propagated"/> + <emphasis>propagated</emphasis> + </para> + + <para>Features of this kind are + propagated to dependencies. That is, if a <link linkend= + "bbv2.overview.targets.main">main target</link> is built using a + propagated + property, the build systems attempts to use the same property + when building any of its dependencies as part of that main + target. For instance, when an optimized executable is + requested, one usually wants it to be linked with optimized + libraries. Thus, the <literal><optimization></literal> feature is + propagated.</para> + </listitem> + + <listitem> + <para> + <anchor id="bbv2.reference.features.attributes.free"/> + <emphasis>free</emphasis> + </para> + + <para>Most features have a finite set of allowed values, and can + only take on a single value from that set in a given build + specification. Free features, on the other hand, can have + several values at a time and each value can be an arbitrary + string. For example, it is possible to have several + preprocessor symbols defined simultaneously:</para> + +<programlisting> +<define>NDEBUG=1 <define>HAS_CONFIG_H=1 +</programlisting> + + </listitem> + + <listitem> + <para><emphasis>optional</emphasis></para> + + <para>An optional feature is a feature that is not required to + appear in a build specification. Every non-optional non-free + feature has a default value that is used when a value for + the feature is not otherwise specified, either in a target's + requirements or in the user's build request. [A feature's + default value is given by the first value listed in the + feature's declaration. -- move this elsewhere - dwa]</para> + </listitem> + + <listitem> + <para><emphasis>symmetric</emphasis></para> + + <para>Normally a feature only generates a subvariant directory + when its value differs from its default value, + leading to an asymmetric subvariant directory structure for + certain values of the feature. A symmetric feature + always generates a corresponding + subvariant directory.</para> + </listitem> + + <listitem> + <para><emphasis>path</emphasis></para> + + <para>The value of a path feature specifies a path. The path is + treated as relative to the directory of Jamfile where path + feature is used and is translated appropriately by the build + system when the build is invoked from a different + directory</para> + </listitem> + + <listitem> + <para><emphasis>implicit</emphasis></para> + + <para>Values of implicit features alone identify the feature. + For example, a user is not required to write + "<toolset>gcc", but can simply write "gcc". Implicit + feature names also don't appear in variant paths, although + the values do. Thus: bin/gcc/... as opposed to + bin/toolset-gcc/.... There should typically be only a few + such features, to avoid possible name clashes.</para> + </listitem> + + <listitem> + <para><emphasis>composite</emphasis></para> + + <para>Composite features actually correspond to groups of + properties. For example, a build variant is a composite + feature. When generating targets from a set of build + properties, composite features are recursively expanded and + <emphasis>added</emphasis> to the build property set, so rules can find + them if necessary. Non-composite non-free features override + components of composite features in a build property set.</para> + </listitem> + + <listitem> + <para><emphasis>dependency</emphasis></para> + + <para>The value of a dependency feature is a target reference. + When used for building of a main target, the value of + dependency feature is treated as additional dependency.</para> + + <para>For example, dependency features allow to state that + library A depends on library B. As the result, whenever an + application will link to A, it will also link to B. + Specifying B as dependency of A is different from adding B to + the sources of A. <!-- Need to clarify this. --></para> + </listitem> + </itemizedlist> + + <para>Features that are neither free nor incidental are called + <emphasis>base</emphasis> features.</para> + + + </section> + <section id="bbv2.reference.features.declaration"> + <title>Feature Declaration</title> + + <para>The low-level feature declaration interface is the + <literal>feature</literal> rule from the + <literal>feature</literal> module: + +<programlisting> +rule feature ( name : allowed-values * : attributes * ) +</programlisting> + + A feature's allowed-values may be extended with the + <code>feature.extend</code> rule. + </para> + + </section> + </section> + + <section id="bbv2.reference.variants.proprefine"> + <title>Property refinement</title> + + <para>When a target with certain properties is requested, and that + target requires some set of properties, it is needed to find the + set of properties to use for building. This process is called + <emphasis>property refinement</emphasis> and is performed by these rules</para> + + <orderedlist> + + <listitem> + <simpara> + Each property in the required set is added to the original + property set + </simpara> + </listitem> + + <listitem> + <simpara> + If the original property set includes property with a different + value of non free feature, that property is removed. + </simpara> + </listitem> + </orderedlist> + </section> + + <section id="bbv2.reference.variants.propcond"> + <title>Conditional properties</title> + + <para>Sometime it's desirable to apply certain requirements only for + a specific combination of other properties. For example, one of + compilers that you use issues a pointless warning that you want to + suppress by passing a command line option to it. You would not + want to pass that option to other compilers. Conditional + properties allow you to do just that. Their syntax is:</para> + + <programlisting> + property ( "," property ) * ":" property + </programlisting> + + <para> + For example, the problem above would be solved by: + +<programlisting> +exe hello : hello.cpp : <toolset>yfc:<cxxflags>-disable-pointless-warning ; +</programlisting> + </para> + + <para>The syntax also allows several properties in the condition, for + example: +<programlisting> +exe hello : hello.cpp : <os>NT,<toolset>gcc:<link>static ; +</programlisting> + </para> + + </section> + + <section id="bbv2.reference.ids"> + <title>Target identifiers and references</title> + + <para><emphasis>Target identifier</emphasis> is used to denote a + target. The syntax is:</para> + +<programlisting> +target-id -> (target-name | file-name | project-id | directory-name) + | (project-id | directory-name) "//" target-name +project-id -> path +target-name -> path +file-name -> path +directory-name -> path +</programlisting> + + <para> + This grammar allows some elements to be recognized as either + + <itemizedlist> + <listitem> + <simpara> + name of target declared in current Jamfile (note that target + names may include slash). + </simpara> + </listitem> + + <listitem> + <simpara> + a regular file, denoted by absolute name or name relative to + project's sources location. + </simpara> + </listitem> + + <listitem> + <simpara> + project id (at this point, all project ids start with slash). + </simpara> + </listitem> + + <listitem> + <simpara> + the directory of another project, denoted by absolute name + or name relative to the current project's location. + </simpara> + </listitem> + </itemizedlist> + + To determine the real meaning the possible interpretations + are checked in this order. For example, valid target ids might be: + +<screen> +a -- target in current project +lib/b.cpp -- regular file +/boost/thread -- project "/boost/thread" +/home/ghost/build/lr_library//parser -- target in specific project +../boost_1_61_0 -- project in specific directory +</screen> + + </para> + + <para><emphasis role="bold">Rationale:</emphasis>Target is separated from project by special + separator (not just slash), because:</para> + + <itemizedlist> + <listitem> + <simpara> + It emphasis that projects and targets are different things. + </simpara> + </listitem> + + <listitem> + <simpara> + It allows to have main target names with slashes. + + <!-- The motivation for which is: + + So, to summarize: + + 1. The project that extract tarfile may extract all possible kinds + of targets, and it's reasonable to use them directly from other + project. + + 2. The rule for unpacking tar is implemented in terms of + "patch-file", for maintainability, and therefore, must use main + target name that contains slashes? + + 3. Using sub-Jamfile in "foo" to declare extracted file "foo/b" is + not an option, because you should not change existing tree + + That makes good rationale for why main target must contain names. + --> + </simpara> + </listitem> + </itemizedlist> + + <para id="bbv2.reference.targets.references"> + <emphasis>Target reference</emphasis> is used to + specify a source target, and may additionally specify desired + properties for that target. It has this syntax:</para> + +<programlisting> +target-reference -> target-id [ "/" requested-properties ] +requested-properties -> property-path +</programlisting> + + <para> + For example, + + <programlisting> + exe compiler : compiler.cpp libs/cmdline/<optimization>space ; + </programlisting> + + would cause the version of <literal>cmdline</literal> library, + optimized for space, to be linked in even if the + <literal>compiler</literal> executable is build with optimization for + speed. + </para> + </section> + + </section> + +</chapter> + +<!-- + Local Variables: + mode: nxml + sgml-indent-data: t + sgml-parent-document: ("userman.xml" "chapter") + sgml-set-face: t + End: +--> diff --git a/boost/tools/build/doc/src/regex.xml b/boost/tools/build/doc/src/regex.xml new file mode 100644 index 00000000..234c6eae --- /dev/null +++ b/boost/tools/build/doc/src/regex.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<section id="bbv2.reference.modules.regex"> + + <title>regex</title> + <indexterm> + <primary>regex</primary> + <secondary>module</secondary> + </indexterm> + + <para> + Contains rules for string processing using regular expressions. + </para> + + <itemizedlist> + + <listitem><para> + <code language="jam">"x*"</code> matches the pattern + <code language="jam">"x"</code> zero or more times. + </para></listitem> + + <listitem><para> + <code language="jam">"x+"</code> matches <code language="jam">"x"</code> + one or more times. + </para></listitem> + + <listitem><para> + <code language="jam">"x?"</code> matches <code language="jam">"x"</code> + zero or one time. + </para></listitem> + + <listitem><para> + <code language="jam">"[abcd]"</code> matches any of the characters, + <code language="jam">"a"</code>, <code language="jam">"b"</code>, + <code language="jam">"c"</code>, and <code language="jam">"d"</code>. + A character range such as <code language="jam">"[a-z]"</code> matches + any character between <code language="jam">"a"</code> and + <code language="jam">"z"</code>. <code language="jam">"[^abc]"</code> + matches any character which is not <code language="jam">"a"</code>, + <code language="jam">"b"</code>, or <code language="jam">"c"</code>. + </para></listitem> + + <listitem><para> + <code language="jam">"x|y"</code> matches either pattern + <code language="jam">"x"</code> or pattern <code language="jam">"y"</code> + </para></listitem> + + <listitem><para> + <code language="jam">(x)</code> matches <code language="jam">"x"</code> + and captures it. + </para></listitem> + + <listitem><para> + <code language="jam">"^"</code> matches the beginning of the string. + </para></listitem> + + <listitem><para> + <code language="jam">"$"</code> matches the end of the string. + </para></listitem> + + <listitem><para> + "\<" matches the beginning of a word. + </para></listitem> + + <listitem><para> + "\>" matches the end of a word. + </para></listitem> + + </itemizedlist> + + <orderedlist> + + <listitem id="bbv2.reference.modules.regex.split"> + <indexterm zone="bbv2.reference.modules.regex.split"> + <primary>split</primary> + <secondary>regex</secondary> + </indexterm> + <code language="jam">rule split ( string separator )</code> + <para>Returns a list of the following substrings: + <orderedlist> + <listitem><para>from beginning till the first occurrence of + <code language="jam">separator</code> or till the end, + </para></listitem> + <listitem><para>between each occurrence of + <code language="jam">separator</code> and the next occurrence, + </para></listitem> + <listitem><para>from the last occurrence of + <code language="jam">separator</code> till the end. + </para></listitem> + </orderedlist> + If no separator is present, the result will contain only one element. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.regex.split-list"> + <indexterm zone="bbv2.reference.modules.regex.split-list"> + <primary>split-list</primary> + <secondary>regex</secondary> + </indexterm> + <code language="jam">rule split-list ( list * : separator )</code> + <para>Returns the concatenated results of applying + <link linkend="bbv2.reference.modules.regex.split">regex.split</link> + to every element of the list using the separator pattern.</para> + </listitem> + + <listitem id="bbv2.reference.modules.regex.match"> + <indexterm zone="bbv2.reference.modules.regex.match"> + <primary>match</primary> + <secondary>regex</secondary> + </indexterm> + <code language="jam">rule match ( pattern : string : indices * )</code> + <para>Match <code language="jam">string</code> against + <code language="jam">pattern</code>, and return the elements + indicated by <code language="jam">indices</code>. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.regex.transform"> + <indexterm zone="bbv2.reference.modules.regex.transform"> + <primary>transform</primary> + <secondary>regex</secondary> + </indexterm> + <code language="jam">rule transform ( list * : pattern : indices * )</code> + <para>Matches all elements of <code language="jam">list</code> against + the <code language="jam">pattern</code> and returns a list of elements + indicated by <code language="jam">indices</code> of all successful + matches. If <code language="jam">indices</code> is omitted returns a list + of first parenthesized groups of all successful matches.</para> + </listitem> + + <listitem id="bbv2.reference.modules.regex.escape"> + <indexterm zone="bbv2.reference.modules.regex.escape"> + <primary>escape</primary> + <secondary>regex</secondary> + </indexterm> + <code language="jam">rule escape ( string : symbols : escape-symbol )</code> + <para>Escapes all of the characters in <code language="jam">symbols</code> + using the escape symbol <code language="jam">escape-symbol</code> for + the given string, and returns the escaped string.</para> + </listitem> + + <listitem id="bbv2.reference.modules.regex.replace"> + <indexterm zone="bbv2.reference.modules.regex.replace"> + <primary>replace</primary> + <secondary>regex</secondary> + </indexterm> + <code language="jam">rule replace ( string match replacement )</code> + <para>Replaces occurrences of a match string in a given string and + returns the new string. The match string can be a regex expression.</para> + </listitem> + + <listitem id="bbv2.reference.modules.regex.replace-list"> + <indexterm zone="bbv2.reference.modules.regex.replace-list"> + <primary>replace-list</primary> + <secondary>regex</secondary> + </indexterm> + <code language="jam">rule replace-list ( list * : match : replacement )</code> + <para>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. + </para> + </listitem> + + </orderedlist> + + <para>See also: <link linkend="jam.language.rules.builtins.utility._match__">MATCH</link></para> + +</section> diff --git a/boost/tools/build/doc/src/sequence.xml b/boost/tools/build/doc/src/sequence.xml new file mode 100644 index 00000000..54b2fbdb --- /dev/null +++ b/boost/tools/build/doc/src/sequence.xml @@ -0,0 +1,135 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<section id="bbv2.reference.modules.sequence"> + + <title>sequence</title> + <indexterm> + <primary>sequence</primary> + <secondary>module</secondary> + </indexterm> + + <para> + 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. + </para> + + <orderedlist> + + <listitem id="bbv2.reference.modules.sequence.filter"> + <indexterm zone="bbv2.reference.modules.sequence.filter"> + <primary>filter</primary> + <secondary>sequence</secondary> + </indexterm> + <code language="jam">rule filter ( predicate + : sequence * )</code> + <para>Return the elements <code language="jam">e</code> of + <code language="jam">$(sequence)</code> for which + <code language="jam">[ $(predicate) e ]</code> has a non-null value. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.sequence.transform"> + <indexterm zone="bbv2.reference.modules.sequence.transform"> + <primary>transform</primary> + <secondary>sequence</secondary> + </indexterm> + <code language="jam">rule transform ( function + : sequence * )</code> + <para>Return a new sequence consisting of + <code language="jam">[ $(function) $(e) ]</code> for each element + <code language="jam">e</code> of <code language="jam">$(sequence)</code>. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.sequence.reverse"> + <indexterm zone="bbv2.reference.modules.sequence.reverse"> + <primary>reverse</primary> + <secondary>sequence</secondary> + </indexterm> + <code language="jam">rule reverse ( s * )</code> + <para>Returns the elements of <code language="jam">s</code> in + reverse order.</para> + </listitem> + + <listitem id="bbv2.reference.modules.sequence.insertion-sort"> + <indexterm zone="bbv2.reference.modules.sequence.insertion-sort"> + <primary>insertion-sort</primary> + <secondary>sequence</secondary> + </indexterm> + <code language="jam">rule insertion-sort ( s * : ordered * )</code> + <para>Insertion-sort <code language="jam">s</code> using the + BinaryPredicate <code language="jam">ordered</code>.</para> + </listitem> + + <listitem id="bbv2.reference.modules.sequence.merge"> + <indexterm zone="bbv2.reference.modules.sequence.merge"> + <primary>merge</primary> + <secondary>sequence</secondary> + </indexterm> + <code language="jam">rule merge ( s1 * : s2 * : ordered * )</code> + <para>Merge two ordered sequences using the BinaryPredicate + <code language="jam">ordered</code>.</para> + </listitem> + + <listitem id="bbv2.reference.modules.sequence.join"> + <indexterm zone="bbv2.reference.modules.sequence.join"> + <primary>join</primary> + <secondary>sequence</secondary> + </indexterm> + <code language="jam">rule join ( s * : joint ? )</code> + <para>Join the elements of <code language="jam">s</code> into one + long string. If <code language="jam">joint</code> is supplied, it + is used as a separator.</para> + </listitem> + + <listitem id="bbv2.reference.modules.sequence.length"> + <indexterm zone="bbv2.reference.modules.sequence.length"> + <primary>length</primary> + <secondary>sequence</secondary> + </indexterm> + <code language="jam">rule length ( s * )</code> + <para>Find the length of any sequence.</para> + </listitem> + + <listitem id="bbv2.reference.modules.sequence.unique"> + <indexterm zone="bbv2.reference.modules.sequence.unique"> + <primary>unique</primary> + <secondary>sequence</secondary> + </indexterm> + <code language="jam">rule unique ( list * : stable ? )</code> + <para>Removes duplicates from <code language="jam">list</code>. + If <code language="jam">stable</code> is passed, then the order + of the elements will be unchanged.</para> + </listitem> + + <listitem id="bbv2.reference.modules.sequence.max-element"> + <indexterm zone="bbv2.reference.modules.sequence.max-element"> + <primary>max-element</primary> + <secondary>sequence</secondary> + </indexterm> + <code language="jam">rule max-element ( elements + : ordered ? )</code> + <para>Returns the maximum number in <code language="jam">elements</code>. + Uses <code language="jam">ordered</code> for comparisons or + <link linkend="bbv2.reference.modules.numbers.less">numbers.less</link> + if none is provided.</para> + </listitem> + + <listitem id="bbv2.reference.modules.sequence.select-highest-ranked"> + <indexterm zone="bbv2.reference.modules.sequence.select-highest-ranked"> + <primary>select-highest-ranked</primary> + <secondary>sequence</secondary> + </indexterm> + <code language="jam">rule select-highest-ranked ( elements * : ranks * )</code> + <para>Returns all of <code language="jam">elements</code> for which + the corresponding element in the parallel list + <code language="jam">rank</code> is equal to the maximum value in + <code language="jam">rank</code>.</para> + </listitem> + + </orderedlist> + +</section> diff --git a/boost/tools/build/doc/src/standalone.xml b/boost/tools/build/doc/src/standalone.xml new file mode 100644 index 00000000..d6f85617 --- /dev/null +++ b/boost/tools/build/doc/src/standalone.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE book PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<book xmlns:xi="http://www.w3.org/2001/XInclude" + id="bbv2" last-revision="$Date$"> + + <title>Boost.Build User Manual</title> + + <!-- Chapters --> + <xi:include href="howto.xml"/> + <xi:include href="install.xml"/> + <xi:include href="tutorial.xml"/> + <xi:include href="overview.xml"/> + <xi:include href="tasks.xml"/> + <xi:include href="reference.xml"/> + <xi:include href="extending.xml"/> + <xi:include href="faq.xml"/> + + <!-- Appendicies --> +<!-- <xi:include href="architecture.xml"/> --> + <appendix id="bbv2.jam"> + <title>Boost.Jam Documentation</title> + <xi:include href="jam_docs.xml" parse="xml" + xpointer="xpointer(id('jam.building')|id('jam.building')/following-sibling::*)"/> + </appendix> + + <index/> + +</book> diff --git a/boost/tools/build/doc/src/tasks.xml b/boost/tools/build/doc/src/tasks.xml new file mode 100644 index 00000000..48f611a2 --- /dev/null +++ b/boost/tools/build/doc/src/tasks.xml @@ -0,0 +1,842 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<!-- Copyright 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) --> + +<chapter id="bbv2.tasks"> + <title>Common tasks</title> + + <para> + This section describes main targets types that Boost.Build supports + out-of-the-box. Unless otherwise noted, all mentioned main target rules have + the common signature, described in <xref linkend="bbv2.overview.targets"/>. + </para> + + <section id="bbv2.tasks.programs"> + <title>Programs</title> + + <indexterm><primary>exe</primary></indexterm> + <para> + Programs are created using the <code>exe</code> rule, which follows the + <link linkend="bbv2.main-target-rule-syntax">common syntax</link>. For + example: +<programlisting> +exe hello : hello.cpp some_library.lib /some_project//library + : <threading>multi + ; +</programlisting> + This will create an executable file from the sources—in this case, one + C++ file, one library file present in the same directory, and another + library that is created by Boost.Build. Generally, sources can include C + and C++ files, object files and libraries. Boost.Build will automatically + try to convert targets of other types. + </para> + + <tip> + <para> + On Windows, if an application uses shared libraries, and both the + application and the libraries are built using Boost.Build, it is not + possible to immediately run the application, because the <literal>PATH + </literal> environment variable should include the path to the + libraries. It means you have to either add the paths manually, or have + the build place the application and the libraries into the same + directory. See <xref linkend="bbv2.tasks.installing"/>. + </para> + <!-- We should be emphasizing the use of the built-in testing rules + rather than continually discussing these quirks of running programs + with shared libraries. --> + </tip> + </section> + + <section id="bbv2.tasks.libraries"> + <title>Libraries</title> + + <indexterm> + <primary>library</primary> + <secondary>target</secondary> + </indexterm> + + <para> + Library targets are created using the <code>lib</code> rule, which + follows the <link linkend="bbv2.main-target-rule-syntax">common syntax + </link>. For example: +<programlisting> +lib helpers : helpers.cpp ; +</programlisting> + This will define a library target named <code>helpers</code> built from + the <code>helpers.cpp</code> source file. + It can be either a static library or a shared library, + depending on the value of the <link linkend="bbv2.overview.builtins.features.link"><link></link> feature. + </para> + <para> + Library targets can represent: + <itemizedlist> + <listitem> + <para> + Libraries that should be built from source, + as in the example above. + </para> + </listitem> + <listitem> + <para> + Prebuilt libraries which already exist on the system. + Such libraries can be searched for by the tools using them (typically + with the linker's <option>-l</option> option) or their paths can be + known in advance by the build system. + </para> + </listitem> + </itemizedlist> + </para> + + <para> + The syntax for prebuilt libraries is given below: +<programlisting> +lib z : : <name>z <search>/home/ghost ; +lib compress : : <file>/opt/libs/compress.a ; +</programlisting> + The <code>name</code> property specifies the name of the library + without the standard prefixes and suffixes. For example, depending + on the system, <code>z</code> could refer to a file called + z.so, libz.a, or z.lib, etc. The <code>search</code> feature + specifies paths in which to search for the library in addition + to the default compiler paths. <code>search</code> can be specified + several times or it can be omitted, in which case only the default + compiler paths will be searched. The <code>file</code> property + specifies the file location. + </para> + + <para> + The difference between using the <code>file</code> feature and + using a combination of the <code>name</code> and <code>search</code> + features is that <code>file</code> is more precise. + + <warning> + <para> + The value of the <code>search</code> feature is just added to the + linker search path. When linking to multiple libraries, + the paths specified by <code>search</code> are combined without + regard to which <code>lib</code> target each path came from. + Thus, given +<programlisting> +lib a : : <name>a <search>/pool/release ; +lib b : : <name>b <search>/pool/debug ; +</programlisting> + If /pool/release/a.so, /pool/release/b.so, /pool/debug/a.so, + and /pool/release/b.so all exist, the linker will probably + take both <code>a</code> and <code>b</code> from the same + directory, instead of finding <code>a</code> in /pool/release + and <code>b</code> in /pool/debug. If you need to distinguish + between multiple libraries with the same name, it's safer + to use <code>file</code>. + </para> + </warning> + </para> + + <para> + For convenience, the following syntax is allowed: +<programlisting> +lib z ; +lib gui db aux ; +</programlisting> + which has exactly the same effect as: +<programlisting> +lib z : : <name>z ; +lib gui : : <name>gui ; +lib db : : <name>db ; +lib aux : : <name>aux ; +</programlisting> + </para> + + <para> + When a library references another library you should put that other + library in its list of sources. This will do the right thing in all cases. + <!--Add a link to the notes below. --> For portability, you should specify + library dependencies even for searched and prebuilt libraries, othewise, + static linking on Unix will not work. For example: +<programlisting> +lib z ; +lib png : z : <name>png ; +</programlisting> + </para> + + <note> + <para> + When a library has a shared library as a source, or a static + library has another static library as a source then any target + linking to the first library with automatically link to its source + library as well. + </para> + <para> + On the other hand, when a shared library has a static library as + a source then the first library will be built so that it completely + includes the second one. + </para> + <para> + If you do not want a shared library to include all the libraries specified + in its sources (especially statically linked ones), you would need to + use the following: +<programlisting> +lib b : a.cpp ; +lib a : a.cpp : <use>b : : <library>b ; +</programlisting> + This specifies that library <code>a</code> uses library <code>b</code>, + and causes all executables that link to <code>a</code> to link to + <code>b</code> also. In this case, even for shared linking, the + <code>a</code> library will not refer to <code>b</code>. + </para> + </note> + + <para> + <!-- FIXME: After adding a full subsection on usage requirements, link to it --> + <link linkend="bbv2.overview.targets">Usage requirements</link> are often + very useful for defining library targets. For example, imagine that + you want you build a <code>helpers</code> library and its interface is + described in its <code>helpers.hpp</code> header file located in the same + directory as the <code>helpers.cpp</code> source file. Then you could add + the following to the Jamfile located in that same directory: +<programlisting> +lib helpers : helpers.cpp : : : <include>. ; +</programlisting> + which would automatically add the directory where the target has been + defined (and where the library's header file is located) to the compiler's + include path for all targets using the <code>helpers</code> library. This + feature greatly simplifies Jamfiles. + </para> + </section> + + <section id="bbv2.tasks.alias"> + <title>Alias</title> + + <para> + The <code language="jam">alias</code> rule gives an alternative name to 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 the source list + of any other target is the same as explicitly using <filename>im + </filename>, <filename>reader</filename>, and <filename>writer</filename>. + </para> + + <para> + Another use of the <code>alias</code> rule is to change build properties. + For example, if you want to use link statically to the Boost Threads + library, you can write the following: +<programlisting> +alias threads : /boost/thread//boost_thread : <link>static ; +</programlisting> + and use only the <code>threads</code> alias in your Jamfiles. + </para> + + <para> + You can also specify usage requirements for the <code>alias</code> target. + If you write the following: +<programlisting> +alias header_only_library : : : : <include>/usr/include/header_only_library ; +</programlisting> + then using <code>header_only_library</code> in sources will only add an + include path. Also note that when an alias has sources, their usage + requirements are propagated as well. For example: +<programlisting> +lib library1 : library1.cpp : : : <include>/library/include1 ; +lib library2 : library2.cpp : : : <include>/library/include2 ; +alias static_libraries : library1 library2 : <link>static ; +exe main : main.cpp static_libraries ; +</programlisting> + will compile <filename>main.cpp</filename> with additional includes + required for using the specified static libraries. + </para> + </section> + + <section id="bbv2.tasks.installing"> + <title>Installing</title> + + <para> + This section describes various ways to install built target and arbitrary + files. + </para> + + <bridgehead>Basic install</bridgehead> + + <para> + For installing a built target you should use the <code>install</code> + rule, which follows the <link linkend="bbv2.main-target-rule-syntax"> + common syntax</link>. For example: +<programlisting> +install dist : hello helpers ; +</programlisting> + will cause the targets <code>hello</code> and <code>helpers</code> to be + moved to the <filename>dist</filename> directory, relative to the + Jamfile's directory. The directory can be changed using the + <code>location</code> property: +<programlisting> +install dist : hello helpers : <location>/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 as it allows you to use a mnemonic target name. + </para> + + <para> + The <code>location</code> property is especially handy when the location + is not fixed, but depends on the build variant or environment variables: +<programlisting> +install dist : hello helpers : + <variant>release:<location>dist/release + <variant>debug:<location>dist/debug ; +install dist2 : hello helpers : <location>$(DIST) ; +</programlisting> + See also <link linkend="bbv2.reference.variants.propcond">conditional + properties</link> and <link linkend="bbv2.faq.envar">environment + variables</link> + </para> + + <bridgehead>Installing with all dependencies</bridgehead> + + <para> + Specifying the names of all libraries to install can be boring. The + <code>install</code> allows you to specify only the top-level executable + targets to install, and automatically install all dependencies: +<programlisting> +install dist : hello + : <install-dependencies>on <install-type>EXE + <install-type>LIB + ; +</programlisting> + will find all targets that <code>hello</code> depends on, and install 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 linkend="bbv2.builtin.features.use"> + <code>use</code></link> feature are not considered, as that feature is + typically used to refer to header-only libraries. If the set of target + types is specified, only targets of that type will be installed, + otherwise, all found target will be installed. + </para> + + <bridgehead>Preserving Directory Hierarchy</bridgehead> + + <indexterm><primary>install-source-root</primary></indexterm> + + <para> + By default, the <code>install</code> rule will strip paths from its + sources. So, if sources include <filename>a/b/c.hpp</filename>, the + <filename>a/b</filename> part will be ignored. To make the + <code>install</code> rule preserve the directory hierarchy you need to + use the <literal><install-source-root></literal> feature to specify + the root of the hierarchy you are installing. Relative paths from that + root will be preserved. For example, if you write: +<programlisting> +install headers + : a/b/c.h + : <location>/tmp <install-source-root>a + ; +</programlisting> + the a file named <filename>/tmp/b/c.h</filename> will be created. + </para> + + <para> + The <link linkend="bbv2.reference.glob-tree">glob-tree</link> rule can be + used to find all files below a given directory, making it easy to install + an entire directory tree. + </para> + + <bridgehead>Installing into Several Directories</bridgehead> + + <para> + The <link linkend="bbv2.tasks.alias"><code>alias</code></link> rule can be + used when targets need to be installed into several directories: +<programlisting> +alias install : install-bin install-lib ; +install install-bin : applications : /usr/bin ; +install install-lib : helper : /usr/lib ; +</programlisting> + </para> + + <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> rule. The + only two that matter are <link linkend="bbv2.builtin.features.dependency"> + <varname>dependency</varname></link> and, on Unix, <link + linkend="bbv2.reference.features.dll-path"><varname>dll-path</varname> + </link>. + </para> + + <note> + <para> + (Unix specific) On Unix, executables built using Boost.Build typically + contain the list of paths to all used shared libraries. For installing, + this is not desired, so Boost.Build relinks the executable with an empty + list of paths. You can also specify additional paths for installed + executables using the <varname>dll-path</varname> feature. + </para> + </note> + </section> + + <section id="bbv2.builtins.testing"> + <title>Testing</title> + + <para> + Boost.Build has convenient support for running unit tests. The simplest + way is the <code>unit-test</code> rule, which follows the <link + linkend="bbv2.main-target-rule-syntax">common syntax</link>. For example: +<programlisting> +unit-test helpers_test : helpers_test.cpp helpers ; +</programlisting> + </para> + + <para> + The <code language="jam">unit-test</code> rule behaves like the + <link linkend="bbv2.tasks.programs">exe</link> rule, but after the executable is created + it is also run. If the executable returns an error code, the build system + will also return an error and will try running the executable on the next + invocation until it runs successfully. This behaviour ensures that you can + not miss a unit test failure. + </para> + + + <para> + There are few specialized testing rules, listed below: +<programlisting> +rule compile ( sources : requirements * : target-name ? ) +rule compile-fail ( sources : requirements * : target-name ? ) +rule link ( sources + : requirements * : target-name ? ) +rule link-fail ( sources + : requirements * : target-name ? ) +</programlisting> + They are given a list of sources and requirements. If the target name is + not provided, the name of the first source file is used instead. The + <literal>compile*</literal> tests try to compile the passed source. The + <literal>link*</literal> rules try to compile and link an application from + all the passed sources. The <literal>compile</literal> and <literal>link + </literal> rules expect that compilation/linking succeeds. The <literal> + compile-fail</literal> and <literal>link-fail</literal> rules expect that + the compilation/linking fails. + </para> + + <para> + There are two specialized rules for running applications, which are more + powerful than the <code>unit-test</code> rule. The <code>run</code> rule + has the following signature: +<programlisting> +rule run ( sources + : args * : input-files * : requirements * : target-name ? + : default-build * ) +</programlisting> + The rule builds application from the provided sources and runs it, passing + <varname>args</varname> and <varname>input-files</varname> as command-line + arguments. The <varname>args</varname> parameter is passed verbatim and + the values of the <varname>input-files</varname> parameter are treated as + paths relative to containing Jamfile, and are adjusted if <command>b2</command> + is invoked from a different directory. The + <code>run-fail</code> rule is identical to the <code>run</code> rule, + except that it expects that the run fails. + </para> + + <para> + All rules described in this section, if executed successfully, create a + special manifest file to indicate that the test passed. For the + <code>unit-test</code> rule the files is named <filename><replaceable> + target-name</replaceable>.passed</filename> and for the other rules it is + called <filename><replaceable>target-name</replaceable>.test</filename>. + The <code>run*</code> rules also capture all output from the program, and + store it in a file named <filename><replaceable> + target-name</replaceable>.output</filename>. + </para> + + <para> + <indexterm><primary>preserve-test-targets</primary></indexterm> + If the <literal>preserve-test-targets</literal> feature has the value + <literal>off</literal>, then <code>run</code> and the <code>run-fail</code> + rules will remove the executable after running it. This somewhat decreases + disk space requirements for continuous testing environments. The default + value of <literal>preserve-test-targets</literal> feature is <literal>on</literal>. + </para> + + <para> + It is possible to print the list of all test targets (except for + <code>unit-test</code>) declared in your project, by passing the <literal> + --dump-tests</literal> command-line option. The output will consist of + lines of the form: +<screen> +boost-test(<replaceable>test-type</replaceable>) <replaceable>path</replaceable> : <replaceable>sources</replaceable> +</screen> + </para> + + <para> + It is possible to process the list of tests, Boost.Build output + and the presense/absense of the <filename>*.test</filename> + files created when test passes into human-readable status table of tests. + Such processing utilities are not included in Boost.Build. + </para> + + <para>The following features adjust behaviour of the testing metatargets.</para> + + <variablelist> + <varlistentry> + <term><literal>testing.arg</literal></term> + <indexterm><primary>testing.arg</primary></indexterm> + + <listitem> + <para> + Defines an argument to be passed to the target when it is executed + before the list of input files. + </para> + + <para> +<programlisting> +unit-test helpers_test + : helpers_test.cpp helpers + : <emphasis role="bold"><testing.arg>"--foo bar"</emphasis> + ; +</programlisting> + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>testing.input-file</literal></term> + <indexterm><primary>testing.input-file</primary></indexterm> + + <listitem> + <para> + 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. + </para> + + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>testing.launcher</literal></term> + <indexterm><primary>testing.launcher</primary></indexterm> + + <listitem> + <para> + By default, the executable is run directly. Sometimes, it is + desirable to run the executable using some helper command. You + should use this property to specify the name of the helper + command. For example, if you write: +<programlisting> +unit-test helpers_test + : helpers_test.cpp helpers + : <emphasis role="bold"><testing.launcher>valgrind</emphasis> + ; +</programlisting> + The command used to run the executable will be: +<screen> +<emphasis role="bold">valgrind</emphasis> bin/$toolset/debug/helpers_test +</screen> + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><literal>test-info</literal></term> + <indexterm><primary>test-info</primary></indexterm> + + <listitem> + <para> + A description of the test. This is displayed as part of the + <literal>--dump-tests</literal> command-line option. + </para> + </listitem> + </varlistentry> + + </variablelist> + </section> + + <section id="bbv2.builtins.raw"> + <title>Custom commands</title> + + <para> + For most main target rules, Boost.Build automatically figures out + the commands to run. When you want to use new + file types or support new tools, one approach is to extend Boost.Build to + support them smoothly, as documented in <xref linkend="bbv2.extender"/>. + However, if the new tool is only used in a single place, it + might be easier just to specify the commands to run explicitly. + </para> + + <para> + <!-- This paragraph requires links to where the terms 'virtual target' & + 'target' are defined. --> + Three main target rules can be used for that. The <code language="jam">make + </code> rule allows you to construct a single file from any number + of source file, by running a command you specify. The <code language="jam"> + notfile</code> rule allows you to run an arbitrary command, + without creating any files. And finaly, the <code language="jam">generate + </code> rule allows you to describe a transformation using + Boost.Build's virtual targets. This is higher-level than the file names that + the <code language="jam">make</code> rule operates with and allows you to + create more than one target, create differently named targets depending on + properties, or use more than one tool. + </para> + + <para> + The <code language="jam">make</code> rule is used when you want to create + one file from a number of sources using some specific command. The + <code language="jam">notfile</code> is used to unconditionally run a + command. + </para> + + <!-- We need to specify somewhere that the user can get rules like make, + notfile & generate defined in his Jamfiles by importing an appropriate + Boost.Build module. Also, each of those rules should get a separate + documentation page explicitly listing which module needs to be imported for + them to become accessible. --> + + <para> + Suppose you want to create the file <filename>file.out</filename> from + the file <filename>file.in</filename> by running the command <command> + in2out</command>. Here is how you would do this in Boost.Build: +<programlisting> +make file.out : file.in : @in2out ; +actions in2out +{ + in2out $(<) $(>) +} +</programlisting> + If you run <command>b2</command> and <filename>file.out</filename> does + not exist, Boost.Build will run the <command>in2out</command> command to + create that file. For more details on specifying actions, see <xref + linkend="bbv2.overview.jam_language.actions"/>. + </para> + + <para> + It could be that you just want to run some command unconditionally, and + that command does not create any specific files. For that you can use the + <code language="jam">notfile</code> rule. For example: +<programlisting> +notfile echo_something : @echo ; +actions echo +{ + echo "something" +} +</programlisting> + The only difference from the <code language="jam">make</code> rule is + that the name of the target is not considered a name of a file, so + Boost.Build will unconditionally run the action. + </para> + + <para> + <!-- This paragraph requires links to where terms like 'virtual target', + 'target', 'project-target' & 'property-set' are defined. --> + The <code language="jam">generate</code> rule is used when you want to + express transformations using Boost.Build's virtual targets, as opposed to + just filenames. The <code language="jam">generate</code> rule has the + standard main target rule signature, but you are required to specify the + <literal>generating-rule</literal> property. The value of the property + should be in the form <literal> + @<replaceable>rule-name</replaceable></literal>, the named rule should + have the following signature: +<programlisting> +rule generating-rule ( project name : property-set : sources * ) +</programlisting> + and will be called with an instance of the <code>project-target</code> + class, the name of the main target, an instance of the + <code>property-set</code> class containing build properties, and the list + of instances of the <code>virtual-target</code> class corresponding to + sources. The rule must return a list of <code>virtual-target</code> + instances. The interface of the <code>virtual-target</code> class can be + learned by looking at the <filename>build/virtual-target.jam</filename> + file. The <filename>generate</filename> example contained in the + Boost.Build distribution illustrates how the <literal>generate</literal> + rule can be used. + </para> + </section> + + <section id="bbv2.reference.precompiled_headers"> + <title>Precompiled Headers</title> + + <para> + Precompiled headers is a mechanism to speed up compilation by creating a + partially processed version of some header files, and then using that + version during compilations rather then repeatedly parsing the original + headers. Boost.Build supports precompiled headers with gcc and msvc + toolsets. + </para> + + <para> + To use precompiled headers, follow the following steps: + </para> + + <orderedlist> + <listitem> + <para> + Create a header that includes headers used by your project that you + want precompiled. It is better to include only headers that are + sufficiently stable — like headers from the compiler and + external libraries. Please wrap the header in <code>#ifdef + BOOST_BUILD_PCH_ENABLED</code>, so that the potentially expensive + inclusion of headers is not done when PCH is not enabled. Include the + new header at the top of your source files. + </para> + </listitem> + + <listitem> + <para> + Declare a new Boost.Build target for the precompiled header and add + that precompiled header to the sources of the target whose compilation + you want to speed up: +<programlisting> +cpp-pch pch : pch.hpp ; +exe main : main.cpp pch ; +</programlisting> + You can use the <code language="jam">c-pch</code> rule if you want to + use the precompiled header in C programs. + </para></listitem> + </orderedlist> + + <para> + The <filename>pch</filename> example in Boost.Build distribution can be + used as reference. + </para> + + <para> + Please note the following: + </para> + + <itemizedlist> + <listitem> + <para> + The inclusion of the precompiled header must be the first thing in a + source file, before any code or preprocessor directives. + </para> + </listitem> + + <listitem> + <para> + The build properties used to compile the source files and the + precompiled header must be the same. Consider using project + requirements to assure this. + </para> + </listitem> + + <listitem> + <para> + Precompiled headers must be used purely as a way to improve + compilation time, not to save the number of <code>#include</code> + statements. If a source file needs to include some header, explicitly + include it in the source file, even if the same header is included + from the precompiled header. This makes sure that your project will + build even if precompiled headers are not supported. + </para> + </listitem> + + <listitem> + <para> + On the gcc compiler, the name of the header being precompiled must be + equal to the name of the <code>cpp-pch</code> target. This is a gcc + requirement. + </para> + </listitem> + + <listitem> + <para> + Prior to version 4.2, the gcc compiler did not allow anonymous + namespaces in precompiled headers, which limits their utility. See the + <ulink url="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29085"> bug + report</ulink> for details. + </para> + </listitem> + </itemizedlist> + </section> + + <section id="bbv2.reference.generated_headers"> + <title>Generated headers</title> + + <para> + Usually, Boost.Build handles implicit dependendies completely + automatically. For example, for C++ files, all <literal>#include</literal> + statements are found and handled. The only aspect where user help might be + needed is implicit dependency on generated files. + </para> + + <para> + By default, Boost.Build handles such dependencies within one main target. + For example, assume that main target "app" has two sources, "app.cpp" and + "parser.y". The latter source is converted into "parser.c" and "parser.h". + Then, if "app.cpp" includes "parser.h", Boost.Build will detect this + dependency. Moreover, since "parser.h" will be generated into a build + directory, the path to that directory will automatically be added to the include + path. + </para> + + <para> + Making this mechanism work across main target boundaries is possible, but + imposes certain overhead. For that reason, if there is implicit dependency + on files from other main targets, the <literal><implicit-dependency> + </literal> feature must be used, for example: +<programlisting> +lib parser : parser.y ; +exe app : app.cpp : <implicit-dependency>parser ; +</programlisting> + The above example tells the build system that when scanning all sources of + "app" for implicit-dependencies, it should consider targets from "parser" + as potential dependencies. + </para> + </section> + + <section id="bbv2.tasks.crosscompile"> + <title>Cross-compilation</title> + + <indexterm><primary>cross compilation</primary></indexterm> + + <para>Boost.Build supports cross compilation with the gcc and msvc + toolsets.</para> + + <para> + When using gcc, you first need to specify your cross compiler + in <filename>user-config.jam</filename> (see <xref linkend="bbv2.overview.configuration"/>), + for example:</para> +<programlisting> +using gcc : arm : arm-none-linux-gnueabi-g++ ; +</programlisting> + <para> + After that, if the host and target os are the same, for example Linux, you can + just request that this compiler version be used: + </para> +<screen> +b2 toolset=gcc-arm +</screen> + + <para> + If you want to target a different operating system from the host, you need + to additionally specify the value for the <code>target-os</code> feature, for + example: + </para> +<screen> +# On windows box +b2 toolset=gcc-arm <emphasis role="bold">target-os=linux</emphasis> +# On Linux box +b2 toolset=gcc-mingw <emphasis role="bold">target-os=windows</emphasis> +</screen> + <para> + For the complete list of allowed opeating system names, please see the documentation for + <link linkend="bbv2.reference.features.target-os">target-os feature</link>. + </para> + + <para> + When using the msvc compiler, it's only possible to cross-compile to a 64-bit system + on a 32-bit host. Please see <xref linkend="v2.reference.tools.compiler.msvc.64"/> for + details. + </para> + + </section> + +</chapter> + +<!-- + Local Variables: + mode: nxml + sgml-indent-data: t + sgml-parent-document: ("userman.xml" "chapter") + sgml-set-face: t + End: +--> diff --git a/boost/tools/build/doc/src/tutorial.xml b/boost/tools/build/doc/src/tutorial.xml new file mode 100644 index 00000000..e36ac140 --- /dev/null +++ b/boost/tools/build/doc/src/tutorial.xml @@ -0,0 +1,682 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<?psgml nofill screen programlisting literallayout?> + +<chapter id="bbv2.tutorial"> + <title>Tutorial</title> + +<!-- You can't launch into this stuff without describing how to configure --> +<!-- Boost.Build... unless of course you think it's likely to work with --> +<!-- no configuration. But even if you do you have to tell people how to --> +<!-- configure their installation in case it doesn't work. --> +<!-- + VP: need also mention the examples which correspond to specific + sections. +--> + + <para> + This section will guide you though the most basic features of Boost.Build. + We will start with the “Hello, world” example, learn how + to use libraries, and finish with testing and installing features. + </para> + + <section id="bbv2.tutorial.hello"> + <title>Hello, world</title> + + <para> + The simplest project that Boost.Build can construct is stored in + <filename>example/hello/</filename> directory. The project is described by + a file called <filename>Jamroot</filename> that contains: + +<programlisting language="jam"> +exe hello : hello.cpp ; +</programlisting> + + Even with this simple setup, you can do some interesting things. First of + all, just invoking <command>b2</command> will build the <filename>hello + </filename> executable by compiling and linking <filename>hello.cpp + </filename>. By default, the debug variant is built. Now, to build the release + variant of <filename>hello</filename>, invoke + +<screen> +b2 release +</screen> + + Note that the debug and release variants are created in different directories, + so you can switch between variants or even build multiple variants at + once, without any unnecessary recompilation. Let us extend the example by + adding another line to our project's <filename>Jamroot</filename>: + +<programlisting language="jam"> +exe hello2 : hello.cpp ; +</programlisting> + + Now let us build both the debug and release variants of our project again: + +<screen> +b2 debug release +</screen> + + Note that two variants of <filename>hello2</filename> are linked. Since we + have already built both variants of <filename>hello</filename>, hello.cpp + will not be recompiled; instead the existing object files will just be + linked into the corresponding variants of <filename>hello2</filename>. Now + let us remove all the built products: + +<screen> +b2 --clean debug release +</screen> + + It is also possible to build or clean specific targets. The following two + commands, respectively, build or clean only the debug version of + <filename>hello2</filename>. + +<screen> +b2 hello2 +b2 --clean hello2 +</screen> + </para> + </section> + + <section id="bbv2.tutorial.properties"> + <title>Properties</title> + + <para> + To represent aspects of target configuration such as + debug and release variants, or single- and multi-threaded + builds portably, Boost.Build uses <firstterm>features</firstterm> with + associated <firstterm>values</firstterm>. For + example, the <code>debug-symbols</code> feature can have a value of <code>on</code> or + <code>off</code>. A <firstterm>property</firstterm> is just a (feature, + value) pair. When a user initiates a build, Boost.Build + automatically translates the requested properties into appropriate + command-line flags for invoking toolset components like compilers + and linkers. + </para> + + <para> + There are many built-in features that can be combined to + produce arbitrary build configurations. The following command + builds the project's <code>release</code> variant with inlining + disabled and debug symbols enabled: +<screen> +b2 release inlining=off debug-symbols=on +</screen> + </para> + + <para> + Properties on the command-line are specified with the syntax: + +<screen> +<replaceable>feature-name</replaceable>=<replaceable>feature-value</replaceable> +</screen> + </para> + + <para> + The <option>release</option> and <option>debug</option> that we have seen + in <command>b2</command> invocations are just a shorthand way to specify + values of the <varname>variant</varname> feature. For example, the + command above could also have been written this way: + + <screen> +b2 variant=release inlining=off debug-symbols=on + </screen> + </para> + + <para> + <varname>variant</varname> is so commonly-used that it has been given + special status as an <firstterm>implicit</firstterm> feature— + Boost.Build will deduce its identity just from the name of one of its + values. + </para> + + <para> + A complete description of features can be found in <xref linkend="bbv2.reference.features"/>. + </para> + + <section id="bbv2.tutorial.properties.requirements"> + <title>Build Requests and Target Requirements</title> + + <para> + The set of properties specified on the command line constitutes + a <firstterm>build request</firstterm>—a description of + the desired properties for building the requested targets (or, + if no targets were explicitly requested, the project in the + current directory). The <emphasis>actual</emphasis> + properties used for building targets are typically a + combination of the build request and properties derived from + the project's <filename>Jamroot</filename> (and its other + Jamfiles, as described in <xref + linkend="bbv2.tutorial.hierarchy"/>). For example, the + locations of <code>#include</code>d header files are normally + not specified on the command-line, but described in + Jamfiles as <firstterm>target + requirements</firstterm> and automatically combined with the + build request for those targets. Multithread-enabled + compilation is another example of a typical target + requirement. The Jamfile fragment below + illustrates how these requirements might be specified. + </para> + +<programlisting language="jam"> +exe hello + : hello.cpp + : <include>boost <threading>multi + ; +</programlisting> + + <para> + When <filename>hello</filename> is built, the two requirements specified + above will always be present. If the build request given on the + <command>b2</command> command-line explictly contradicts a target's + requirements, the target requirements usually override (or, in the case + of “free”” features like + <varname><include></varname>, + <footnote> + <para> + See <xref linkend="bbv2.reference.features.attributes"/> + </para> + </footnote> + augment) the build request. + </para> + + <tip> + <para> + The value of the <varname><include></varname> feature is + relative to the location of <filename>Jamroot</filename> where it is + used. + </para> + </tip> + </section> + + <section id="bbv2.tutorial.properties.project_attributes"> + <title>Project Attributes</title> + + <para> + If we want the same requirements for our other target, + <filename>hello2</filename>, we could simply duplicate them. However, + as projects grow, that approach leads to a great deal of repeated + boilerplate in Jamfiles. + + Fortunately, there's a better way. Each project can specify a set of + <firstterm>attributes</firstterm>, including requirements: + +<programlisting language="jam"> +project + : requirements <include>/home/ghost/Work/boost <threading>multi + ; + +exe hello : hello.cpp ; +exe hello2 : hello.cpp ;</programlisting> + + The effect would be as if we specified the same requirement for both + <filename>hello</filename> and <filename>hello2</filename>. + </para> + </section> + </section> + + <section id="bbv2.tutorial.hierarchy"> + <title>Project Hierarchies</title> + + <para> + So far we have only considered examples with one project, with + one user-written Boost.Jam file, <filename>Jamroot</filename>. A typical + large codebase would be composed of many projects organized into a tree. + The top of the tree is called the <firstterm>project root</firstterm>. + Every subproject is defined by a file called <filename>Jamfile</filename> + in a descendant directory of the project root. The parent project of a + subproject is defined by the nearest <filename>Jamfile</filename> or + <filename>Jamroot</filename> file in an ancestor directory. For example, + in the following directory layout: + +<screen> +top/ + | + +-- Jamroot + | + +-- app/ + | | + | +-- Jamfile + | `-- app.cpp + | + `-- util/ + | + +-- foo/ + . | + . +-- Jamfile + . `-- bar.cpp +</screen> + + the project root is <filename>top/</filename>. The projects in + <filename>top/app/</filename> and <filename>top/util/foo/</filename> are + immediate children of the root project. + + <note> + <para> + When we refer to a “Jamfile,” set in normal + type, we mean a file called either + <filename>Jamfile</filename> or + <filename>Jamroot</filename>. When we need to be more + specific, the filename will be set as + “<filename>Jamfile</filename>” or + “<filename>Jamroot</filename>.” + </para> + </note> + </para> + + <para> + Projects inherit all attributes (such as requirements) + from their parents. Inherited requirements are combined with + any requirements specified by the subproject. + For example, if <filename>top/Jamroot</filename> has + +<programlisting language="jam"> +<include>/home/ghost/local +</programlisting> + + 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. <footnote> + <para>Many + features will be overridden, + rather than added-to, in subprojects. See <xref + linkend="bbv2.reference.features.attributes"/> for more + information</para> + </footnote> + More details can be found in + <xref linkend= "bbv2.overview.projects"/>. + </para> + + <para> + Invoking <command>b2</command> without explicitly specifying + any targets on the command line builds the project rooted in the + current directory. Building a project does not automatically + cause its subprojects to be built unless the parent project's + Jamfile explicitly requests it. In our example, + <filename>top/Jamroot</filename> might contain: + +<programlisting language="jam"> +build-project app ; +</programlisting> + + which would cause the project in <filename>top/app/</filename> + to be built whenever the project in <filename>top/</filename> is + built. However, targets in <filename>top/util/foo/</filename> + will be built only if they are needed by targets in + <filename>top/</filename> or <filename>top/app/</filename>. + </para> + </section> + + <section id="bbv2.tutorial.libs"> + <title>Dependent Targets</title> + + <para> + When building a target <filename>X</filename> that depends on first + building another target <filename>Y</filename> (such as a + library that must be linked with <firstterm>X</firstterm>), + <filename>Y</filename> is called a + <firstterm>dependency</firstterm> of <filename>X</filename> and + <filename>X</filename> is termed a + <firstterm>dependent</firstterm> of <filename>Y</filename>. + </para> + + <para>To get a feeling of target dependencies, let's continue the + above example and see how <filename>top/app/Jamfile</filename> can + use libraries from <filename>top/util/foo</filename>. If + <filename>top/util/foo/Jamfile</filename> contains + +<programlisting language="jam"> +lib bar : bar.cpp ; +</programlisting> + + then to use this library in <filename>top/app/Jamfile</filename>, we can + write: + +<programlisting language="jam"> +exe app : app.cpp ../util/foo//bar ; +</programlisting> + + While <code>app.cpp</code> refers to a regular source file, + <code>../util/foo//bar</code> is a reference to another target: + a library <filename>bar</filename> declared in the Jamfile at + <filename>../util/foo</filename>. + </para> + + <tip> + <para>Some other build system have special syntax for listing dependent + libraries, for example <varname>LIBS</varname> variable. In Boost.Build, + you just add the library to the list of sources. + </para> + </tip> + + <para>Suppose we build <filename>app</filename> with: + <screen> +b2 app optimization=full define=USE_ASM + </screen> + Which properties will be used to build <code>foo</code>? The answer is + that some features are + <firstterm>propagated</firstterm>—Boost.Build attempts to use + dependencies with the same value of propagated features. The + <varname><optimization></varname> feature is propagated, so both + <filename>app</filename> and <filename>foo</filename> will be compiled + with full optimization. But <varname><define></varname> is not + propagated: its value will be added as-is to the compiler flags for + <filename>a.cpp</filename>, but won't affect <filename>foo</filename>. + </para> + + + <para> + Let's improve this project further. The library probably has some headers + that must be used when compiling <filename>app.cpp</filename>. We could + manually add the necessary <code>#include</code> paths to + <filename>app</filename>'s requirements as values of the + <varname><include> </varname> feature, but then this work will be + repeated for all programs that use <filename>foo</filename>. A better + solution is to modify <filename>util/foo/Jamfile</filename> in this way: + + <programlisting language="jam"> +project + : usage-requirements <include>. + ; + +lib foo : foo.cpp ;</programlisting> + + Usage requirements are applied not to the target being declared but to its + dependents. In this case, <literal><include>.</literal> will be + applied to all targets that directly depend on <filename>foo</filename>. + </para> + + <para> + Another improvement is using symbolic identifiers to refer to the library, + as opposed to <filename>Jamfile</filename> location. In a large project, a + library can be used by many targets, and if they all use <filename>Jamfile + </filename> location, a change in directory organization entails much + work. The solution is to use project ids—symbolic names not tied to + directory layout. First, we need to assign a project id by adding this + code to <filename>Jamroot</filename>: + </para> + + <programlisting language="jam"> +use-project /library-example/foo : util/foo ;</programlisting> + + <para> + Second, we modify <filename>app/Jamfile</filename> to use the project id: + <programlisting> +exe app : app.cpp /library-example/foo//bar ;</programlisting> + + The <filename>/library-example/foo//bar</filename> syntax is used to refer + to the target <filename>bar</filename> in the project with id <filename> + /library-example/foo</filename>. We've achieved our goal—if the + library is moved to a different directory, only <filename>Jamroot + </filename> must be modified. Note that project ids are global—two + Jamfiles are not allowed to assign the same project id to different + directories. + </para> + + <tip> + <para>If you want all applications in some project to link to a certain + library, you can avoid having to specify directly the sources of + every target by using the <varname><library></varname> property. + For example, if <filename>/boost/filesystem//fs</filename> should be + linked to all applications in your project, you can add + <code><library>/boost/filesystem//fs</code> to the project's + requirements, like this: + </para> + + <programlisting language="jam"> +project + : requirements <library>/boost/filesystem//fs + ;</programlisting> + </tip> + </section> + + <section id="bbv2.tutorial.linkage"> + <title>Static and shared libraries</title> + + <para> + Libraries can be either <emphasis>static</emphasis>, which means they are + included in executable files that use them, or <emphasis>shared</emphasis> + (a.k.a. <emphasis>dynamic</emphasis>), which are only referred to from + executables, and must be available at run time. Boost.Build can create and + use both kinds. + </para> + + <para> + The kind of library produced from a <code>lib</code> target is determined + by the value of the <varname>link</varname> feature. Default value is + <literal>shared</literal>, and to build a static library, the value should + be <literal>static</literal>. You can request a static build either on the + command line: + <programlisting>b2 link=static</programlisting> + or in the library's requirements: + <programlisting language="jam">lib l : l.cpp : <link>static ;</programlisting> + </para> + + <para> + We can also use the <varname><link></varname> property to express + linking requirements on a per-target basis. For example, if a particular + executable can be correctly built only with the static version of a + library, we can qualify the executable's <link + linkend="bbv2.reference.targets.references">target reference</link> to the + library as follows: + +<!-- There has been no earlier indication that target references can contain + properties. You can't assume that the reader will recognize that strange + incantation as a target reference, or that she'll know what it means. You + also can't assume that hyperlinks will help the reader, because she may be + working from a printout, as I was. + VP: to be addressed when this section is moved. See comment below. +--> + + <programlisting language="jam"> +exe important : main.cpp helpers/<link>static ;</programlisting> + + No matter what arguments are specified on the <command>b2</command> + command line, <filename>important</filename> will only be linked with the + static version of <filename>helpers</filename>. + </para> + + <para> + Specifying properties in target references is especially useful if you use + a library defined in some other project (one you can't change) but you + still want static (or dynamic) linking to that library in all cases. If + that library is used by many targets, you <emphasis>could</emphasis> use + target references everywhere: + + <programlisting language="jam"> +exe e1 : e1.cpp /other_project//bar/<link>static ; +exe e10 : e10.cpp /other_project//bar/<link>static ;</programlisting> + + but that's far from being convenient. A better approach is to introduce a + level of indirection. Create a local <type>alias</type> target that refers + to the static (or dynamic) version of <filename>foo</filename>: + + <programlisting> +alias foo : /other_project//bar/<link>static ; +exe e1 : e1.cpp foo ; +exe e10 : e10.cpp foo ;</programlisting> + + The <link linkend="bbv2.tasks.alias">alias</link> rule is specifically + used to rename a reference to a target and possibly change the + properties. + + <!-- You should introduce the alias rule in an earlier section, before + describing how it applies to this specific use-case, and the + foregoing sentence should go there. + VP: we've agreed that this section should be moved further in the + docs, since it's more like advanced reading. When I move it, I'll + make sure 'alias' is already mentioned. + --> + </para> + + <tip> + <para> + When one library uses another, you put the second library in the source + list of the first. For example: + <programlisting language="jam"> +lib utils : utils.cpp /boost/filesystem//fs ; +lib core : core.cpp utils ; +exe app : app.cpp core ;</programlisting> + This works no matter what kind of linking is used. When <filename>core + </filename> is built as a shared library, links <filename>utils + </filename> directly into it. Static libraries can't link to other + libraries, so when <filename>core</filename> is built 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>. + </para> + </tip> + + <note> + <para> + (Note for non-UNIX system). Typically, shared libraries must be + installed to a directory in the dynamic linker's search path. Otherwise, + applications that use shared libraries can't be started. On Windows, the + dynamic linker's search path is given by the <envar>PATH</envar> + environment variable. This restriction is lifted when you use + Boost.Build testing facilities—the <envar>PATH</envar> variable + will be automatically adjusted before running the executable. + <!-- Need ref here to 'testing facilities' --> + </para> + </note> + </section> + + <section id="bbv2.tutorial.conditions"> + <title>Conditions and alternatives</title> + + <para> + Sometimes, particular relationships need to be maintained among a target's + build properties. For example, you might want to set specific <code> + #define</code> when a library is built as shared, or when a target's + <code>release</code> variant is built. This can be achieved using + <firstterm>conditional requirements</firstterm>. + + <programlisting language="jam"> +lib network : network.cpp + : <emphasis role="bold"><link>shared:<define>NETWORK_LIB_SHARED</emphasis> + <variant>release:<define>EXTRA_FAST + ;</programlisting> + + In the example above, whenever <filename>network</filename> is built with + <code language="jam"><link>shared</code>, <code language="jam"><define>NETWORK_LIB_SHARED + </code> will be in its properties, too. Also, whenever its release variant + is built, <code><define>EXTRA_FAST</code> will appear in its + properties. + </para> + + <para> + Sometimes the ways a target is built are so different that describing them + using conditional requirements would be hard. For example, imagine that a + library actually uses different source files depending on the toolset used + to build it. We can express this situation using <firstterm>target + alternatives</firstterm>: + <programlisting language="jam"> +lib demangler : dummy_demangler.cpp ; # alternative 1 +lib demangler : demangler_gcc.cpp : <toolset>gcc ; # alternative 2 +lib demangler : demangler_msvc.cpp : <toolset>msvc ; # alternative 3</programlisting> + When building <filename>demangler</filename>, Boost.Build will compare + requirements for each alternative with build properties to find the best + match. For example, when building with <code language="jam"><toolset>gcc</code> + alternative 2, will be selected, and when building with + <code language="jam"><toolset>msvc</code> alternative 3 will be selected. In all + other cases, the most generic alternative 1 will be built. + </para> + </section> + + <section id="bbv2.tutorial.prebuilt"> + <title>Prebuilt targets</title> + + <para> + To link to libraries whose build instructions aren't given in a Jamfile, + you need to create <code>lib</code> targets with an appropriate + <varname>file</varname> property. Target alternatives can be used to + associate multiple library files with a single conceptual target. For + example: + <programlisting language="jam"> +# util/lib2/Jamfile +lib lib2 + : + : <file>lib2_release.a <variant>release + ; + +lib lib2 + : + : <file>lib2_debug.a <variant>debug + ;</programlisting> + + This example defines two alternatives for <filename>lib2</filename>, and + for each one names a prebuilt file. Naturally, there are no sources. + Instead, the <varname><file></varname> feature is used to specify + the file name. + </para> + + <para> + Once a prebuilt target has been declared, it can be used just like any + other target: + + <programlisting language="jam"> +exe app : app.cpp ../util/lib2//lib2 ;</programlisting> + + As with any target, the alternative selected depends on the properties + propagated from <filename>lib2</filename>'s dependents. If we build the + release and debug versions of <filename>app</filename> it will be linked + with <filename>lib2_release.a</filename> and <filename>lib2_debug.a + </filename>, respectively. + </para> + + <para> + System libraries—those that are automatically found by the toolset + by searching through some set of predetermined paths—should be + declared almost like regular ones: + + <programlisting language="jam"> +lib pythonlib : : <name>python22 ;</programlisting> + + We again don't specify any sources, but give a <varname>name</varname> + that should be passed to the compiler. If the gcc toolset were used to + link an executable target to <filename>pythonlib</filename>, + <option>-lpython22</option> would appear in the command line (other + compilers may use different options). + </para> + + <para> + We can also specify where the toolset should look for the library: + + <programlisting language="jam"> +lib pythonlib : : <name>python22 <search>/opt/lib ;</programlisting> + + And, of course, target alternatives can be used in the usual way: + + <programlisting language="jam"> +lib pythonlib : : <name>python22 <variant>release ; +lib pythonlib : : <name>python22_d <variant>debug ;</programlisting> + </para> + + <para> + A more advanced use of prebuilt targets is described in <xref linkend= + "bbv2.recipies.site-config"/>. + </para> + </section> +</chapter> + +<!-- + Local Variables: + mode: nxml + sgml-indent-data:t + sgml-parent-document:("userman.xml" "chapter") + sgml-set-face: t + sgml-omittag:nil + sgml-shorttag:nil + sgml-namecase-general:t + sgml-general-insert-case:lower + sgml-minimize-attributes:nil + sgml-always-quote-attributes:t + sgml-indent-step:2 + sgml-exposed-tags:nil + sgml-local-catalogs:nil + sgml-local-ecat-files:nil + End: +--> diff --git a/boost/tools/build/doc/src/type.xml b/boost/tools/build/doc/src/type.xml new file mode 100644 index 00000000..6ca7cc7a --- /dev/null +++ b/boost/tools/build/doc/src/type.xml @@ -0,0 +1,236 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<section id="bbv2.reference.modules.type"> + + <title>type</title> + <indexterm> + <primary>type</primary> + <secondary>module</secondary> + </indexterm> + + <para> + Deals with target type declaration and defines target class which supports + typed targets. + </para> + + <orderedlist> + + <listitem id="bbv2.reference.modules.type.register"> + <indexterm zone="bbv2.reference.modules.type.register"> + <primary>register</primary> + <secondary>type</secondary> + </indexterm> + <code language="jam">rule register ( type : suffixes * : base-type ? )</code> + <para> + Registers a target type, possible derived from a + <code language="jam">base-type</code>. Providing a list + of suffixes here is a shortcut for separately calling the + <link linkend="bbv2.reference.modules.type.register-suffixes">register-suffixes</link> + rule with the given suffixes and the + <link linkend="bbv2.reference.modules.type.set-generated-target-suffix">set-generated-target-suffix</link> + rule with the first given suffix. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.register-suffixes"> + <indexterm zone="bbv2.reference.modules.type.register-suffixes"> + <primary>register-suffixes</primary> + </indexterm> + <code language="jam">rule register-suffixes ( suffixes + : type )</code> + <para> + Specifies that files with suffix from <code language="jam">suffixes</code> + be recognized as targets of type <code language="jam">type</code>. + Issues an error if a different type is already specified for any + of the suffixes. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.registered"> + <indexterm zone="bbv2.reference.modules.type.registered"> + <primary>registered</primary> + </indexterm> + <code language="jam">rule registered ( type )</code> + <para>Returns true iff type has been registered.</para> + </listitem> + + <listitem id="bbv2.reference.modules.type.validate"> + <indexterm zone="bbv2.reference.modules.type.validate"> + <primary>validate</primary> + </indexterm> + <code language="jam">rule validate ( type )</code> + <para>Issues an error if <code lang="jam">type</code> is unknown.</para> + </listitem> + + <listitem id="bbv2.reference.modules.type.set-scanner"> + <indexterm zone="bbv2.reference.modules.type.set-scanner"> + <primary>set-scanner</primary> + </indexterm> + <code language="jam">rule set-scanner ( type : scanner )</code> + <para>Sets a scanner class that will be used for this type.</para> + </listitem> + + <listitem id="bbv2.reference.modules.type.get-scanner"> + <indexterm zone="bbv2.reference.modules.type.get-scanner"> + <primary>get-scanner</primary> + </indexterm> + <code language="jam">rule get-scanner ( type : property-set )</code> + <para> + Returns a scanner instance appropriate to <code language="jam">type</code> + and <code language="jam">property-set</code>. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.base"> + <indexterm zone="bbv2.reference.modules.type.base"> + <primary>base</primary> + </indexterm> + <code language="jam">rule base ( type )</code> + <para> + Returns a base type for the given type or nothing in case the given + type is not derived. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.all-bases"> + <indexterm zone="bbv2.reference.modules.type.all-bases"> + <primary>all-bases</primary> + </indexterm> + <code language="jam">rule all-bases ( type )</code> + <para> + Returns the given type and all of its base types in order of + their distance from type. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.all-derived"> + <indexterm zone="bbv2.reference.modules.type.all-derived"> + <primary>all-derived</primary> + </indexterm> + <code language="jam">rule all-derived ( type )</code> + <para> + Returns the given type and all of its derived types in order + of their distance from type. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.is-derived"> + <indexterm zone="bbv2.reference.modules.type.is-derived"> + <primary>is-derived</primary> + </indexterm> + <code language="jam">rule is-derived ( type base )</code> + <para> + Returns true if <code language="jam">type</code> is equal to + <code language="jam">base</code> or has <code language="jam">base</code> + as its direct or indirect base. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.set-generated-target-suffix"> + <indexterm zone="bbv2.reference.modules.type.set-generated-target-suffix"> + <primary>set-generated-target-suffix</primary> + </indexterm> + <code language="jam">rule set-generated-target-suffix ( type : properties * : suffix )</code> + <para> + Sets a file suffix to be used when generating a target of <code language="jam">type</code> with the + specified properties. Can be called with no properties if no suffix has + already been specified for the <code language="jam">type</code>. The <code language="jam">suffix</code> parameter can be an empty + string (<code language="jam">""</code>) to indicate that no suffix should be used. + </para> + + <para> + Note that this does not cause files with <code language="jam">suffix</code> + to be automatically recognized as being of <code language="jam">type</code>. + Two different types can use the same suffix for their generated files + but only one type can be auto-detected for a file with that suffix. + User should explicitly specify which one using the + <link linkend="bbv2.reference.modules.type.register-suffixes">register-suffixes</link> + rule. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.change-generated-target-suffix"> + <indexterm zone="bbv2.reference.modules.type.change-generated-target-suffix"> + <primary>change-generated-target-suffix</primary> + </indexterm> + <code language="jam">rule change-generated-target-suffix ( type : properties * : suffix )</code> + <para> + Change the suffix previously registered for this type/properties + combination. If suffix is not yet specified, sets it. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.generated-target-suffix"> + <indexterm zone="bbv2.reference.modules.type.generated-target-suffix"> + <primary>generated-target-suffix</primary> + </indexterm> + <code language="jam">rule generated-target-suffix ( type : property-set )</code> + <para> + Returns the suffix used when generating a file of + <code language="jam">type</code> with the given properties. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.set-generated-target-prefix"> + <indexterm zone="bbv2.reference.modules.type.set-generated-target-prefix"> + <primary>set-generated-target-prefix</primary> + </indexterm> + <code language="jam">rule set-generated-target-prefix ( type : properties * : prefix )</code> + <para> + Sets a target prefix that should be used when generating targets of + <code language="jam">type</code> with the specified properties. Can + be called with empty properties if no prefix for + <code language="jam">type</code> has been specified yet. + </para> + + <para> + The <code language="jam">prefix</code> parameter can be empty string + (<code language="jam">""</code>) to indicate that no prefix + should be used. + </para> + + <para> + Usage example: library names use the <code language="jam">"lib"</code> + prefix on unix. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.change-generated-target-prefix"> + <indexterm zone="bbv2.reference.modules.type.change-generated-target-prefix"> + <primary>change-generated-target-prefix</primary> + </indexterm> + <code language="jam">rule change-generated-target-prefix ( type : properties * : prefix )</code> + <para> + Change the prefix previously registered for this type/properties + combination. If prefix is not yet specified, sets it. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.generated-target-prefix"> + <indexterm zone="bbv2.reference.modules.type.generated-target-prefix"> + <primary>generated-target-prefix</primary> + </indexterm> + <code language="jam">rule generated-target-prefix ( type : property-set )</code> + <para> + Returns the prefix used when generating a file of + <code language="jam">type</code> with the given properties. + </para> + </listitem> + + <listitem id="bbv2.reference.modules.type.type"> + <indexterm zone="bbv2.reference.modules.type.type"> + <primary>type</primary> + <secondary>rule</secondary> + </indexterm> + <code language="jam">rule type ( filename )</code> + <para> + 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. + </para> + </listitem> + + </orderedlist> + +</section> diff --git a/boost/tools/build/doc/src/typed-target.xml b/boost/tools/build/doc/src/typed-target.xml new file mode 100644 index 00000000..2a7d7c98 --- /dev/null +++ b/boost/tools/build/doc/src/typed-target.xml @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE section PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<section id="bbv2.reference.class.typed-target"> + + <title>Class typed-target</title> + <indexterm> + <primary>typed-target</primary> + </indexterm> + +<programlisting language="jam"> +class typed-target : <link linkend="bbv2.reference.class.basic-target">basic-target</link> { + rule <link linkend="bbv2.reference.class.typed-target.__init__">__init__</link> ( name : project : type : sources * : requirements * : default-build * : usage-requirements * ) + rule <link linkend="bbv2.reference.class.typed-target.type">type</link> ( ) + rule <link linkend="bbv2.reference.class.typed-target.construct">construct</link> ( name : source-targets * : property-set ) + + # Methods inherited from <link linkend="bbv2.reference.class.abstract-target">abstract-target</link> + rule <link linkend="bbv2.reference.class.abstract-target.name">name</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.project">project</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.location">location</link> ( ) + rule <link linkend="bbv2.reference.class.abstract-target.full-name">full-name</link> ( ) + + # Methods inherited from <link linkend="bbv2.reference.class.basic-target">basic-target</link> + rule <link linkend="bbv2.reference.class.basic-target.generate">generate</link> ( property-set ) + } +</programlisting> + + <para> + <link linkend="bbv2.reference.class.typed-target">typed-target</link> + is the most common kind of target alternative. Rules for creating + typed targets are defined automatically for each type. + </para> + + <orderedlist> + + <listitem id="bbv2.reference.class.typed-target.__init__"> + <code language="jam">rule __init__ ( name : project : type : sources * : requirements * : default-build * : usage-requirements * )</code> + <para> + <variablelist> + <varlistentry> + <term><literal>name</literal></term> + <listitem><para>The name of the target</para></listitem> + </varlistentry> + <varlistentry> + <term><literal>project</literal></term> + <listitem> + <para> + The <link linkend="bbv2.reference.class.project-target">project</link> + in which the target is declared. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>type</literal></term> + <listitem> + <para> + The <link linkend="bbv2.reference.modules.type">type</link> + of the target. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </listitem> + + <listitem id="bbv2.reference.class.typed-target.type"> + <indexterm zone="bbv2.reference.class.typed-target.type"> + <primary>type</primary> + <secondary>Typed Target Method</secondary> + </indexterm> + <code language="jam">rule type ( )</code> + <para> + Returns the <link linkend="bbv2.reference.modules.type">type</link> + of the target. + </para> + </listitem> + + <listitem id="bbv2.reference.class.typed-target.construct"> + <indexterm zone="bbv2.reference.class.typed-target.construct"> + <primary>construct</primary> + <secondary>Typed Target Method</secondary> + </indexterm> + <code language="jam">rule construct ( name : source-targets * : property-set )</code> + <para> + Implements <link linkend="bbv2.reference.class.basic-target.construct"> + basic-target.construct</link>. Attempts to create a target of + the correct type using generators appropriate for the given + <link linkend="bbv2.reference.class.property-set">property-set</link>. + Returns a <link linkend="bbv2.reference.class.property-set"> + property-set</link> containing the usage requirements + and a list of virtual targets. + + <note> + <para> + This function is invoked automatically by + <link linkend="bbv2.reference.class.basic-target.generate">basic-target.generate</link> + and should not be called directly by users. + </para> + </note> + </para> + </listitem> + + </orderedlist> + +</section> diff --git a/boost/tools/build/doc/src/userman.xml b/boost/tools/build/doc/src/userman.xml new file mode 100644 index 00000000..396d8514 --- /dev/null +++ b/boost/tools/build/doc/src/userman.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE part PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd"> + +<part xmlns:xi="http://www.w3.org/2001/XInclude" + id="bbv2" last-revision="$Date$"> + + <title>Boost.Build User Manual</title> + + <!-- Chapters --> + <xi:include href="howto.xml"/> + <xi:include href="install.xml"/> + <xi:include href="tutorial.xml"/> + <xi:include href="overview.xml"/> + <xi:include href="tasks.xml"/> + <xi:include href="reference.xml"/> + <xi:include href="extending.xml"/> + <xi:include href="faq.xml"/> + + <!-- Appendicies --> +<!-- <xi:include href="architecture.xml"/> --> + +</part> |
