diff --git a/doc/src/advanced.xml b/doc/src/advanced.xml index 0e1e49961..0f701cfbf 100644 --- a/doc/src/advanced.xml +++ b/doc/src/advanced.xml @@ -631,13 +631,16 @@ rule rule-name (
Name + The name of main target has two purposes. First, it's used to refer to this target from other targets and from command line. Second, it's used to compute the names of the generated files. Typically, filenames are obtained from main target name by appending system-dependent suffixes and prefixes. - THe name of a main target can contain alphanumeral characters, + The name of a main target can contain alphanumeric characters, dashes, undescores and dots. The entire name is significant when resolving references from other targets. For determining filenames, only the part before the first dot is taken. For example: @@ -665,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/doc/src/extending.xml b/doc/src/extending.xml index 34e1893d9..58471d733 100644 --- a/doc/src/extending.xml +++ b/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/doc/src/reference.xml b/doc/src/reference.xml index 3d9e79522..6db2308ce 100644 --- a/doc/src/reference.xml +++ b/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