From 3f108da0252a7717c1ce70ff45b85447be215ba9 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 12 Dec 2006 00:45:23 +0000 Subject: [PATCH 01/27] Import Boost.MPI with the beginnings of a BBv2-based build system [SVN r36337] --- v2/tools/mpi.jam | 316 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 316 insertions(+) create mode 100644 v2/tools/mpi.jam diff --git a/v2/tools/mpi.jam b/v2/tools/mpi.jam new file mode 100644 index 000000000..10a295504 --- /dev/null +++ b/v2/tools/mpi.jam @@ -0,0 +1,316 @@ +# Support for the Message Passing Interface (MPI) +# +# (C) Copyright 2005, 2006 Trustees of Indiana University +# (C) Copyright 2005 Douglas Gregor +# +# 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.) +# +# Authors: Douglas Gregor +# Andrew Lumsdaine +# +# ==== MPI Configuration ==== +# +# For many users, MPI support can be enabled simply by adding the following +# line to your user-config.jam file: +# +# using mpi ; +# +# This should auto-detect MPI settings based on the MPI wrapper compiler in +# your path, e.g., "mpic++". If the wrapper compiler is not in your path, or +# has a different name, you can pass the name of the wrapper compiler as the +# first argument to the mpi module: +# +# using mpi : /opt/mpich2-1.0.4/bin/mpiCC ; +# +# If your MPI implementation does not have a wrapper compiler, or the MPI +# auto-detection code does not work with your MPI's wrapper compiler, +# you can pass MPI-related options explicitly via the second parameter to the +# mpi module: +# +# using mpi : : lammpio lammpi++ +# mpi lam +# dl ; +# +# To see the results of MPI auto-detection, pass "--debug-configuration" on +# the bjam command line. +# +# ==== Linking Against the MPI Libraries === +# +# To link against the MPI libraries, import the "mpi" module and add the +# following requirement to your target: +# +# /mpi//mpi +# +# Since MPI support is not always available, you should check +# "mpi.configured" before trying to link against the MPI libraries. + +import common ; +import project ; + +# Make this module a project +project.initialize $(__name__) ; +project mpi ; + +if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ] +{ + .debug-configuration = true ; +} + +# Assuming the first part of the command line is the given prefix +# followed by some non-empty value, remove the first argument. Returns +# either nothing (if there was no prefix or no value) or a pair +# +# value rest-of-cmdline +# +# This is a subroutine of cmdline_to_features +rule add_feature ( prefix name cmdline ) +{ + local match = [ MATCH "^$(prefix)([^\" ]+|\"[^\"]+\") *(.*)$" : $(cmdline) ] ; + + # If there was no value associated with the prefix, abort + if ! $(match) { + return ; + } + + local value = $(match[1]) ; + + if [ MATCH " +" : $(value) ] { + value = "\"$(value)\"" ; + } + + return "<$(name)>$(value)" $(match[2]) ; +} + +# Strip any end-of-line characters off the given string and return the +# result. +rule strip-eol ( string ) +{ + local match = [ MATCH "^(([A-Za-z0-9~`\.!@#$%^&*()_+={};:'\",.<>/?\\| -]|[|])*).*$" : $(string) ] ; + + if $(match) + { + return $(match[1]) ; + } + else + { + return $(string) ; + } +} + +# Split a command-line into a set of features. Certain kinds of +# compiler flags are recognized (e.g., -I, -D, -L, -l) and replaced +# with their Boost.Build equivalents (e.g., , , +# , ). All other arguments are introduced +# using the features in the unknown-features parameter, because we +# don't know how to deal with them. For instance, if your compile and +# correct. The incoming command line should be a string starting with +# an executable (e.g., g++ -I/include/path") and may contain any +# number of command-line arguments thereafter. The result is a list of +# features corresponding to the given command line, ignoring the +# executable. +rule cmdline_to_features ( cmdline : unknown-features ? ) +{ + local executable ; + local features ; + local otherflags ; + local result ; + + unknown-features ?= ; + + # Pull the executable out of the command line. At this point, the + # executable is just thrown away. + local match = [ MATCH "^([^\" ]+|\"[^\"]+\") *(.*)$" : $(cmdline) ] ; + executable = $(match[1]) ; + cmdline = $(match[2]) ; + + # List the prefix/feature pairs that we will be able to transform. + # Every kind of parameter not mentioned here will be placed in both + # cxxflags and linkflags, because we don't know where they should go. + local feature_kinds-D = "define" ; + local feature_kinds-I = "include" ; + local feature_kinds-L = "library-path" ; + local feature_kinds-l = "find-shared-library" ; + + while $(cmdline) { + + # Check for one of the feature prefixes we know about. If we + # find one (and the associated value is nonempty), convert it + # into a feature. + local match = [ MATCH "^(-.)(.*)" : $(cmdline) ] ; + local matched ; + if $(match) && $(match[2]) { + local prefix = $(match[1]) ; + if $(feature_kinds$(prefix)) { + local name = $(feature_kinds$(prefix)) ; + local add = [ add_feature $(prefix) $(name) $(cmdline) ] ; + + if $(add) { + result += $(add[1]) ; + cmdline = $(add[2]) ; + matched = yes ; + } + } + } + + # If we haven't matched a feature prefix, just grab the command-line + # argument itself. If we can map this argument to a feature + # (e.g., -pthread -> multi), then do so; otherwise, + # and add it to the list of "other" flags that we don't + # understand. + if ! $(matched) { + match = [ MATCH "^([^\" ]+|\"[^\"]+\") *(.*)$" : $(cmdline) ] ; + local value = $(match[1]) ; + cmdline = $(match[2]) ; + + # Check for multithreading support + if $(value) = "-pthread" || $(value) = "-pthreads" + { + result += "multi" ; + } + else if [ MATCH "(.*[a-zA-Z0-9<>?-].*)" : $(value) ] { + otherflags += $(value) ; + } + } + } + + # If there are other flags that we don't understand, add them to the + # result as both and + if $(otherflags) { + for unknown in $(unknown-features) + { + result += "$(unknown)$(otherflags)" ; + } + } + + return $(result) ; +} + +# Determine if it is safe to execute the given shell command by trying +# to execute it and determining whether the exit code is zero or +# not. Returns true for an exit code of zero, false otherwise. +local rule safe-shell-command ( cmdline ) +{ + local result = [ SHELL "$(cmdline) > /dev/null 2>/dev/null; if [ "$?" -eq "0" ]; then echo SSCOK; fi" ] ; + return [ MATCH ".*(SSCOK).*" : $(result) ] ; +} + +# Initialize the MPI module. +rule init ( mpicxx ? : options * ) +{ + .configured = true ; + + if ! $(options) + { + if $(.debug-configuration) + { + ECHO "===============MPI Auto-configuration===============" ; + } + + # Try to auto-detect options based on the wrapper compiler + local command = [ common.get-invocation-command mpi : mpic++ : $(mpicxx) ] ; + + local result ; + local compile_flags ; + local link_flags ; + + # OpenMPI and newer versions of LAM-MPI have -showme:compile and + # -showme:link. + if [ safe-shell-command "$(command) -showme:compile" ] && + [ safe-shell-command "$(command) -showme:link" ] + { + if $(.debug-configuration) + { + ECHO "Found recent LAM-MPI or Open MPI wrapper compiler: $(command)" ; + } + + compile_flags = [ SHELL "$(command) -showme:compile" ] ; + link_flags = [ SHELL "$(command) -showme:link" ] ; + + # Prepend COMPILER as the executable name, to match the format of + # other compilation commands. + compile_flags = "COMPILER $(compile_flags)" ; + link_flags = "COMPILER $(link_flags)" ; + } + # Look for LAM-MPI's -showme + else if [ safe-shell-command "$(command) -showme" ] + { + if $(.debug-configuration) + { + ECHO "Found older LAM-MPI wrapper compiler: $(command)" ; + } + + result = [ SHELL "$(command) -showme" ] ; + } + # Look for MPICH + else if [ safe-shell-command "$(command) -show" ] + { + if $(.debug-configuration) + { + ECHO "Found MPICH wrapper compiler: $(command)" ; + } + compile_flags = [ SHELL "$(command) -compile_info" ] ; + link_flags = [ SHELL "$(command) -link_info" ] ; + } + + if $(result) || $(compile_flags) && $(link_flags) + { + if $(result) + { + result = [ strip-eol $(result) ] ; + options = [ cmdline_to_features $(result) ] ; + } + else + { + compile_flags = [ strip-eol $(compile_flags) ] ; + link_flags = [ strip-eol $(link_flags) ] ; + + # Separately process compilation and link features, then combine + # them at the end. + local compile_features = [ cmdline_to_features $(compile_flags) + : "" ] ; + local link_features = [ cmdline_to_features $(link_flags) + : "" ] ; + options = $(compile_features) $(link_features) ; + } + + # If requested, display MPI configuration information. + if $(.debug-configuration) + { + if $(result) + { + ECHO " Wrapper compiler command line: $(result)" ; + } + else + { + local match = [ MATCH "^([^\" ]+|\"[^\"]+\") *(.*)$" + : $(compile_flags) ] ; + ECHO "MPI compilation flags: $(match[2])" ; + local match = [ MATCH "^([^\" ]+|\"[^\"]+\") *(.*)$" + : $(link_flags) ] ; + ECHO "MPI link flags: $(match[2])" ; + } + echo "MPI build features: " ; + ECHO $(options) ; + } + } else { + ECHO "MPI auto-detection failed." ; + ECHO "You will need to manually configure MPI support." ; + } + + if $(.debug-configuration) + { + ECHO "====================================================" ; + } + } + + # Set up the "mpi" alias + alias mpi : : : : $(options) ; +} + +rule configured ( ) +{ + return $(.configured) ; +} + +# IMPORT $(__name__) : configured : : configured ; \ No newline at end of file From 0020697490101a2dba3d1ac35949dcc0edf712f7 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 12 Dec 2006 01:02:50 +0000 Subject: [PATCH 02/27] Robustify MPI auto-detection a bit [SVN r36339] --- v2/tools/mpi.jam | 47 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/v2/tools/mpi.jam b/v2/tools/mpi.jam index 10a295504..b03972fd9 100644 --- a/v2/tools/mpi.jam +++ b/v2/tools/mpi.jam @@ -198,8 +198,6 @@ local rule safe-shell-command ( cmdline ) # Initialize the MPI module. rule init ( mpicxx ? : options * ) { - .configured = true ; - if ! $(options) { if $(.debug-configuration) @@ -210,14 +208,24 @@ rule init ( mpicxx ? : options * ) # Try to auto-detect options based on the wrapper compiler local command = [ common.get-invocation-command mpi : mpic++ : $(mpicxx) ] ; + if ! $(mpicxx) && ! $(command) + { + # Try "mpiCC", which is used by MPICH + command = [ common.get-invocation-command mpi : mpiCC ] ; + } + local result ; local compile_flags ; local link_flags ; + if ! $(command) + { + # Do nothing: we'll complain later + } # OpenMPI and newer versions of LAM-MPI have -showme:compile and # -showme:link. - if [ safe-shell-command "$(command) -showme:compile" ] && - [ safe-shell-command "$(command) -showme:link" ] + else if [ safe-shell-command "$(command) -showme:compile" ] && + [ safe-shell-command "$(command) -showme:link" ] { if $(.debug-configuration) { @@ -293,24 +301,41 @@ rule init ( mpicxx ? : options * ) echo "MPI build features: " ; ECHO $(options) ; } - } else { - ECHO "MPI auto-detection failed." ; + } + else + { + if $(command) + { + ECHO "MPI auto-detection failed: unknown wrapper compiler $(command)" ; + ECHO "Please report this error to the Boost mailing list: http://www.boost.org" ; + } + else if $(mpicxx) + { + ECHO "MPI auto-detection failed: unable to find wrapper compiler $(mpicxx)" ; + } + else + { + ECHO "MPI auto-detection failed: unable to find wrapper compiler `mpic++' or `mpiCC'" ; + } ECHO "You will need to manually configure MPI support." ; } + if $(options) + { + .configured = true ; + + # Set up the "mpi" alias + alias mpi : : : : $(options) ; + } + if $(.debug-configuration) { ECHO "====================================================" ; } } - - # Set up the "mpi" alias - alias mpi : : : : $(options) ; } rule configured ( ) { return $(.configured) ; } - -# IMPORT $(__name__) : configured : : configured ; \ No newline at end of file From 792a8e8df028623550a02e128a92973d327167da Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 12 Dec 2006 05:27:07 +0000 Subject: [PATCH 03/27] Introduce testing support for Boost.MPI [SVN r36341] --- v2/tools/mpi.jam | 115 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 105 insertions(+), 10 deletions(-) diff --git a/v2/tools/mpi.jam b/v2/tools/mpi.jam index b03972fd9..95d2601ad 100644 --- a/v2/tools/mpi.jam +++ b/v2/tools/mpi.jam @@ -35,6 +35,14 @@ # To see the results of MPI auto-detection, pass "--debug-configuration" on # the bjam command line. # +# The (optional) fourth argument configures Boost.MPI for running +# regression tests. These parameters specify the executable used to launch jobs +# (default: "mpirun") followed by any necessary arguments to this to run tests and +# tell the program to expect the number of processors to follow (default: "-np"). +# With the default parameters, for instance, the test harness will execute, e.g., +# +# mpirun -np 4 all_gather_test +# # ==== Linking Against the MPI Libraries === # # To link against the MPI libraries, import the "mpi" module and add the @@ -45,8 +53,15 @@ # Since MPI support is not always available, you should check # "mpi.configured" before trying to link against the MPI libraries. +import "class" : new ; import common ; +import feature : feature ; +import generators ; import project ; +import property ; +import testing ; +import toolset ; +import type ; # Make this module a project project.initialize $(__name__) ; @@ -196,7 +211,7 @@ local rule safe-shell-command ( cmdline ) } # Initialize the MPI module. -rule init ( mpicxx ? : options * ) +rule init ( mpicxx ? : options * : mpirun-with-options * ) { if ! $(options) { @@ -319,23 +334,103 @@ rule init ( mpicxx ? : options * ) } ECHO "You will need to manually configure MPI support." ; } - - if $(options) - { - .configured = true ; - - # Set up the "mpi" alias - alias mpi : : : : $(options) ; - } - + if $(.debug-configuration) { ECHO "====================================================" ; } } + + # Find mpirun (or its equivalent) and its flags + .mpirun = + [ common.get-invocation-command mpi : mpirun : $(mpirun-with-options[1]) ] ; + .mpirun_flags = $(mpirun-with-options[2-]) ; + .mpirun_flags ?= -np ; + + if $(options) + { + .configured = true ; + + # Set up the "mpi" alias + alias mpi : : : : $(options) ; + } } rule configured ( ) { return $(.configured) ; } + +# Support for testing; borrowed from Python +type.register RUN_MPI_OUTPUT ; +type.register RUN_MPI : : TEST ; + +class mpi-test-generator : generator +{ + import property-set ; + + rule __init__ ( * : * ) + { + generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ; + self.composing = true ; + } + + rule run ( project name ? : property-set : sources * : multiple ? ) + { + # Generate an executable from the sources. This is the executable we will run. + local executable = + [ generators.construct $(project) $(name) : EXE : $(property-set) : $(sources) ] ; + + result = + [ construct-result $(executable[2-]) : $(project) $(name)-run : $(property-set) ] ; + } +} + +# Use mpi-test-generator to generate MPI tests from sources +generators.register + [ new mpi-test-generator mpi.capture-output : : RUN_MPI_OUTPUT ] ; + +generators.register-standard testing.expect-success + : RUN_MPI_OUTPUT : RUN_MPI ; + +# +feature mpi:processes : : free incidental ; + +# The flag settings on testing.capture-output do not +# apply to mpi.capture output at the moment. +# Redo this explicitly. +toolset.flags mpi.capture-output ARGS ; +rule capture-output ( target : sources * : properties * ) +{ + # Use the standard capture-output rule to run the tests + testing.capture-output $(target) : $(sources[1]) : $(properties) ; + + # Determine the number of processes we should run on. + local num_processes = [ property.select : $(properties) ] ; + num_processes = $(num_processes:G=) ; + + # We launch MPI processes using the "mpirun" equivalent specified by the user. + LAUNCHER on $(target) = + [ on $(target) return $(.mpirun) $(.mpirun_flags) $(num_processes) ] ; +} + +# Creates a set of test cases to be run through the MPI launcher. The name, sources, +# and requirements are the same as for any other test generator. However, schedule is +# a list of numbers, which indicates how many processes each test run will use. For +# example, passing 1 2 7 will run the test with 1 process, then 2 processes, then 7 +# 7 processes. The name provided is just the base name: the actual tests will be +# the name followed by a hypen, then the number of processes. +rule mpi-test ( name : sources * : requirements * : schedule * ) +{ + sources ?= $(name).cpp ; + schedule ?= 1 2 3 4 7 8 13 17 ; + + local result ; + for processes in $(schedule) + { + result += [ testing.make-test + run-mpi : $(sources) /boost/mpi//boost_mpi + : $(requirements) $(processes) : $(name)-$(processes) ] ; + } + return $(result) ; +} From 86d1c2b2235b11a6a1fbac6835891b01b03bedb0 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 16 Dec 2006 01:33:15 +0000 Subject: [PATCH 04/27] Handle property sets attached to toolset-version specifiers in toolset= and --toolset= autoconfiguration. [SVN r36411] --- v2/build-system.jam | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/v2/build-system.jam b/v2/build-system.jam index 4626c5076..607f4f087 100755 --- a/v2/build-system.jam +++ b/v2/build-system.jam @@ -138,10 +138,13 @@ local extra-build-request ; if ! $(ignore-config) { - for local toolset-version in $(option-toolsets) $(feature-toolsets) + for local t in $(option-toolsets) $(feature-toolsets) { - local toolset = [ MATCH ([^-]+).* : $(toolset-version) ] ; - local version = [ MATCH [^-]+-(.+) : $(toolset-version) ] ; + # Parse toolset-version/properties + local (t-v,t,v) = [ MATCH (([^-/]+)-?([^/]+)?)/?.* : $(t) ] ; + local toolset-version = $((t-v,t,v)[1]) ; + local toolset = $((t-v,t,v)[2]) ; + local version = $((t-v,t,v)[3]) ; if $(debug-config) { @@ -182,14 +185,14 @@ if ! $(ignore-config) # make sure we get an appropriate property into the build request in # case the user used the "--toolset=..." form - if ! $(toolset-version) in $(argv) - && ! $(toolset-version) in $(feature-toolsets) + if ! $(t) in $(argv) + && ! $(t) in $(feature-toolsets) { if $(debug-config) { - ECHO notice: [cmdline-cfg] adding toolset=$(toolset-version) "to build request." ; + ECHO notice: [cmdline-cfg] adding toolset=$(t) "to build request." ; } - extra-build-request += toolset=$(toolset-version) ; + extra-build-request += toolset=$(t) ; } } } From 8d78823ef9a3754d3fce61546b94796129d13993 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 16 Dec 2006 23:04:30 +0000 Subject: [PATCH 05/27] Toolset docs [SVN r36437] --- v2/doc/src/reference.xml | 536 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 533 insertions(+), 3 deletions(-) diff --git a/v2/doc/src/reference.xml b/v2/doc/src/reference.xml index 3d9e79522..6db2308ce 100644 --- a/v2/doc/src/reference.xml +++ b/v2/doc/src/reference.xml @@ -1,8 +1,14 @@ + "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd" +[ +version : c++-compile-command : compiler options"> +The following options can be provided, using <option-name>option-value syntax:"> +This statement may be repeated several times, if you want to configure several versions of the compiler."> +]> - + Detailed reference
@@ -283,7 +289,7 @@ target1 debug gcc/runtime-link=dynamic,static
- Jamfile Utility Rules + Utility Rules The following table describes utility rules that can be used in Jamfiles. Detailed information for any of these rules can @@ -293,6 +299,27 @@ bjam --help project.rulename + + + glob + + The glob rule takes a shell pattern and + returns the list of files in the project's source directory that + match the pattern. For example: + +lib tools : [ glob *.cpp ] ; + + + + + + lib + + Creates an library file. See + . + + + <tgroup cols="2"> @@ -365,6 +392,509 @@ bjam --help project.<replaceable>rulename</replaceable> </table> </section> + <section id="bbv2.reference.tools"> + <title>Builtin tools + + Boost.Build comes with support for a large number of C++ compilers, + and other tools. This section documents how to use those tools. + + Before using any tool, you must declare your intention, and possibly + specify additional information about tool's configuration. This is done + with the using rule, for example: + +using gcc ; + + additional parameters can be passed just like for other rules, for example: + +using gcc : 4.0 : g++-4.0 ; + + The options that can be passed to each tool will be documented in the + subsequent sections. + +
+ + C++ Compilers + + This section lists all Boost.Build modules that support C++ + compilers and documents how each one can be initialized. + +
+ + GNU C++ + + The gcc module supports the + GNU C++ compiler + on Linux, a number of Unix-like system including MacOS X, SunOS and + BeOS, and on Windows (either Cygwin + or MinGW). + + + The gcc module is initialized using the following + syntax: + +using gcc : &toolset_ops; ; + + &using_repeation; + + + + + If the version is not explicitly specified, it will be + automatically detected by running the compiler with the -v + option. If the command is not specified, the g++ + binary will be searched in PATH. + + &option_list_intro; + + + + + + + + rc + + + 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 windres will be used. + + + + + rc-type + + + Specifies the type of resource compiler. The value can + be either windres for msvc resource compiler, + or rc for borland's resource compiler. + + + + + +
+ + +
+ + Microsoft Visual C++ + + The msvc module supports the + Microsoft Visual + C++ command-line tools on Microsoft Windows. The supported + products and versions of command line tools are listed below: + + Visual Studio 2005—8.0 + Visual Studio .NET 2003—7.1 + Visual Studio .NET—7.0 + Visual Studio 6.0, Service Pack 5—6.5 + + + The msvc module is initialized using the following + syntax: + +using msvc : &toolset_ops; ; + + &using_repeation; + If the version is not explicitly specified, the most recent + version found in the registry will be used instead. If the + special value all 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 PATH. + + + The compiler command should be specified using forward slashes, + and quoted. + + &option_list_intro; + + + + + + setup + + The filename of the environment setup scripts + to run before invoking the compiler. If not specified, + vcvars32.bat alongside the compiler binary + will be used. + + + + + compiler + + The command that compiles C and C++ sources. + If not specified, cl will be used. The + command will be invoked after the setup script was + executed and adjusted the PATH variable. + + + + + linker + + The command that links executables and dynamic + libraries. + If not specified, link will be used. The + command will be invoked after the setup script was + executed and adjusted the PATH variable. + + + + + assembler + + The command that compiles assember files. + If not specified, cl will be used. The + command will be invoked after the setup script was + executed and adjusted the PATH variable. + + + + + resource-compiler + + The command that compiles resource files. + If not specified, rc will be used. The + command will be invoked after the setup script was + executed and adjusted the PATH variable. + + + + + idl-compiler + + The command that compiles Microsoft COM + interface definition files. + If not specified, midl will be used. The + command will be invoked after the setup script was + executed and adjusted the PATH variable. + + + + + mc-compiler + + The command that compiles Microsoft message + catalog files. + If not specified, mt will be used. The + command will be invoked after the setup script was + executed and adjusted the PATH variable. + + + + + + +
+ +
+ + Intel C++ + + The intel-linux and intel-win modules + support the Intel C++ command-line compiler—the Linux + and + Windows versions respectively. + + &option_list_intro; + + + + + + + The Linux version supports the following additional options: + + + + + + + + +
+ +
+ + HP aC++ compiler + + The acc module supports the +HP aC++ compiler + for the HP-UX operating system. + + The module is initialized using the following + syntax: + +using acc ; + + There are no configuration options. The + compiler will always be invoked as aCC and should + be in PATH. + +
+ +
+ + Borland C++ Compiler + + The borland module supports the command line + C++ compiler included in + C++ Builder 2006 + product and earlier version of it, running on Microsoft Windows. + + The supported products are listed below. The version reported + by the command lines tools is also listed for reference.: + + C++ Builder 2006—5.8.2 + CBuilderX—5.6.5, 5.6.4 (depending on release) + CBuilder6—5.6.4 + Free command line tools—5.5.1 + + + The module is initialized using the following syntax: + +using borland : &toolset_ops; ; + + &using_repeation; + + If the command is not specified, Boost.Build will search for + a binary named bcc32 in PATH. + + &option_list_intro; + + + + +
+ +
+ + Comeau C/C++ Compiler + + The como-linux and the como-win + modules supports the + Comeau C/C++ Compiler + on Linux and Windows respectively. + + The module is initialized using the following syntax: + +using como-linux : &toolset_ops; ; + + &using_repeation; + + If the command is not specified, Boost.Build will search for + a binary named como in + PATH. + + &option_list_intro; + + + + + Before using the windows version of the compiler, + you need to setup necessary environment variables per compiler's + documentation. In particular, the COMO_XXX_INCLUDE + variable should be set, where XXX corresponds to the + used backend C compiler. + +
+ +
+ + Code Warrior + + The cw 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 aquisition and are not sold any longer. + The last version known to work is 9.4 + + The module is initialized using the following syntax: + +using cw : &toolset_ops; ; + + &using_repeation; + + If the command is not specified, Boost.Build will search for + a binary named mwcc in default installation + paths and in PATH. + + &option_list_intro; + + + + + + + + setup + + The command that sets up environment variables + prior to invoking the compiler. If not specified, + cwenv.bat alongside the compiler binary + will be used. + + + + + + compiler + + The command that compiles C and C++ sources. + If not specified, mwcc will be used. The + command will be invoked after the setup script was + executed and adjusted the PATH variable. + + + + + linker + + The command that links executables and dynamic + libraries. + If not specified, mwld will be used. The + command will be invoked after the setup script was + executed and adjusted the PATH variable. + + + + + +
+ +
+ + Digital Mars C/C++ Compiler + + The dmc module supports the + Digital Mars C++ compiler. + + + The module is initialized using the following syntax: + +using dmc : &toolset_ops; ; + + &using_repeation; + + If the command is not specified, Boost.Build will search for + a binary named como in + PATH. + + &option_list_intro; + + + + +
+ +
+ + HP C++ Compiler for Tru64 Unix + + The hp_cxx modules supports the + + HP C++ Compiler for Tru64 Unix. + + The module is initialized using the following syntax: + +using hp_cxx : &toolset_ops; ; + + &using_repeation; + + If the command is not specified, Boost.Build will search for + a binary named hp_cxx in PATH. + + &option_list_intro; + + + + +
+ +
+ + Sun Studio + + The sun module supports the + + Sun Studio C++ compilers for the Solaris OS. + + The module is initialized using the following syntax: + +using sun : &toolset_ops; ; + + &using_repeation; + + If the command is not specified, Boost.Build will search for + a binary named CC + in /opt/SUNWspro/bin and in + PATH. + + When using this compiler on complex C++ code, such as the + Boost C++ library, it is + recommended to specify the following options when intializing the + sun module: + +-library=stlport4 -features=tmplife -features=tmplrefstatic + See the + Sun C++ Frontend Tales for details. + + &option_list_intro; + + + + +
+ +
+ + IBM Visual Age + The vacpp module supports the + IBM Visual + Age C++ Compiler, for the AIX operating system. Versions + 7.1 and 8.0 are known to work. + + The module is initialized using the following + syntax: + +using vacpp ; + + The module does not accept any initialization options. The + compiler should be installed in the /usr/vacpp/bin + directory. + + Later versions of Visual Age are known as XL C/C++. They + were not tested with the the vacpp module. + +
+ + +
+ +
Build process From 13a3741a204faeedd0f010d61bf54d07ef623b27 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 16 Dec 2006 23:04:45 +0000 Subject: [PATCH 06/27] Doc tweaks [SVN r36438] --- v2/doc/src/advanced.xml | 2 +- v2/doc/src/extending.xml | 2 +- v2/doc/src/fragments.xml | 58 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 v2/doc/src/fragments.xml diff --git a/v2/doc/src/advanced.xml b/v2/doc/src/advanced.xml index 7d2e8a9aa..0f701cfbf 100644 --- a/v2/doc/src/advanced.xml +++ b/v2/doc/src/advanced.xml @@ -668,7 +668,7 @@ exe a : a.cpp ; # a.cpp is the only source file exe b : [ glob *.cpp ] ; # all .cpp files in this directory are sources Unless you specify a file with an absolute path, the name is - considered relative to the source directory—which is typically + considered relative to the source directory — which is typically the directory where the Jamfile is located, but can be changed as described in . diff --git a/v2/doc/src/extending.xml b/v2/doc/src/extending.xml index 34e1893d9..58471d733 100644 --- a/v2/doc/src/extending.xml +++ b/v2/doc/src/extending.xml @@ -385,7 +385,7 @@ generators.register [ new itrace-generator nm.itrace : EXE : ITRACE ] ; program will import itself, not the extension. Here's how it can be done: -rule run ( project name ? : property-set : sources * : multiple ? ) +rule run ( project name ? : property-set : sources * ) { local python ; for local s in $(sources) diff --git a/v2/doc/src/fragments.xml b/v2/doc/src/fragments.xml new file mode 100644 index 000000000..3106ca62e --- /dev/null +++ b/v2/doc/src/fragments.xml @@ -0,0 +1,58 @@ + + + + +
+ + root + + + + Specifies root directory of the compiler + installation. This option is necessary only if it's not possible + to detect this information from the compiler command—for + example if the specified compiler command is a user script. + + +
+ +
+ + + cflags + + Specifies additional compiler flags that + will be used when compiling C sources. + + + + + cxxflags + + Specifies additional compiler flags that + will be used when compiling C++ sources. + + + + + compileflags + + Specifies additional compiler flags that + will be used when compiling both C and C++ sources. + + + + + linkflags + + Specifies additional command line options + that will be passed to the linker. + + + +
+ +
From d8bf07a74a915f5726b7d0542c9300cdb70817dd Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 18 Dec 2006 13:28:45 +0000 Subject: [PATCH 07/27] Implement the --user-config option that allows to specify the location of the user config. [SVN r36450] --- v2/build-system.jam | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/v2/build-system.jam b/v2/build-system.jam index 607f4f087..e3d4943c1 100755 --- a/v2/build-system.jam +++ b/v2/build-system.jam @@ -45,6 +45,8 @@ rule location ( ) # Check if we can load 'test-config.jam'. If we can, load it and # ignore user configs. +local argv = [ modules.peek : ARGV ] ; + local test-config = [ GLOB [ os.environ BOOST_BUILD_PATH ] : test-config.jam ] ; local debug-config = [ MATCH ^(--debug-configuration)$ : [ modules.peek : ARGV ] ] ; @@ -121,14 +123,30 @@ module user-config initialize user-config ; } -load-config user-config : $(user-path) ; +local user-config-path = [ MATCH ^--user-config=(.*) : $(argv) ] ; + +if $(user-config-path) +{ + if $(debug-config) + { + ECHO "Loading explicitly specifier user configuration file:" ; + ECHO " $(user-config-path)" ; + } + + + modules.load user-config : $(user-config-path:BS) : $(user-config-path:D) ; + project.load-used-projects user-config ; +} +else +{ + load-config user-config : $(user-path) ; +} + # # Autoconfigure toolsets based on any instances of --toolset=xx,yy,...zz or # toolset=xx,yy,...zz in the command line # -local argv = [ modules.peek : ARGV ] ; - local option-toolsets = [ regex.split-list [ MATCH ^--toolset=(.*) : $(argv) ] : "," ] ; local feature-toolsets = [ regex.split-list [ MATCH ^toolset=(.*) : $(argv) ] : "," ] ; From a8ce1143a661c59e82e020f5cdc710c3249c5ec0 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 18 Dec 2006 13:38:26 +0000 Subject: [PATCH 08/27] Intel doc fixes [SVN r36452] --- v2/doc/src/reference.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/v2/doc/src/reference.xml b/v2/doc/src/reference.xml index 6db2308ce..03b4cf22f 100644 --- a/v2/doc/src/reference.xml +++ b/v2/doc/src/reference.xml @@ -609,6 +609,22 @@ using msvc : &toolset_ops; ; "http://www.intel.com/cd/software/products/asmo-na/eng/compilers/284527.htm"> Windows versions respectively. + The module is initialized using the following syntax: + +using intel-linux : &toolset_ops; ; + or + +using intel-win : &toolset_ops; ; + respectively. + + &using_repeation; + + + If compiler command is not specified, then Boost.Build will + look in PATH for an executable icpc + (on Linux), or icc.exe (on Windows). + + &option_list_intro; From ad463597a64c4f6823512df5284ee62c4be3dd80 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 18 Dec 2006 19:38:12 +0000 Subject: [PATCH 09/27] Work around BBv2 feature propagation bug [SVN r36456] --- v2/tools/mpi.jam | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/v2/tools/mpi.jam b/v2/tools/mpi.jam index 95d2601ad..0a3375451 100644 --- a/v2/tools/mpi.jam +++ b/v2/tools/mpi.jam @@ -36,10 +36,11 @@ # the bjam command line. # # The (optional) fourth argument configures Boost.MPI for running -# regression tests. These parameters specify the executable used to launch jobs -# (default: "mpirun") followed by any necessary arguments to this to run tests and -# tell the program to expect the number of processors to follow (default: "-np"). -# With the default parameters, for instance, the test harness will execute, e.g., +# regression tests. These parameters specify the executable used to +# launch jobs (default: "mpirun") followed by any necessary arguments +# to this to run tests and tell the program to expect the number of +# processors to follow (default: "-np"). With the default parameters, +# for instance, the test harness will execute, e.g., # # mpirun -np 4 all_gather_test # @@ -48,7 +49,7 @@ # To link against the MPI libraries, import the "mpi" module and add the # following requirement to your target: # -# /mpi//mpi +# /mpi//mpi # # Since MPI support is not always available, you should check # "mpi.configured" before trying to link against the MPI libraries. @@ -182,6 +183,15 @@ rule cmdline_to_features ( cmdline : unknown-features ? ) if $(value) = "-pthread" || $(value) = "-pthreads" { result += "multi" ; + + # DPG: This is a hack intended to work around a BBv2 bug where + # requirements propagated from libraries are not checked for + # conflicts when BBv2 determines which "common" properties to + # apply to a target. In our case, the single property + # gets propagated from the common properties to Boost.MPI + # targets, even though multi is in the usage + # requirements of /mpi//mpi. + MPI_EXTRA_REQUIREMENTS += "multi" ; } else if [ MATCH "(.*[a-zA-Z0-9<>?-].*)" : $(value) ] { otherflags += $(value) ; @@ -356,11 +366,21 @@ rule init ( mpicxx ? : options * : mpirun-with-options * ) } } +# States whether MPI has bee configured rule configured ( ) { return $(.configured) ; } +# Returs the "extra" requirements needed to build MPI. These requirements are +# part of the /mpi//mpi library target, but they need to be added to anything +# that uses MPI directly to work around bugs in BBv2's propagation of +# requirements. +rule extra-requirements ( ) +{ + return $(MPI_EXTRA_REQUIREMENTS) ; +} + # Support for testing; borrowed from Python type.register RUN_MPI_OUTPUT ; type.register RUN_MPI : : TEST ; @@ -393,7 +413,7 @@ generators.register generators.register-standard testing.expect-success : RUN_MPI_OUTPUT : RUN_MPI ; -# +# The number of processes to spawn when executing an MPI test. feature mpi:processes : : free incidental ; # The flag settings on testing.capture-output do not From 98da68d19d73dfc1085ab98181dc8a66aaa8d9e2 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 20 Dec 2006 13:27:15 +0000 Subject: [PATCH 10/27] Patch for HPUX from Boris Grubenko [SVN r36466] --- v2/tools/python.jam | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/v2/tools/python.jam b/v2/tools/python.jam index e3cb287cc..a9f5e4e29 100644 --- a/v2/tools/python.jam +++ b/v2/tools/python.jam @@ -286,6 +286,11 @@ rule init-unix ( version ? : root ? : includes ? : libraries ? : condition * ) extra-libs = ; } + case HPUX : + { + extra-libs = pthread rt ; + } + case * : extra-libs = pthread dl util ; } From d6f1461e2d729661e6619a47ce33fca1b134e138 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 21 Dec 2006 04:45:51 +0000 Subject: [PATCH 11/27] Addition of doxproc Python script to optionally replace the xsltproc translation of Doxygen XML to BoostBook XML. The doxproc.py replaces the existing two steps of Doxygen multi-file XML to Doxygen single-file XML, and Doxygen single-file XML to BookBook XML. [SVN r36475] --- v2/tools/doxproc.py | 617 +++++++++++++++++++++++++++++++++++++++++++ v2/tools/doxygen.jam | 127 +++++++-- 2 files changed, 729 insertions(+), 15 deletions(-) create mode 100644 v2/tools/doxproc.py diff --git a/v2/tools/doxproc.py b/v2/tools/doxproc.py new file mode 100644 index 000000000..4b497c76c --- /dev/null +++ b/v2/tools/doxproc.py @@ -0,0 +1,617 @@ +#!/usr/bin/python +# Copyright 2006 Rene Rivera +# 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) + +''' +Processing of Doxygen generated XML. +''' + +import os +import os.path +import sys +import time +import string +import getopt +import glob +import re +import xml.dom.minidom + + +def usage(): + print ''' +Usage: + %s options + +Options: + --xmldir Directory with the Doxygen xml result files. + --output Write the output BoostBook to the given location. + --id The ID of the top level BoostBook section. + --title The title of the top level BoostBook section. + --enable-index Generate additional index sections for classes and + types. +''' % ( sys.argv[0] ) + + +def get_args( argv = sys.argv[1:] ): + spec = [ + 'xmldir=', + 'output=', + 'id=', + 'title=', + 'enable-index', + 'help' ] + options = { + '--xmldir' : 'xml', + '--output' : None, + '--id' : 'dox', + '--title' : 'Doxygen' + } + ( option_pairs, other ) = getopt.getopt( argv, '', spec ) + map( lambda x: options.__setitem__( x[0], x[1] ), option_pairs ) + + if options.has_key( '--help' ): + usage() + sys.exit(1) + + return { + 'xmldir' : options['--xmldir'], + 'output' : options['--output'], + 'id' : options['--id'], + 'title' : options['--title'], + 'index' : options.has_key('--enable-index') + } + +def if_attribute(node, attribute, true_value, false_value=None): + if node.getAttribute(attribute) == 'yes': + return true_value + else: + return false_value + +class Doxygen2BoostBook: + + def __init__( self, + #~ id=None, + #~ title='', + #~ last_revision=None, + **kwargs ): + ## + self.args = kwargs + self.args.setdefault('id','') + self.args.setdefault('title','') + self.args.setdefault('last_revision', time.asctime()) + self.args.setdefault('index', False) + self.id = '%(id)s.reference' % self.args + self.args['id'] = self.id + self.boostbook = xml.dom.minidom.parseString(''' +
+ %(title)s + + Headers + + + Classes + + + Index + +
+''' % self.args ) + self.section = { + 'headers' : self._getChild('library-reference',id='%(id)s.headers' % self.args), + 'classes' : self._getChild('index',id='%(id)s.classes' % self.args), + 'index' : self._getChild('index',id='%(id)s.index' % self.args) + } + if not self.args['index']: + self.section['classes'].parentNode.removeChild(self.section['classes']) + self.section['classes'].unlink() + del self.section['classes'] + self.section['index'].parentNode.removeChild(self.section['index']) + self.section['index'].unlink() + del self.section['index'] + self.symbols = {} + self.generated = False + self.idmap = {} + + def addDox( self, document ): + ## + self._translateNode(document.documentElement) + + def tostring( self ): + self._generate() + #~ return self.boostbook.toprettyxml(' ') + return self.boostbook.toxml('utf-8') + + def _generate( self ): + if not self.generated: + self.generated = True + symbols = self.symbols.keys() + symbols.sort() + for symbol in symbols: + if self.symbols[symbol]['kind'] in ('header'): + self.section['headers'].appendChild(self.symbols[symbol]['dom']) + for symbol in symbols: + if self.symbols[symbol]['kind'] not in ('namespace', 'header'): + container = self._resolveContainer(self.symbols[symbol], + self.symbols[self.symbols[symbol]['header']]['dom']) + if container.nodeName != 'namespace': + ## The current BoostBook to Docbook translation doesn't + ## respect, nor assign, IDs to inner types of any kind. + ## So nuke the ID entry so as not create bogus links. + del self.idmap[self.symbols[symbol]['id']] + container.appendChild(self.symbols[symbol]['dom']) + self._rewriteIDs(self.boostbook.documentElement) + + def _rewriteIDs( self, node ): + if node.nodeName in ('link'): + if (self.idmap.has_key(node.getAttribute('linkend'))): + node.setAttribute('linkend',self.idmap[node.getAttribute('linkend')]) + else: + node.removeAttribute('linkend') + elif hasattr(node,'hasAttribute') and node.hasAttribute('id') and self.idmap.has_key(node.getAttribute('id')): + node.setAttribute('id',self.idmap[node.getAttribute('id')]) + if node.firstChild: + self._rewriteIDs(node.firstChild) + if node.nextSibling: + self._rewriteIDs(node.nextSibling) + + def _resolveContainer( self, cpp, root ): + container = root + for ns in cpp['namespace']: + node = self._getChild('namespace',name=ns,root=container) + if not node: + node = container.appendChild( + self._createNode('namespace',name=ns)) + container = node + for inner in cpp['name'].split('::'): + node = self._getChild(name=inner,root=container) + if not node: + break + container = node + return container + + def _setID( self, id, name ): + self.idmap[id] = name.replace('::','.').replace('/','.') + #~ print '--| setID:',id,'::',self.idmap[id] + + def _translateNode( self, *context, **kwargs ): + node = None + name = '_translate' + for c in context: + if c: + if not isinstance(c,xml.dom.Node): + name += '_'+c + else: + name += '_'+c.nodeName + node = c + name = name.replace('-','_') + #~ print '_translateNode:', name + if node and hasattr(self,name): + return getattr(self,name)(node,**kwargs) + else: + return None + + def _translateChildren( self, parent, **kwargs ): + target = kwargs['target'] + for n in parent.childNodes: + child = self._translateNode(n,target=target) + if child: + target.appendChild(child) + else: + child = n.cloneNode(False) + if hasattr(child,'data'): + child.data = child.data.strip() + target.appendChild(child) + self._translateChildren(n,target=child) + + def _translateDescription( self, node, target=None, tag='description', **kwargs ): + description = self._getChild(tag,root=target) + if not description: + description = target.appendChild(self._createNode(tag)) + self._translateChildren(node,target=description) + return description + + def _translate_doxygen( self, node ): + #~ print '_translate_doxygen:', node.nodeName + result = [] + for n in node.childNodes: + newNode = self._translateNode(n) + if newNode: + result.append(newNode) + return result + + def _translate_doxygenindex( self, node ): + #~ print '_translate_doxygenindex:', node.nodeName + if self.args['index']: + entries = [] + classes = [] + for n in node.childNodes: + if n.nodeName == 'compound': + if n.getAttribute('kind') not in ('file','dir','define'): + cpp = self._cppName(self._getChildData('name',root=n)) + entry = { + 'name' : cpp['name'], + 'compoundname' : cpp['compoundname'], + 'id' : n.getAttribute('refid') + } + if n.getAttribute('kind') in ('class','struct'): + classes.append(entry) + entries.append(entry) + for m in n.childNodes: + if m.nodeName == 'member': + cpp = self._cppName(self._getChildData('name',root=m)) + entry = { + 'name' : cpp['name'], + 'compoundname' : cpp['compoundname'], + 'id' : n.getAttribute('refid') + } + if hasattr(m,'getAttribute') and m.getAttribute('kind') in ('class','struct'): + classes.append(entry) + entries.append(entry) + entries.sort(lambda x,y: cmp(x['name'].lower(),y['name'].lower())) + classes.sort(lambda x,y: cmp(x['name'].lower(),y['name'].lower())) + self._translate_index_(entries,target=self.section['index']) + self._translate_index_(classes,target=self.section['classes']) + return None + + def _translate_index_(self, entries, target=None, **kwargs ): + i = 0 + targetID = target.getAttribute('id') + while i < len(entries): + dividerKey = entries[i]['name'][0].upper() + divider = target.appendChild(self._createNode('indexdiv',id=targetID+'.'+dividerKey)) + divider.appendChild(self._createText('title',dividerKey)) + while i < len(entries) and dividerKey == entries[i]['name'][0].upper(): + iename = entries[i]['name'] + ie = divider.appendChild(self._createNode('indexentry')) + ie = ie.appendChild(self._createText('primaryie',iename)) + while i < len(entries) and entries[i]['name'] == iename: + ie.appendChild(self.boostbook.createTextNode(' (')) + ie.appendChild(self._createText( + 'link',entries[i]['compoundname'],linkend=entries[i]['id'])) + ie.appendChild(self.boostbook.createTextNode(')')) + i += 1 + + def _translate_compounddef( self, node, target=None, **kwargs ): + return self._translateNode(node,node.getAttribute('kind')) + + def _translate_compounddef_namespace( self, node, target=None, **kwargs ): + #~ print '--| _translate_compounddef_namespace:', node.getAttribute('id') + namespace = { + 'id' : node.getAttribute('id'), + 'kind' : 'namespace', + 'name' : self._getChildData('compoundname',root=node), + 'brief' : self._getChildData('briefdescription',root=node), + 'detailed' : self._getChildData('detaileddescription',root=node), + 'parsed' : False + } + if self.symbols.has_key(namespace['name']): + if not self.symbols[namespace['name']]['parsed']: + self.symbols[namespace['name']]['parsed'] = True + #~ for n in node.childNodes: + #~ if hasattr(n,'getAttribute'): + #~ self._translateNode(n,n.getAttribute('kind'),target=target,**kwargs) + else: + self.symbols[namespace['name']] = namespace + #~ self._setID(namespace['id'],namespace['name']) + return None + + def _translate_compounddef_class( self, node, target=None, **kwargs ): + return self._translate_compounddef_struct(node,tag='class',target=target,**kwargs) + + def _translate_compounddef_struct( self, node, tag='struct', target=None, **kwargs ): + #~ print '--| _translate_compounddef_struct:', node.getAttribute('id') + result = None + includes = self._getChild('includes',root=node) + if includes: + ## Add the header into the output table. + self._translate_compounddef_includes_(includes,includes,**kwargs) + ## Compounds are the declared symbols, classes, types, etc. + ## We add them to the symbol table, along with the partial DOM for them + ## so that they can be organized into the output later. + compoundname = self._getChildData('compoundname',root=node) + compoundname = self._cppName(compoundname) + self._setID(node.getAttribute('id'),compoundname['compoundname']) + struct = self._createNode(tag,name=compoundname['name'].split('::')[-1]) + self.symbols[compoundname['compoundname']] = { + 'header' : includes.firstChild.data, + 'namespace' : compoundname['namespace'], + 'id' : node.getAttribute('id'), + 'kind' : tag, + 'name' : compoundname['name'], + 'dom' : struct + } + for n in node.childNodes: + self._translateNode(n,target=struct,scope=compoundname['compoundname']) + result = struct + return result + + def _translate_compounddef_includes_( self, node, target=None, **kwargs ): + name = node.firstChild.data + if not self.symbols.has_key(name): + self._setID(node.getAttribute('refid'),name) + self.symbols[name] = { + 'kind' : 'header', + 'id' : node.getAttribute('refid'), + 'dom' : self._createNode('header', + id=node.getAttribute('refid'), + name=name) + } + return None + + def _translate_basecompoundref( self, ref, target=None, **kwargs ): + inherit = target.appendChild(self._createNode('inherit', + access=ref.getAttribute('prot'))) + self._translateChildren(ref,target=inherit) + return + + def _translate_templateparamlist( self, templateparamlist, target=None, **kwargs ): + template = target.appendChild(self._createNode('template')) + for param in templateparamlist.childNodes: + if param.nodeName == 'param': + paramKind = None + if self._getChildData('type',root=param) in ( + 'class','typename'): + paramKind = 'template-type-parameter' + else: + paramKind = 'template-nontype-parameter' + templateParam = template.appendChild( + self._createNode(paramKind, + name=self._getChildData('declname',root=param))) + defval = self._getChild('defval',root=param) + if defval: + templateParam.appendChild(self._createText('default', + self._getChildData('ref',root=defval.firstChild))) + return template + + def _translate_briefdescription( self, brief, target=None, **kwargs ): + self._translateDescription(brief,target=target,**kwargs) + return self._translateDescription(brief,target=target,tag='purpose',**kwargs) + + def _translate_detaileddescription( self, detailed, target=None, **kwargs ): + return self._translateDescription(detailed,target=target,**kwargs) + + def _translate_sectiondef( self, sectiondef, target=None, **kwargs ): + self._translateNode(sectiondef,sectiondef.getAttribute('kind'),target=target,**kwargs) + + def _translate_sectiondef_x_( self, sectiondef, target=None, **kwargs ): + for n in sectiondef.childNodes: + if hasattr(n,'getAttribute'): + self._translateNode(n,n.getAttribute('kind'),target=target,**kwargs) + return None + + def _translate_sectiondef_func_( self, sectiondef, name='functions', target=None, **kwargs ): + members = target.appendChild(self._createNode('method-group',name=name)) + for n in sectiondef.childNodes: + if hasattr(n,'getAttribute'): + self._translateNode(n,n.getAttribute('kind'),target=members,**kwargs) + return members + + def _translate_sectiondef_public_type( self, sectiondef, target=None, **kwargs ): + return self._translate_sectiondef_x_(sectiondef,target=target,**kwargs) + + def _translate_sectiondef_public_attrib( self, sectiondef, target=None, **kwargs): + return self._translate_sectiondef_x_(sectiondef,target=target,**kwargs) + + def _translate_sectiondef_public_func( self, sectiondef, target=None, **kwargs ): + return self._translate_sectiondef_func_(sectiondef, + name='public member functions',target=target,**kwargs) + + def _translate_sectiondef_public_static_func( self, sectiondef, target=None, **kwargs): + return self._translate_sectiondef_func_(sectiondef, + name='public static functions',target=target,**kwargs) + + def _translate_sectiondef_protected_func( self, sectiondef, target=None, **kwargs ): + return self._translate_sectiondef_func_(sectiondef, + name='protected member functions',target=target,**kwargs) + + def _translate_sectiondef_private_static_func( self, sectiondef, target=None, **kwargs): + return self._translate_sectiondef_func_(sectiondef, + name='private static functions',target=target,**kwargs) + + def _translate_memberdef_typedef( self, memberdef, target=None, scope=None, **kwargs ): + self._setID(memberdef.getAttribute('id'), + scope+'::'+self._getChildData('name',root=memberdef)) + typedef = target.appendChild(self._createNode('typedef', + id=memberdef.getAttribute('id'), + name=self._getChildData('name',root=memberdef))) + typedef_type = typedef.appendChild(self._createNode('type')) + self._translateChildren(self._getChild('type',root=memberdef),target=typedef_type) + return typedef + + def _translate_memberdef_function( self, memberdef, target=None, scope=None, **kwargs ): + ## The current BoostBook to Docbook translator doesn't respect method + ## Ids. Nor does it assign any useable IDs to the individial methods. + # self._setID(memberdef.getAttribute('id'), + # scope+'::'+self._getChildData('name',root=memberdef)) + ## Hence instead of registering an ID for the method we point it at the + ## containing class. + self._setID(memberdef.getAttribute('id'),scope) + method = target.appendChild(self._createNode('method', + # id=memberdef.getAttribute('id'), + name=self._getChildData('name',root=memberdef), + cv=' '.join([ + if_attribute(memberdef,'const','const','').strip() + ]), + specifiers=' '.join([ + if_attribute(memberdef,'static','static',''), + if_attribute(memberdef,'explicit','explicit',''), + if_attribute(memberdef,'inline','inline','') + ]).strip() + )) + for n in memberdef.childNodes: + self._translateNode(memberdef,'function',n,target=method) + return method + + def _translate_memberdef_function_templateparamlist( + self, templateparamlist, target=None, **kwargs ): + return self._translate_templateparamlist(templateparamlist,target=target,**kwargs) + + def _translate_memberdef_function_type( self, resultType, target=None, **kwargs ): + methodType = target.appendChild(self._createNode('type')) + self._translateChildren(resultType,target=methodType) + return methodType + + def _translate_memberdef_function_briefdescription( self, description, target=None, **kwargs ): + self._translateDescription(description,target=target,**kwargs) + return self._translateDescription(description,target=target,tag='purpose',**kwargs) + + def _translate_memberdef_function_detaileddescription( self, description, target=None, **kwargs ): + return self._translateDescription(description,target=target,**kwargs) + + def _translate_memberdef_function_inbodydescription( self, description, target=None, **kwargs ): + return self._translateDescription(description,target=target,**kwargs) + + def _translate_memberdef_function_param( self, param, target=None, **kwargs ): + return self._translate_param(param,target=target,**kwargs) + + def _translate_memberdef_variable( self, memberdef, target=None, scope=None, **kwargs ): + self._setID(memberdef.getAttribute('id'), + scope+'::'+self._getChildData('name',root=memberdef)) + data_member = target.appendChild(self._createNode('data-member', + id=memberdef.getAttribute('id'), + name=self._getChildData('name',root=memberdef))) + data_member_type = data_member.appendChild(self._createNode('type')) + self._translateChildren(self._getChild('type',root=memberdef),target=data_member_type) + + def _translate_memberdef_enum( self, memberdef, target=None, scope=None, **kwargs ): + self._setID(memberdef.getAttribute('id'), + scope+'::'+self._getChildData('name',root=memberdef)) + enum = target.appendChild(self._createNode('enum', + id=memberdef.getAttribute('id'), + name=self._getChildData('name',root=memberdef))) + for n in memberdef.childNodes: + self._translateNode(memberdef,'enum',n,target=enum,scope=scope,**kwargs) + return enum + + def _translate_memberdef_enum_enumvalue( self, enumvalue, target=None, scope=None, **kwargs ): + self._setID(enumvalue.getAttribute('id'), + scope+'::'+self._getChildData('name',root=enumvalue)) + value = target.appendChild(self._createNode('enumvalue', + id=enumvalue.getAttribute('id'), + name=self._getChildData('name',root=enumvalue))) + initializer = self._getChild('initializer',root=enumvalue) + if initializer: + self._translateChildren(initializer, + target=target.appendChild(self._createNode('default'))) + return value + + def _translate_param( self, param, target=None, **kwargs): + parameter = target.appendChild(self._createNode('parameter', + name=self._getChildData('declname',root=param))) + paramtype = parameter.appendChild(self._createNode('paramtype')) + self._translateChildren(self._getChild('type',root=param),target=paramtype) + defval = self._getChild('defval',root=param) + if defval: + self._translateChildren(self._getChild('defval',root=param),target=parameter) + return parameter + + def _translate_ref( self, ref, **kwargs ): + return self._translateNode(ref,ref.getAttribute('kindref')) + + def _translate_ref_compound( self, ref, **kwargs ): + result = self._createNode('link',linkend=ref.getAttribute('refid')) + classname = result.appendChild(self._createNode('classname')) + self._translateChildren(ref,target=classname) + return result + + def _translate_ref_member( self, ref, **kwargs ): + result = self._createNode('link',linkend=ref.getAttribute('refid')) + self._translateChildren(ref,target=result) + return result + + def _getChild( self, tag = None, id = None, name = None, root = None ): + if not root: + root = self.boostbook.documentElement + for n in root.childNodes: + found = True + if tag and found: + found = found and tag == n.nodeName + if id and found: + if n.hasAttribute('id'): + found = found and n.getAttribute('id') == id + else: + found = found and n.hasAttribute('id') and n.getAttribute('id') == id + if name and found: + found = found and n.hasAttribute('name') and n.getAttribute('name') == name + if found: + #~ print '--|', n + return n + return None + + def _getChildData( self, tag, **kwargs ): + child = self._getChild(tag,**kwargs) + if child: + text = self._getChild('#text',root=child) + if text: + return text.data.strip() + return '' + + def _cppName( self, type ): + parts = re.search('^([^<]+)[<]?(.*)[>]?$',type.strip().strip(':')) + result = { + 'compoundname' : parts.group(1), + 'namespace' : parts.group(1).split('::')[0:-1], + 'name' : parts.group(1).split('::')[-1], + 'specialization' : parts.group(2) + } + if result['namespace'] and len(result['namespace']) > 0: + namespace = '::'.join(result['namespace']) + while ( + len(result['namespace']) > 0 and ( + not self.symbols.has_key(namespace) or + self.symbols[namespace]['kind'] != 'namespace') + ): + result['name'] = result['namespace'].pop()+'::'+result['name'] + namespace = '::'.join(result['namespace']) + return result + + def _createNode( self, tag, **kwargs ): + result = self.boostbook.createElement(tag) + for k in kwargs.keys(): + if k == 'id': + result.setAttribute('id',kwargs[k]) + else: + result.setAttribute(k,kwargs[k]) + return result + + def _createText( self, tag, data, **kwargs ): + result = self._createNode(tag,**kwargs) + data = data.strip() + if len(data) > 0: + result.appendChild(self.boostbook.createTextNode(data)) + return result + + +def main( xmldir=None, output=None, id=None, title=None, index=False ): + #~ print '--- main: xmldir = %s, output = %s' % (xmldir,output) + + input = glob.glob( os.path.abspath( os.path.join( xmldir, "*.xml" ) ) ) + input.sort + translator = Doxygen2BoostBook(id=id, title=title, index=index) + #~ Feed in the namespaces first to build up the set of namespaces + #~ and definitions so that lookup is unambiguous when reading in the definitions. + namespace_files = filter( + lambda x: + os.path.basename(x).startswith('namespace_'), + input) + decl_files = filter( + lambda x: + not os.path.basename(x).startswith('namespace_') and not os.path.basename(x).startswith('_'), + input) + for dox in namespace_files: + #~ print '--|',os.path.basename(dox) + translator.addDox(xml.dom.minidom.parse(dox)) + for dox in decl_files: + #~ print '--|',os.path.basename(dox) + translator.addDox(xml.dom.minidom.parse(dox)) + + if output: + output = open(output,'w') + else: + output = sys.stdout + if output: + output.write(translator.tostring()) + + +main( **get_args() ) diff --git a/v2/tools/doxygen.jam b/v2/tools/doxygen.jam index 52898d1a8..efb3b5c8a 100644 --- a/v2/tools/doxygen.jam +++ b/v2/tools/doxygen.jam @@ -33,6 +33,8 @@ import project ; import xsltproc ; import make ; import os ; +import toolset : flags ; +import alias ; # Use to specify extra configuration paramters. These get translated # into a doxyfile which configures the building of the docs. @@ -44,17 +46,29 @@ feature.feature prefix : : free ; # Specify the "boost.doxygen.reftitle" XSLT option. feature.feature reftitle : : free ; +# Which processor to use for various translations from Doxygen. +feature.feature doxygen:processor : xsltproc doxproc : implicit ; + +# To generate, or not, index sections. +feature.feature doxygen:doxproc:index : no yes : incidental ; + +# The ID for the resulting BoostBook reference section. +feature.feature doxygen:doxproc:id : : free ; + +# The title for the resulting BoostBook reference section. +feature.feature doxygen:doxproc:title : : free ; + # Doxygen configuration input file. type.register DOXYFILE : doxyfile ; # Doxygen XML multi-file output. -type.register DOXYGEN_XML_MULTIFILE : : XML ; +type.register DOXYGEN_XML_MULTIFILE : xml-dir : XML ; # Doxygen XML coallesed output. type.register DOXYGEN_XML : doxygen : XML ; # Doxygen HTML multifile directory. -type.register DOXYGEN_HTML_MULTIFILE : dir : HTML ; +type.register DOXYGEN_HTML_MULTIFILE : html-dir : HTML ; # Redirection HTML file to HTML multifile directory. type.register DOXYGEN_HTML : : HTML ; @@ -125,13 +139,24 @@ rule init ( name ? ) .doxygen = $(name) ; } .doxygen ?= doxygen ; + + .doxproc = [ modules.binding $(__name__) ] ; + .doxproc = $(.doxproc:D)/doxproc.py ; - generators.register-composing doxygen.headers-to-doxyfile : H HPP CPP : DOXYFILE ; - generators.register-standard doxygen.run : DOXYFILE : DOXYGEN_XML_MULTIFILE ; - generators.register-standard doxygen.xml-to-boostbook : DOXYGEN_XML : BOOSTBOOK ; - generators.register-standard doxygen.collect : DOXYGEN_XML_MULTIFILE : DOXYGEN_XML ; - generators.register-standard doxygen.run : DOXYFILE : DOXYGEN_HTML_MULTIFILE ; - generators.register-standard doxygen.html-redirect : DOXYGEN_HTML_MULTIFILE : DOXYGEN_HTML ; + generators.register-composing doxygen.headers-to-doxyfile + : H HPP CPP : DOXYFILE ; + generators.register-standard doxygen.run + : DOXYFILE : DOXYGEN_XML_MULTIFILE ; + generators.register-standard doxygen.xml-dir-to-boostbook + : DOXYGEN_XML_MULTIFILE : BOOSTBOOK : doxproc ; + generators.register-standard doxygen.xml-to-boostbook + : DOXYGEN_XML : BOOSTBOOK : xsltproc ; + generators.register-standard doxygen.collect + : DOXYGEN_XML_MULTIFILE : DOXYGEN_XML ; + generators.register-standard doxygen.run + : DOXYFILE : DOXYGEN_HTML_MULTIFILE ; + generators.register-standard doxygen.html-redirect + : DOXYGEN_HTML_MULTIFILE : DOXYGEN_HTML ; IMPORT $(__name__) : doxygen : : doxygen ; } @@ -153,18 +178,36 @@ actions doxygen-action "$(NAME:E=doxygen)" $(>) && echo "Stamped" > "$(<)" } +# Runs the Python doxproc XML processor. +actions doxproc +{ + python "$(DOXPROC)" "--xmldir=$(>)" "--output=$(<)" "$(OPTIONS)" "--id=$(ID)" "--title=$(TITLE)" +} + # Generates a doxygen configuration file (doxyfile) given a set of C++ # sources and a property list that may contain # features. rule headers-to-doxyfile ( target : sources * : properties * ) { local text "# Generated by Boost.Build version 2" ; + + local output-dir ; # Translate into command line flags. for local param in [ feature.get-values : $(properties) ] { local namevalue = [ regex.match ([^=]*)=(.*) : $(param) ] ; text += "$(namevalue[1]) = $(namevalue[2])" ; + if $(namevalue[1]) = OUTPUT_DIRECTORY + { + output-dir = "$(namevalue[2])" ; + } + } + + if ! $(output-dir) + { + output-dir = [ on $(target) return $(LOCATE) ] ; + text += "OUTPUT_DIRECTORY = $(output-dir)" ; } local headers = "" ; @@ -248,6 +291,19 @@ rule xml-to-boostbook ( target : source : properties * ) xsltproc.xslt $(target) : $(source) $(d2b-xsl) : $(xslt-properties) ; } +flags doxygen.xml-dir-to-boostbook OPTIONS yes : --enable-index ; +flags doxygen.xml-dir-to-boostbook ID ; +flags doxygen.xml-dir-to-boostbook TITLE ; + +rule xml-dir-to-boostbook ( target : source : properties * ) +{ + DOXPROC on $(target) = $(.doxproc) ; + + LOCATE on $(source:S=) = [ on $(source) return $(LOCATE) ] ; + + doxygen.doxproc $(target) : $(source:S=) ; +} + # Generate the HTML redirect to HTML dir index.html file. rule html-redirect ( target : source : properties * ) { @@ -273,7 +329,7 @@ rule html-redirect ( target : source : properties * ) } # User-level rule to generate BoostBook XML from a set of headers via Doxygen. -rule doxygen ( target : sources * : requirements * : default-build * ) +rule doxygen ( target : sources * : requirements * : default-build * : usage-requirements * ) { local project = [ project.current ] ; @@ -325,24 +381,65 @@ rule doxygen ( target : sources * : requirements * : default-build * ) else { # Build a BoostBook XML file from the sources. - local doxyfile = [ - new typed-target $(target) : $(project) : BOOSTBOOK - : [ targets.main-target-sources $(sources) : $(target) ] + local location-xml = [ feature.get-values : $(requirements) ] ; + requirements = [ property.change $(requirements) : ] ; + local target-xml = $(target:B=$(target:B)-xml) ; + + ## The doxygen configuration file. + targets.main-target-alternative + [ new typed-target $(target-xml:S=.tag) : $(project) : DOXYFILE + : [ targets.main-target-sources $(sources) : $(target-xml:S=.tag) ] : [ targets.main-target-requirements $(requirements) GENERATE_HTML=NO GENERATE_XML=YES + XML_OUTPUT=$(target-xml) : $(project) ] : [ targets.main-target-default-build $(default-build) : $(project) ] ] ; - targets.main-target-alternative $(doxyfile) ; + $(project).mark-target-as-explicit $(target-xml:S=.tag) ; + + ## The Doxygen XML directory of the processed source files. + targets.main-target-alternative + [ new typed-target $(target-xml:S=.dir) : $(project) : DOXYGEN_XML_MULTIFILE + : $(target-xml:S=.tag) + : [ targets.main-target-requirements $(requirements) + : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + ] ; + $(project).mark-target-as-explicit $(target-xml:S=.dir) ; + + ## The resulting BoostBook file is generated by the processor tool. The + ## tool can be either the xsltproc plus accompanying XSL scripts. Or it + ## can be the python doxproc script. + targets.main-target-alternative + [ new typed-target $(target-xml) : $(project) : BOOSTBOOK + : $(target-xml:S=.dir) + : [ targets.main-target-requirements $(requirements) + : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + ] ; + $(project).mark-target-as-explicit $(target-xml) ; targets.main-target-alternative [ new install-target-class $(target:S=.xml) : $(project) - : [ $(doxyfile).name ] + : $(target-xml) : [ targets.main-target-requirements $(requirements) - . + $(location-xml:E=.) + $(target:S=.xml) : $(project) ] : [ targets.main-target-default-build $(default-build) : $(project) ] ] ; + $(project).mark-target-as-explicit $(target:S=.xml) ; + + targets.main-target-alternative + [ new alias-target-class $(target) : $(project) + : + : [ targets.main-target-requirements $(requirements) + : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + : [ targets.main-target-usage-requirements $(usage-requirements) + $(target:S=.xml) + : $(project) ] + ] ; } } From 2e0d7d416ddd64ab00591fb574e5574e79cfa517 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Fri, 22 Dec 2006 14:50:37 +0000 Subject: [PATCH 12/27] Workaround for bjam scanner bug that captures trailing newlines. Added docutils-cmd feature that allows the command to be overridden. [SVN r36492] --- v2/tools/docutils.jam | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/v2/tools/docutils.jam b/v2/tools/docutils.jam index 30aaf7f0c..ea980cfa7 100755 --- a/v2/tools/docutils.jam +++ b/v2/tools/docutils.jam @@ -19,11 +19,19 @@ type.register ReST : rst ; class rst-scanner : common-scanner { + rule __init__ ( paths * ) + { + common-scanner.__init__ . $(paths) ; + } + rule pattern ( ) { - return "^\\w*\\.\\.\\w+include::\w+(.*)" - "^\\w*\\.\\.\\w+image::\w+(.*)" - "^\\w*\\.\\.\\w+figure::\w+(.*)" + return "^[ ]*\\.\\.[ ]+include::[ ]+([^ +]+)" + "^[ ]*\\.\\.[ ]+image::[ ]+([^ +]+)" + "^[ ]*\\.\\.[ ]+figure::[ ]+([^ +]+)" ; } } @@ -51,18 +59,23 @@ rule init ( docutils-dir ? ) rule html ( target : source : properties * ) { local command-prefix = "python "$(.docutils-dir)/tools/ ; - command-prefix on $(target) = $(command-prefix:E="") ; + if ! [ on $(target) return $(RST2XXX) ] + { + RST2XXX on $(target) = $(command-prefix:E="")rst2html.py ; + } } feature docutils : : free ; feature docutils-html : : free ; +feature docutils-cmd : : free ; toolset.flags docutils COMMON-FLAGS : ; toolset.flags docutils HTML-FLAGS : ; +toolset.flags docutils RST2XXX : ; actions html { $(.setup) - $(command-prefix)rst2html.py $(COMMON-FLAGS) $(HTML-FLAGS) $(>) $(<) + $(RST2XXX) $(COMMON-FLAGS) $(HTML-FLAGS) $(>) $(<) } From 34f8138df8e19249625e76c7a9e4af1ff49eb429 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 24 Dec 2006 21:27:14 +0000 Subject: [PATCH 13/27] Add some of the arch/cpu options for GCC. [SVN r36512] --- v2/tools/builtin.jam | 2 +- v2/tools/gcc.jam | 110 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 1 deletion(-) diff --git a/v2/tools/builtin.jam b/v2/tools/builtin.jam index e86d2e50f..d919482ec 100644 --- a/v2/tools/builtin.jam +++ b/v2/tools/builtin.jam @@ -222,7 +222,7 @@ feature instruction-set : itanium itanium1 merced itanium2 mckinley # Sparc v7 cypress v8 supersparc sparclite hypersparc sparclite86x - f930 f934 sparclet tsc701 v9 ultrasparc + f930 f934 sparclet tsc701 v9 ultrasparc ultrasparc3 # RS/6000 & PowerPC 401 403 405 405fp 440 440fp 505 601 602 603 603e 604 604e 620 630 740 7400 7450 750 diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index 1870e6827..8b8d86352 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -654,3 +654,113 @@ else if [ modules.peek : UNIX ] } } } + +local rule cpu-flags ( toolset variable : architecture : instruction-set + : values + : default ? ) +{ + if $(default) + { + flags $(toolset) $(variable) + $(architecture)/ + : $(values) ; + } + flags $(toolset) $(variable) + /$(instruction-set) + $(architecture)/$(instruction-set) + : $(values) ; +} + +# Set architecture/instruction-set options. +# +# x86 and compatible +flags gcc OPTIONS x86/32 : -m32 ; +flags gcc OPTIONS x86/64 : -m64 ; +cpu-flags gcc OPTIONS : x86 : i386 : -march=i386 : default ; +cpu-flags gcc OPTIONS : x86 : i486 : -march=i486 ; +cpu-flags gcc OPTIONS : x86 : i586 : -march=i586 ; +cpu-flags gcc OPTIONS : x86 : i686 : -march=i686 ; +cpu-flags gcc OPTIONS : x86 : pentium : -march=pentium ; +cpu-flags gcc OPTIONS : x86 : pentium-mmx : -march=pentium-mmx ; +cpu-flags gcc OPTIONS : x86 : pentiumpro : -march=pentiumpro ; +cpu-flags gcc OPTIONS : x86 : pentium2 : -march=pentium2 ; +cpu-flags gcc OPTIONS : x86 : pentium3 : -march=pentium3 ; +cpu-flags gcc OPTIONS : x86 : pentium3m : -march=pentium3m ; +cpu-flags gcc OPTIONS : x86 : pentium-m : -march=pentium-m ; +cpu-flags gcc OPTIONS : x86 : pentium4 : -march=pentium4 ; +cpu-flags gcc OPTIONS : x86 : pentium4m : -march=pentium4m ; +cpu-flags gcc OPTIONS : x86 : prescott : -march=prescott ; +cpu-flags gcc OPTIONS : x86 : nocona : -march=nocona ; +cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ; +cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ; +cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ; +cpu-flags gcc OPTIONS : x86 : athlon : -march=athlon ; +cpu-flags gcc OPTIONS : x86 : athlon-tbird : -march=athlon-tbird ; +cpu-flags gcc OPTIONS : x86 : athlon-4 : -march=athlon-4 ; +cpu-flags gcc OPTIONS : x86 : athlon-xp : -march=athlon-xp ; +cpu-flags gcc OPTIONS : x86 : athlon-mp : -march=athlon-mp ; +## +cpu-flags gcc OPTIONS : x86 : k8 : -march=k8 ; +cpu-flags gcc OPTIONS : x86 : opteron : -march=opteron ; +cpu-flags gcc OPTIONS : x86 : athlon64 : -march=athlon64 ; +cpu-flags gcc OPTIONS : x86 : athlon-fx : -march=athlon-fx ; +cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ; +cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ; +cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ; +cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ; +# Sparc +flags gcc OPTIONS sparc/32 : -m32 ; +flags gcc OPTIONS sparc/64 : -m64 ; +cpu-flags gcc OPTIONS : sparc : c3 : -mcpu=c3 : default ; +cpu-flags gcc OPTIONS : sparc : v7 : -mcpu=v7 ; +cpu-flags gcc OPTIONS : sparc : cypress : -mcpu=cypress ; +cpu-flags gcc OPTIONS : sparc : v8 : -mcpu=v8 ; +cpu-flags gcc OPTIONS : sparc : supersparc : -mcpu=supersparc ; +cpu-flags gcc OPTIONS : sparc : sparclite : -mcpu=sparclite ; +cpu-flags gcc OPTIONS : sparc : hypersparc : -mcpu=hypersparc ; +cpu-flags gcc OPTIONS : sparc : sparclite86x : -mcpu=sparclite86x ; +cpu-flags gcc OPTIONS : sparc : f930 : -mcpu=f930 ; +cpu-flags gcc OPTIONS : sparc : f934 : -mcpu=f934 ; +cpu-flags gcc OPTIONS : sparc : sparclet : -mcpu=sparclet ; +cpu-flags gcc OPTIONS : sparc : tsc701 : -mcpu=tsc701 ; +cpu-flags gcc OPTIONS : sparc : v9 : -mcpu=v9 ; +cpu-flags gcc OPTIONS : sparc : ultrasparc : -mcpu=ultrasparc ; +cpu-flags gcc OPTIONS : sparc : ultrasparc3 : -mcpu=ultrasparc3 ; +# RS/6000 & PowerPC +flags gcc OPTIONS power/32 : -m32 ; +flags gcc OPTIONS power/64 : -m64 ; +flags gcc OPTIONS power// : -mcpu=common ; +cpu-flags gcc OPTIONS : power : 403 : -mcpu=403 ; +cpu-flags gcc OPTIONS : power : 505 : -mcpu=505 ; +cpu-flags gcc OPTIONS : power : 601 : -mcpu=601 ; +cpu-flags gcc OPTIONS : power : 602 : -mcpu=602 ; +cpu-flags gcc OPTIONS : power : 603 : -mcpu=603 ; +cpu-flags gcc OPTIONS : power : 603e : -mcpu=603e ; +cpu-flags gcc OPTIONS : power : 604 : -mcpu=604 ; +cpu-flags gcc OPTIONS : power : 604e : -mcpu=604e ; +cpu-flags gcc OPTIONS : power : 620 : -mcpu=620 ; +cpu-flags gcc OPTIONS : power : 630 : -mcpu=630 ; +cpu-flags gcc OPTIONS : power : 740 : -mcpu=740 ; +cpu-flags gcc OPTIONS : power : 7400 : -mcpu=7400 ; +cpu-flags gcc OPTIONS : power : 7450 : -mcpu=7450 ; +cpu-flags gcc OPTIONS : power : 750 : -mcpu=750 ; +cpu-flags gcc OPTIONS : power : 801 : -mcpu=801 ; +cpu-flags gcc OPTIONS : power : 821 : -mcpu=821 ; +cpu-flags gcc OPTIONS : power : 823 : -mcpu=823 ; +cpu-flags gcc OPTIONS : power : 860 : -mcpu=860 ; +cpu-flags gcc OPTIONS : power : 970 : -mcpu=970 ; +cpu-flags gcc OPTIONS : power : 8540 : -mcpu=8540 ; +cpu-flags gcc OPTIONS : power : power : -mcpu=power ; +cpu-flags gcc OPTIONS : power : power2 : -mcpu=power2 ; +cpu-flags gcc OPTIONS : power : power3 : -mcpu=power3 ; +cpu-flags gcc OPTIONS : power : power4 : -mcpu=power4 ; +cpu-flags gcc OPTIONS : power : power5 : -mcpu=power5 ; +cpu-flags gcc OPTIONS : power : powerpc : -mcpu=powerpc ; +cpu-flags gcc OPTIONS : power : powerpc64 : -mcpu=powerpc64 ; +cpu-flags gcc OPTIONS : power : rios : -mcpu=rios ; +cpu-flags gcc OPTIONS : power : rios1 : -mcpu=rios1 ; +cpu-flags gcc OPTIONS : power : rios2 : -mcpu=rios2 ; +cpu-flags gcc OPTIONS : power : rsc : -mcpu=rsc ; +cpu-flags gcc OPTIONS : power : rs64a : -mcpu=rs64 ; +# AIX variant of RS/6000 & PowerPC +flags gcc OPTIONS power/32/aix : -maix32 ; +flags gcc OPTIONS power/64/aix : -maix64 ; +flags gcc AROPTIONS power/64/aix : "-X 64" ; From 0cd61794dc49a61572bce0db3ee0e2553018b1c6 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Fri, 29 Dec 2006 08:45:24 +0000 Subject: [PATCH 14/27] Use full name of target in --debug-building output. [SVN r36524] --- v2/build/targets.jam | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2/build/targets.jam b/v2/build/targets.jam index e8bf7328b..0b1afa080 100644 --- a/v2/build/targets.jam +++ b/v2/build/targets.jam @@ -1182,7 +1182,8 @@ class basic-target : abstract-target if [ modules.peek : .debug-building ] { ECHO ; - ECHO [ targets.indent ] "Building target '$(self.name)'" ; + local fn = [ full-name ] ; + ECHO [ targets.indent ] "Building target '$(fn)'" ; targets.increase-indent ; ECHO [ targets.indent ] "Build request: " [ $(property-set).raw ] ; ECHO [ targets.indent ] "Target requirements: " [ $(self.requirements).raw ] ; From b5f53450c6b7c31aec3c1233220929658721ae3e Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sun, 31 Dec 2006 16:09:51 +0000 Subject: [PATCH 15/27] Fix link [SVN r36545] --- v2/doc/src/install.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v2/doc/src/install.xml b/v2/doc/src/install.xml index 86041f8e2..aa5822f12 100644 --- a/v2/doc/src/install.xml +++ b/v2/doc/src/install.xml @@ -64,9 +64,9 @@ All paths are given relative to a prebuilt executable from SourceForge. If a prebuilt executable is not provided for your platform or you are using Boost's sources in an unreleased state, it - may be necessary to build bjam - from sources included in the Boost source tree. + may be necessary to + build bjam + from sources included in the Boost source tree. From 27f14a87c9d3bd9ce3e7a8ea64f07b0953be5001 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 6 Jan 2007 10:25:40 +0000 Subject: [PATCH 16/27] Merge docs for builtin target and utility rules in one section, and remove some duplication. [SVN r36596] --- v2/doc/src/reference.xml | 166 +++++++++++++++++---------------------- 1 file changed, 72 insertions(+), 94 deletions(-) diff --git a/v2/doc/src/reference.xml b/v2/doc/src/reference.xml index 03b4cf22f..cd9dabc80 100644 --- a/v2/doc/src/reference.xml +++ b/v2/doc/src/reference.xml @@ -235,10 +235,11 @@ target1 debug gcc/runtime-link=dynamic,static
- Builtin targets + Builtin rules - This section contains the list of all target types defined - in Boost.Build. + This section contains the list of all rules that + can be used in Jamfile—both rules that define new + targets and auxiliary rules. @@ -283,23 +284,6 @@ target1 debug gcc/runtime-link=dynamic,static file must be compiled with special properties. - - -
- - -
- Utility Rules - - The following table describes utility rules that can be - used in Jamfiles. Detailed information for any of these rules can - be obtained by running: - -bjam --help project.rulename - - - - glob @@ -313,84 +297,78 @@ lib tools : [ glob *.cpp ] ; - lib + project - Creates an library file. See - . + Declares project id and attributes, including + project requirements. See . + + + + use-project + + Assigns a symbolic project ID to a project at + a given path. This rule must be better documented! + + + + + explicit + + The explicit 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. + + + + constant + + 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: + +constant VERSION : 1.34.0 ; + + + + + + path-constant + + Same as constant except that + the value is treated as path relative to Jamfile location. For example, + if bjam is invoked in the current directory, + and Jamfile in helper subdirectory has: + +path-constant DATA : data/a.txt ; + + then the variable DATA will be set to + helper/data/a.txt, and if bjam + is invoked from the helper directory, then + the variable DATA will be set to + data/a.txt. + + + + + build-project + + 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. + + + -
- - <tgroup cols="2"> - <thead> - <row> - <entry>Rule</entry> - - <entry>Semantics</entry> - </row> - </thead> - - <tbody> - <row> - <entry><link linkend= - "bbv2.advanced.projects.attributes.projectrule">project</link> - </entry> - - <entry>Define this project's symbolic ID or attributes.</entry> - </row> - - <row> - <entry><xref linkend= - "bbv2.advanced.projects.relationships.useprojectrule">use-project</xref></entry> - - <entry>Make another project known so that it can be referred to by symbolic ID.</entry> - </row> - - <row> - <entry><xref linkend= - "bbv2.advanced.projects.relationships.buildprojectrule">build-project</xref></entry> - - <entry>Cause another project to be built when this one is built.</entry> - </row> - - <row> - <entry><xref linkend= - "bbv2.reference.buildprocess.explict">explicit</xref></entry> - - <entry>State that a target should be built only by explicit - request.</entry> - </row> - - <row> - <entry>glob</entry> - - <entry>Translate a list of shell-style wildcards into a - corresponding list of files.</entry> - </row> - - <row> - <entry>constant</entry> - - <entry>Injects a variable setting into this project's - Jamfile module and those of all its subprojects.</entry> - </row> - - <row> - <entry>path-constant</entry> - - <entry>Injects a variable set to a path value into - this project's Jamfile module and those of all its subprojects. - If the value is a relative path it will be adjusted for - each subproject so that it refers to the same - directory.</entry> - </row> - - - </tbody> - </tgroup> - </table> - </section> + </section> <section id="bbv2.reference.tools"> <title>Builtin tools From 87dd72221647a98c25f9d2ec7a778cd48f27e60e Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 6 Jan 2007 10:32:57 +0000 Subject: [PATCH 17/27] Fix some links [SVN r36598] --- v2/doc/src/tasks.xml | 2 +- v2/doc/src/tutorial.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/doc/src/tasks.xml b/v2/doc/src/tasks.xml index 9932b35c2..9a5fc7225 100644 --- a/v2/doc/src/tasks.xml +++ b/v2/doc/src/tasks.xml @@ -323,7 +323,7 @@ install headers Installing into Several Directories - The alias + The alias rule can be used when targets must be installed into several directories: diff --git a/v2/doc/src/tutorial.xml b/v2/doc/src/tutorial.xml index 39b023826..b0dac9e0b 100644 --- a/v2/doc/src/tutorial.xml +++ b/v2/doc/src/tutorial.xml @@ -521,7 +521,7 @@ alias foo : /other_project//bar/<link>static ; exe e1 : e1.cpp foo ; exe e10 : e10.cpp foo ; - The alias + The alias rule is specifically used to rename a reference to a target and possibly change the properties. From 510e74746f69388bf6cb8a9ece37a6dab1751f5a Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 6 Jan 2007 10:38:36 +0000 Subject: [PATCH 18/27] Move the list of features to the reference section. [SVN r36599] --- v2/doc/src/reference.xml | 270 ++++++++++++++++++++++++++++++++++++++ v2/doc/src/tasks.xml | 272 +-------------------------------------- 2 files changed, 271 insertions(+), 271 deletions(-) diff --git a/v2/doc/src/reference.xml b/v2/doc/src/reference.xml index cd9dabc80..6d2e9bd0c 100644 --- a/v2/doc/src/reference.xml +++ b/v2/doc/src/reference.xml @@ -370,6 +370,276 @@ path-constant DATA : data/a.txt ; +
+ Builtin features + + + variant + + + + A feature that combines several low-level features, making + it easy to request common build configurations. + + + Allowed values: debug, release, + profile. + + The value debug expands to + + +<optimization>off <debug-symbols>on <inlining>off <runtime-debugging>on + + + The value release expands to + + +<optimization>speed <debug-symbols>off <inlining>full <runtime-debugging>off + + + The value profile expands to the same as + release, plus: + + +<profiling>on <debug-symbols>on + + + User can define his own build variants using the variant rule from the common + module. + + Notee: Runtime + debugging is on in debug builds to suit the expectations of + people used to various IDEs. + + + + + + link + + + + A feature that controls how libraries are built. + + + Allowed values: shared, + static + + + source + + + + The <source>X feature has the same effect on + building a target as putting X in the list of sources. + It's 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 ) + See also the <library> feature. + + + + + library + + + + This feature is almost equivalent to the <source> feature, + except that it takes effect only for linking. When you want to + link all targets in a Jamfile to certain library, the + <library> feature is preferred over + <source>X -- the latter will add the library to + all targets, even those that have nothing to do with libraries. + + + + + + dependency + + + + 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. For example, in + application with plugins, the plugins are not used when linking + the application, + application might have 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 #include paths) of some + library to be applied, but don't want to link to it. + + + + + + + + use + + + + 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 + + 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 #include paths) of some + library to be applied, but don't want to link to it. + + + + + + + dll-path + + + + 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. Plase see + in for details. + + + + hardcode-dll-paths + + + + Controls automatic generation of dll-path properties. + + + Allowed values: + true, false. This property + is specific to Unix systems. If an executable is built with + <hardcode-dll-paths>true, 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 + + is very convenient during + development. Plase see the FAQ entry for details. + Note that on Mac OSX, the paths are unconditionally hardcoded by + the linker, and it's not possible to disable that behaviour. + + + + + cflags + cxxflags + linkflags + + + + The value of those features is passed without modification to the + corresponding tools. For cflags that's both the C and C++ + compilers, for cxxflags that's the C++ compiler and for + linkflags that's the linker. The features are handy when + you're trying to do something special that cannot be achieved by + higher-level feature in Boost.Build. + + + + + warnings + + + + The <warnings> feature controls the warning level of compilers. It has the following values: + + off - disables all warnings. + on - enables default warning level for the tool. + all - enables all warnings. + + Default value is all. + + + + + warnings-as-errors + + + + The <warnings-as-errors> makes it possible to treat warnings as errors and abort + compilation on a warning. The value on enables this behaviour. The default value is + off. + + + + + build + + + Allowed values: no + + + The build feature is used to conditionally disable build of a target. If <build>no + is in properties when building a target, build of that target is skipped. Combined with conditional requirements this + allows to skip building some target in configurations where the build is known to fail. + + + + + tag + + The tag feature is used to customize + the name of the generated files. The value should have the form: +@rulename where + rulename should be a name of a rule with + the following signature: +rule tag ( name : type ? : property-set ) + 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 empty string, in which case the default name will be used. + + + Most typical use of the tag 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. + + + + + debug-symbols + + + Allowed values: on, off. + + The debug-symbols feature specifies if + produced object files, executables and libraries should include + debug information. + Typically, the value of this feature is implicitly set by the + variant feature, but it can be explicitly + specified by the user. The most common usage is to build + release variant with debugging information. + + + + + + +
+
Builtin tools diff --git a/v2/doc/src/tasks.xml b/v2/doc/src/tasks.xml index 9a5fc7225..99c8afbf2 100644 --- a/v2/doc/src/tasks.xml +++ b/v2/doc/src/tasks.xml @@ -340,7 +340,7 @@ install install-lib : helper : /usr/lib ; The only two which matter are dependency and, on Unix, - dll-path. + dll-path. @@ -553,277 +553,7 @@ exe app : app.cpp : <implicit-dependency>parser ; targets from "parser" as potential dependencies.
- -
- Builtin features - - - variant - - - - A feature that combines several low-level features, making - it easy to request common build configurations. - - - Allowed values: debug, release, - profile. - - The value debug expands to - - -<optimization>off <debug-symbols>on <inlining>off <runtime-debugging>on - - - The value release expands to - - -<optimization>speed <debug-symbols>off <inlining>full <runtime-debugging>off - - - The value profile expands to the same as - release, plus: - - -<profiling>on <debug-symbols>on - - - User can define his own build variants using the variant rule from the common - module. - - Notee: Runtime - debugging is on in debug builds to suit the expectations of - people used to various IDEs. - - - - - - link - - - - A feature that controls how libraries are built. - - - Allowed values: shared, - static - - - source - - - - The <source>X feature has the same effect on - building a target as putting X in the list of sources. - It's 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 ) - See also the <library> feature. - - - - - library - - - - This feature is almost equivalent to the <source> feature, - except that it takes effect only for linking. When you want to - link all targets in a Jamfile to certain library, the - <library> feature is preferred over - <source>X -- the latter will add the library to - all targets, even those that have nothing to do with libraries. - - - - - - dependency - - - - 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. For example, in - application with plugins, the plugins are not used when linking - the application, - application might have 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 #include paths) of some - library to be applied, but don't want to link to it. - - - - - - - - use - - - - 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 - - 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 #include paths) of some - library to be applied, but don't want to link to it. - - - - - - - dll-path - - - - 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. Plase see - in for details. - - - - hardcode-dll-paths - - - - Controls automatic generation of dll-path properties. - - - Allowed values: - true, false. This property - is specific to Unix systems. If an executable is built with - <hardcode-dll-paths>true, 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 - - is very convenient during - development. Plase see the FAQ entry for details. - Note that on Mac OSX, the paths are unconditionally hardcoded by - the linker, and it's not possible to disable that behaviour. - - - - - cflags - cxxflags - linkflags - - - - The value of those features is passed without modification to the - corresponding tools. For cflags that's both the C and C++ - compilers, for cxxflags that's the C++ compiler and for - linkflags that's the linker. The features are handy when - you're trying to do something special that cannot be achieved by - higher-level feature in Boost.Build. - - - - - warnings - - - - The <warnings> feature controls the warning level of compilers. It has the following values: - - off - disables all warnings. - on - enables default warning level for the tool. - all - enables all warnings. - - Default value is all. - - - - - warnings-as-errors - - - - The <warnings-as-errors> makes it possible to treat warnings as errors and abort - compilation on a warning. The value on enables this behaviour. The default value is - off. - - - - - build - - - Allowed values: no - - - The build feature is used to conditionally disable build of a target. If <build>no - is in properties when building a target, build of that target is skipped. Combined with conditional requirements this - allows to skip building some target in configurations where the build is known to fail. - - - - - tag - - The tag feature is used to customize - the name of the generated files. The value should have the form: -@rulename where - rulename should be a name of a rule with - the following signature: -rule tag ( name : type ? : property-set ) - 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 empty string, in which case the default name will be used. - - - Most typical use of the tag 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. - - - - - debug-symbols - - - Allowed values: on, off. - - The debug-symbols feature specifies if - produced object files, executables and libraries should include - debug information. - Typically, the value of this feature is implicitly set by the - variant feature, but it can be explicitly - specified by the user. The most common usage is to build - release variant with debugging information. - - - - - - -
From b43225587a0cea0ff8a280a93636f9f4136d749b Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 6 Jan 2007 11:00:08 +0000 Subject: [PATCH 19/27] Fix more links [SVN r36601] --- v2/doc/src/advanced.xml | 37 ++++++++++--------------------------- v2/doc/src/reference.xml | 4 ++-- v2/doc/src/tasks.xml | 3 +-- 3 files changed, 13 insertions(+), 31 deletions(-) diff --git a/v2/doc/src/advanced.xml b/v2/doc/src/advanced.xml index 0f701cfbf..34a95dd7c 100644 --- a/v2/doc/src/advanced.xml +++ b/v2/doc/src/advanced.xml @@ -49,24 +49,16 @@ How to configure Boost.Build
- - How to write Jamfiles + + How to write declares targets in Jamfiles How the build process works - Some Basics about the Boost.Jam language. See also the - Boost.Jam - documentation. - + Some Basics about the Boost.Jam language. See + . @@ -77,8 +69,7 @@ This section will describe the basics of the Boost.Jam language—just enough for writing Jamfiles. For more information, - please see the Boost.Jam + please see the Boost.Jam documentation. Boost.Jam has an interpreted, procedural language. @@ -543,7 +534,7 @@ bjam optimization=space 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 . The user can also declare + "bbv2.reference.rules"/>. The user can also declare custom main target rules as shown in . @@ -1011,17 +1002,9 @@ project tennis
Besides defining projects and main targets, Jamfiles - commonly invoke utility rules such as - constant and - path-constant, which inject a - specified Boost.Jam variable setting into this project's Jamfile - module and those of all its subprojects. See for a complete description - of these utility rules. Jamfiles are regular Boost.Jam source - files and Boost.Build modules, so naturally they can contain any kind of Boost.Jam code, - including rule definitions. - + often invoke various utility rules. For the full list of rules + that can be directly used in Jamfile see + . Each subproject inherits attributes, constants and rules @@ -1095,7 +1078,7 @@ project tennis -
+
Build Request diff --git a/v2/doc/src/reference.xml b/v2/doc/src/reference.xml index 6d2e9bd0c..5b9c1cf80 100644 --- a/v2/doc/src/reference.xml +++ b/v2/doc/src/reference.xml @@ -153,7 +153,7 @@ boost-build build-system ; An argument containing either slashes or the = symbol specifies a number of build request elements (see ). In its simplest + linkend="bbv2.advanced.build_request"/>). In its simplest form, it's just a set of properties, separated by slashes, which become a single build request element, for example: @@ -234,7 +234,7 @@ target1 debug gcc/runtime-link=dynamic,static
-
+
Builtin rules This section contains the list of all rules that diff --git a/v2/doc/src/tasks.xml b/v2/doc/src/tasks.xml index 99c8afbf2..c4d06b0f9 100644 --- a/v2/doc/src/tasks.xml +++ b/v2/doc/src/tasks.xml @@ -43,8 +43,7 @@ exe hello : hello.cpp some_library.lib /some_project//library PATH environment variable should include the path to the libraries. It means you have to either add the paths manually, or place the application and the libraries to the same - directory, for example using the - stage rule. + directory. See .