Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50575 - in branches/release/tools/build: CMake CMake/LinkTest CMake/sanity CMake/sanity/one_clean_one_warn CMake/sanity/one_clean_one_warn/src CMake/sanity/one_clean_one_warn/test CMake/sanity/wont_link CMake/sanity/wont_link/src CMake/sanity/wont_link/test v2 v2/build v2/doc v2/doc/src v2/example/python_modules v2/kernel v2/test v2/tools v2/util
From: bdawes_at_[hidden]
Date: 2009-01-14 09:31:19


Author: bemandawes
Date: 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
New Revision: 50575
URL: http://svn.boost.org/trac/boost/changeset/50575

Log:
tools/build: merge from trunk
Added:
   branches/release/tools/build/CMake/
      - copied from r50574, /trunk/tools/build/CMake/
   branches/release/tools/build/CMake/BoostBuildSlave.cmake
      - copied unchanged from r50574, /trunk/tools/build/CMake/BoostBuildSlave.cmake
   branches/release/tools/build/CMake/BoostConfig.cmake
      - copied unchanged from r50574, /trunk/tools/build/CMake/BoostConfig.cmake
   branches/release/tools/build/CMake/BoostCore.cmake
      - copied unchanged from r50574, /trunk/tools/build/CMake/BoostCore.cmake
   branches/release/tools/build/CMake/BoostDocs.cmake
      - copied unchanged from r50574, /trunk/tools/build/CMake/BoostDocs.cmake
   branches/release/tools/build/CMake/BoostTesting.cmake
      - copied unchanged from r50574, /trunk/tools/build/CMake/BoostTesting.cmake
   branches/release/tools/build/CMake/BoostUtils.cmake
      - copied unchanged from r50574, /trunk/tools/build/CMake/BoostUtils.cmake
   branches/release/tools/build/CMake/FindICU.cmake
      - copied unchanged from r50574, /trunk/tools/build/CMake/FindICU.cmake
   branches/release/tools/build/CMake/LinkTest/
      - copied from r50574, /trunk/tools/build/CMake/LinkTest/
   branches/release/tools/build/CMake/LinkTest/CMakeLists.txt
      - copied unchanged from r50574, /trunk/tools/build/CMake/LinkTest/CMakeLists.txt
   branches/release/tools/build/CMake/boost_build_slave.py.in
      - copied unchanged from r50574, /trunk/tools/build/CMake/boost_build_slave.py.in
   branches/release/tools/build/CMake/catalog.xml.in
      - copied unchanged from r50574, /trunk/tools/build/CMake/catalog.xml.in
   branches/release/tools/build/CMake/classify.py.in
      - copied unchanged from r50574, /trunk/tools/build/CMake/classify.py.in
   branches/release/tools/build/CMake/finish.py.in
      - copied unchanged from r50574, /trunk/tools/build/CMake/finish.py.in
   branches/release/tools/build/CMake/info.py.in
      - copied unchanged from r50574, /trunk/tools/build/CMake/info.py.in
   branches/release/tools/build/CMake/marshal.py.in
      - copied unchanged from r50574, /trunk/tools/build/CMake/marshal.py.in
   branches/release/tools/build/CMake/passthru.py.in
      - copied unchanged from r50574, /trunk/tools/build/CMake/passthru.py.in
   branches/release/tools/build/CMake/post.py.in
      - copied unchanged from r50574, /trunk/tools/build/CMake/post.py.in
   branches/release/tools/build/CMake/run_continuous_slave.py.in
      - copied unchanged from r50574, /trunk/tools/build/CMake/run_continuous_slave.py.in
   branches/release/tools/build/CMake/sanity/
      - copied from r50574, /trunk/tools/build/CMake/sanity/
   branches/release/tools/build/CMake/sanity/CMakeLists.txt
      - copied unchanged from r50574, /trunk/tools/build/CMake/sanity/CMakeLists.txt
   branches/release/tools/build/CMake/sanity/one_clean_one_warn/
      - copied from r50574, /trunk/tools/build/CMake/sanity/one_clean_one_warn/
   branches/release/tools/build/CMake/sanity/one_clean_one_warn/CMakeLists.txt
      - copied unchanged from r50574, /trunk/tools/build/CMake/sanity/one_clean_one_warn/CMakeLists.txt
   branches/release/tools/build/CMake/sanity/one_clean_one_warn/src/
      - copied from r50574, /trunk/tools/build/CMake/sanity/one_clean_one_warn/src/
   branches/release/tools/build/CMake/sanity/one_clean_one_warn/src/CMakeLists.txt
      - copied unchanged from r50574, /trunk/tools/build/CMake/sanity/one_clean_one_warn/src/CMakeLists.txt
   branches/release/tools/build/CMake/sanity/one_clean_one_warn/src/green.cpp
      - copied unchanged from r50574, /trunk/tools/build/CMake/sanity/one_clean_one_warn/src/green.cpp
   branches/release/tools/build/CMake/sanity/one_clean_one_warn/src/warn.cpp
      - copied unchanged from r50574, /trunk/tools/build/CMake/sanity/one_clean_one_warn/src/warn.cpp
   branches/release/tools/build/CMake/sanity/one_clean_one_warn/test/
      - copied from r50574, /trunk/tools/build/CMake/sanity/one_clean_one_warn/test/
   branches/release/tools/build/CMake/sanity/one_clean_one_warn/test/CMakeLists.txt
      - copied unchanged from r50574, /trunk/tools/build/CMake/sanity/one_clean_one_warn/test/CMakeLists.txt
   branches/release/tools/build/CMake/sanity/one_clean_one_warn/test/times_out.cpp
      - copied unchanged from r50574, /trunk/tools/build/CMake/sanity/one_clean_one_warn/test/times_out.cpp
   branches/release/tools/build/CMake/sanity/wont_link/
      - copied from r50574, /trunk/tools/build/CMake/sanity/wont_link/
   branches/release/tools/build/CMake/sanity/wont_link/CMakeLists.txt
      - copied unchanged from r50574, /trunk/tools/build/CMake/sanity/wont_link/CMakeLists.txt
   branches/release/tools/build/CMake/sanity/wont_link/src/
      - copied from r50574, /trunk/tools/build/CMake/sanity/wont_link/src/
   branches/release/tools/build/CMake/sanity/wont_link/src/CMakeLists.txt
      - copied unchanged from r50574, /trunk/tools/build/CMake/sanity/wont_link/src/CMakeLists.txt
   branches/release/tools/build/CMake/sanity/wont_link/src/compiles_nowarn.cpp
      - copied unchanged from r50574, /trunk/tools/build/CMake/sanity/wont_link/src/compiles_nowarn.cpp
   branches/release/tools/build/CMake/sanity/wont_link/test/
      - copied from r50574, /trunk/tools/build/CMake/sanity/wont_link/test/
   branches/release/tools/build/CMake/sanity/wont_link/test/CMakeLists.txt
      - copied unchanged from r50574, /trunk/tools/build/CMake/sanity/wont_link/test/CMakeLists.txt
   branches/release/tools/build/CMake/sanity/wont_link/test/link_error.cpp
      - copied unchanged from r50574, /trunk/tools/build/CMake/sanity/wont_link/test/link_error.cpp
   branches/release/tools/build/CMake/start.py.in
      - copied unchanged from r50574, /trunk/tools/build/CMake/start.py.in
   branches/release/tools/build/CMake/unix_kill.py.in
      - copied unchanged from r50574, /trunk/tools/build/CMake/unix_kill.py.in
   branches/release/tools/build/CMake/windows_kill.py.in
      - copied unchanged from r50574, /trunk/tools/build/CMake/windows_kill.py.in
   branches/release/tools/build/v2/boost_build.svg
      - copied unchanged from r50574, /trunk/tools/build/v2/boost_build.svg
   branches/release/tools/build/v2/test/copy_time.py
      - copied unchanged from r50574, /trunk/tools/build/v2/test/copy_time.py
Removed:
   branches/release/tools/build/v2/doc/userman.pdf
Text files modified:
   branches/release/tools/build/v2/build-system.jam | 12 +++-
   branches/release/tools/build/v2/build/feature.jam | 14 +++++
   branches/release/tools/build/v2/build/generators.jam | 62 +++++++++++++++++++++----
   branches/release/tools/build/v2/build/project.jam | 31 +++++++++++
   branches/release/tools/build/v2/build/property.jam | 6 +-
   branches/release/tools/build/v2/build/toolset.jam | 15 +++--
   branches/release/tools/build/v2/build/type.jam | 6 ++
   branches/release/tools/build/v2/doc/src/advanced.xml | 43 +++++++++++++++++
   branches/release/tools/build/v2/doc/src/reference.xml | 80 ++++++++++++++++++++++++++++++++
   branches/release/tools/build/v2/doc/src/tasks.xml | 49 +++++++++++++++++++
   branches/release/tools/build/v2/doc/src/tutorial.xml | 2
   branches/release/tools/build/v2/example/python_modules/python_helpers.jam | 5 ++
   branches/release/tools/build/v2/kernel/bootstrap.jam | 20 ++++++--
   branches/release/tools/build/v2/kernel/errors.jam | 4
   branches/release/tools/build/v2/roll.sh | 1
   branches/release/tools/build/v2/test/BoostBuild.py | 24 ++++++---
   branches/release/tools/build/v2/test/generator_selection.py | 2
   branches/release/tools/build/v2/test/implicit_dependency.py | 33 +++++++++++++
   branches/release/tools/build/v2/test/relative_sources.py | 22 ++++++++
   branches/release/tools/build/v2/test/test_all.py | 53 ++++++++++++++++-----
   branches/release/tools/build/v2/tools/boostbook.jam | 2
   branches/release/tools/build/v2/tools/builtin.jam | 18 +++++--
   branches/release/tools/build/v2/tools/common.jam | 92 ++++++++++++++++---------------------
   branches/release/tools/build/v2/tools/darwin.jam | 21 ++++++--
   branches/release/tools/build/v2/tools/gcc.jam | 77 ++++++++++++++++++------------
   branches/release/tools/build/v2/tools/intel-darwin.jam | 8 ++
   branches/release/tools/build/v2/tools/intel-linux.jam | 26 +++++++++-
   branches/release/tools/build/v2/tools/intel-win.jam | 26 +++++++++-
   branches/release/tools/build/v2/tools/msvc.jam | 97 ++++++++++++++++++++++++++++++---------
   branches/release/tools/build/v2/tools/python.jam | 2
   branches/release/tools/build/v2/tools/qcc.jam | 2
   branches/release/tools/build/v2/tools/stage.jam | 2
   branches/release/tools/build/v2/tools/sun.jam | 1
   branches/release/tools/build/v2/tools/testing.jam | 8 --
   branches/release/tools/build/v2/util/option.jam | 10 ++++
   branches/release/tools/build/v2/util/path.jam | 22 +++++++-
   branches/release/tools/build/v2/util/print.jam | 6 +-
   37 files changed, 700 insertions(+), 204 deletions(-)

Modified: branches/release/tools/build/v2/build-system.jam
==============================================================================
--- branches/release/tools/build/v2/build-system.jam (original)
+++ branches/release/tools/build/v2/build-system.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -441,8 +441,8 @@
         {
             if $(.debug-config)
             {
- ECHO notice: [cmdline-cfg] toolset $(toolset-version) not
- previously configured; attempting to auto-configure now ;
+ ECHO "notice: [cmdline-cfg] toolset $(toolset-version) not"
+ "previously configured; attempting to auto-configure now" ;
             }
             toolset.using $(toolset) : $(version) ;
         }
@@ -870,7 +870,12 @@
         }
     }
 
-
+ local j = [ option.get jobs ] ;
+ if $(j)
+ {
+ modules.poke : PARALLELISM : $(j) ;
+ }
+
     # The 'all' pseudo target is not strictly needed expect in the case when we
     # use it below but people often assume they always have this target
     # available and do not declare it themselves before use which may cause
@@ -878,7 +883,6 @@
     # 'all' target.
     NOTFILE all ;
 
-
     # And now that all the actual raw Jam targets and all the dependencies
     # between them have been prepared all that is left is to tell Jam to update
     # those targets.

Modified: branches/release/tools/build/v2/build/feature.jam
==============================================================================
--- branches/release/tools/build/v2/build/feature.jam (original)
+++ branches/release/tools/build/v2/build/feature.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -161,6 +161,20 @@
 rule set-default ( feature : value )
 {
     local f = [ grist $(feature) ] ;
+ local a = $($(f).attributes) ;
+ local bad-attribute = ;
+ if free in $(a)
+ {
+ bad-attribute = free ;
+ }
+ else if optional in $(a)
+ {
+ bad-attribute = optional ;
+ }
+ if $(bad-attribute)
+ {
+ errors.error "$(bad-attribute) property $(f) cannot have a default." ;
+ }
     if ! $(value) in $($(f).values)
     {
         errors.error "The specified default value, '$(value)' is invalid"

Modified: branches/release/tools/build/v2/build/generators.jam
==============================================================================
--- branches/release/tools/build/v2/build/generators.jam (original)
+++ branches/release/tools/build/v2/build/generators.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -172,6 +172,7 @@
     import virtual-target ;
     import "class" : new ;
     import property ;
+ import path ;
 
     EXPORT class_at_generator : indent increase-indent decrease-indent
         generators.dout ;
@@ -203,6 +204,7 @@
     )
     {
         self.id = $(id) ;
+ self.rule-name = $(id) ;
         self.composing = $(composing) ;
         self.source-types = $(source-types) ;
         self.target-types-and-names = $(target-types-and-names) ;
@@ -260,7 +262,17 @@
     {
         return $(self.requirements) ;
     }
-
+
+ rule set-rule-name ( rule-name )
+ {
+ self.rule-name = $(rule-name) ;
+ }
+
+ rule rule-name ( )
+ {
+ return $(self.rule-name) ;
+ }
+
     # Returns a true value if the generator can be run with the specified
     # properties.
     #
@@ -302,12 +314,13 @@
     #
     rule clone ( new-id : new-toolset-properties + )
     {
- return [ new $(__class__) $(new-id) $(self.composing) :
+ local g = [ new $(__class__) $(new-id) $(self.composing) :
             $(self.source-types) : $(self.target-types-and-names) :
             # Note: this does not remove any subfeatures of <toolset> which
             # might cause problems.
             [ property.change $(self.requirements) : <toolset> ]
- $(new-toolset-properties) ] ;
+ $(new-toolset-properties) ] ;
+ return $(g) ;
     }
 
     # Creates another generator that is the same as $(self), except that if
@@ -330,8 +343,13 @@
             }
         }
 
- return [ new $(__class__) $(self.id) $(self.composing) :
+ local g = [ new $(__class__) $(self.id) $(self.composing) :
             $(self.source-types) : $(target-types) : $(self.requirements) ] ;
+ if $(self.rule-name)
+ {
+ $(g).set-rule-name $(self.rule-name) ;
+ }
+ return $(g) ;
     }
 
     # Tries to invoke this generator on the given sources. Returns a list of
@@ -447,6 +465,32 @@
         return $(result) ;
     }
 
+ # Determine target name from fullname (maybe including path components)
+ # Place optional prefix and postfix around basename
+ #
+ rule determine-target-name ( fullname : prefix ? : postfix ? )
+ {
+ # See if we need to add directory to the target name.
+ local dir = $(fullname:D) ;
+ local name = $(fullname:B) ;
+
+ name = $(prefix:E=)$(name) ;
+ name = $(name)$(postfix:E=) ;
+
+ if $(dir) &&
+ # Never append '..' to target path.
+ ! [ MATCH .*(\\.\\.).* : $(dir) ]
+ &&
+ ! [ path.is-rooted $(dir) ]
+ {
+ # Relative path is always relative to the source
+ # directory. Retain it, so that users can have files
+ # with the same in two different subdirectories.
+ name = $(dir)/$(name) ;
+ }
+ return $(name) ;
+ }
+
     # Determine the name of the produced target from the names of the sources.
     #
     rule determine-output-name ( sources + )
@@ -469,10 +513,7 @@
                 errors.error "$(self.id): source targets have different names: cannot determine target name" ;
             }
         }
-
- # Names of sources might include directory. We should strip it.
- name = $(name:D=) ;
-
+ name = [ determine-target-name [ $(sources[1]).name ] ] ;
         return $(name) ;
     }
 
@@ -506,7 +547,7 @@
 
         # Assign an action for each target.
         local action = [ action-class ] ;
- local a = [ class.new $(action) $(sources) : $(self.id) :
+ local a = [ class.new $(action) $(sources) : $(self.rule-name) :
                     $(property-set) ] ;
 
         # Create generated target for each target type.
@@ -515,7 +556,8 @@
         local post = $(self.name-postfix) ;
         for local t in $(self.target-types)
         {
- local generated-name = $(pre[1])$(name)$(post[1]) ;
+ local generated-name = $(pre[1])$(name:BS)$(post[1]) ;
+ generated-name = $(generated-name:R=$(name:D)) ;
             pre = $(pre[2-]) ;
             post = $(post[2-]) ;
 

Modified: branches/release/tools/build/v2/build/project.jam
==============================================================================
--- branches/release/tools/build/v2/build/project.jam (original)
+++ branches/release/tools/build/v2/build/project.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -286,7 +286,13 @@
     {
         jamfile-to-load = [ find-jamfile $(dir) ] ;
     }
-
+
+ if $(jamfile-to-load[2])
+ {
+ errors.error "Multiple Jamfiles found at '$(dir)'"
+ : "Filenames are: " $(jamfile-to-load:D=) ;
+ }
+
     # The module of the Jamfile.
     #
     local jamfile-module = [ module-name [ path.parent $(jamfile-to-load) ] ] ;
@@ -811,7 +817,17 @@
         # absolute.
         for local p in $(paths)
         {
- result += [ path.root $(p) [ path.pwd ] ] ;
+ # If the path is below source location, use relative path.
+ # Otherwise, use full path just to avoid any ambiguities.
+ local rel = [ path.relative $(p) $(location) : no-error ] ;
+ if $(rel) = not-a-child
+ {
+ result += [ path.root $(p) [ path.pwd ] ] ;
+ }
+ else
+ {
+ result += $(rel) ;
+ }
         }
     }
     else
@@ -1036,4 +1052,15 @@
             return $(condition):$(requirements) ;
         }
     }
+
+ rule option ( name : value )
+ {
+ if $(__name__) != site-config && $(__name__) != user-config
+ {
+ import errors ;
+ errors.error "The 'option' rule may be used only in site-config or user-config" ;
+ }
+ import option ;
+ option.set $(name) : $(value) ;
+ }
 }

Modified: branches/release/tools/build/v2/build/property.jam
==============================================================================
--- branches/release/tools/build/v2/build/property.jam (original)
+++ branches/release/tools/build/v2/build/property.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -609,8 +609,8 @@
         local best = [ sequence.select-highest-ranked $(matches)
             : $(match-ranks) ] ;
         if $(best[2])
- {
- errors.error "Ambiguous key" ;
+ {
+ errors.error "Ambiguous key $(properties:J= :E=)" ;
         }
         local original = $(self.value.$(best)) ;
         if $(value)
@@ -736,7 +736,7 @@
 
     try ;
         $(pm).find <toolset>gcc <os>NT <os>CYGWIN ;
- catch "Ambiguous key" ;
+ catch "Ambiguous key <toolset>gcc <os>NT <os>CYGWIN" ;
 
     # Test ordinary properties.
     assert.result : split-conditional <toolset>gcc ;

Modified: branches/release/tools/build/v2/build/toolset.jam
==============================================================================
--- branches/release/tools/build/v2/build/toolset.jam (original)
+++ branches/release/tools/build/v2/build/toolset.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -417,15 +417,16 @@
 # When such flag settings must be inherited, define a rule in base toolset
 # module and call it as needed.
 #
-rule inherit-flags ( toolset : base : prohibited-properties * )
+rule inherit-flags ( toolset : base : prohibited-properties * : prohibited-vars * )
 {
     for local f in $(.module-flags.$(base))
     {
         local rule-or-module = $(.rule-or-module.$(f)) ;
- if [ set.difference
- $(.$(rule-or-module).condition.$(f)) :
- $(prohibited-properties)
- ] || ! $(.$(rule-or-module).condition.$(f))
+ if ( [ set.difference
+ $(.$(rule-or-module).condition.$(f)) :
+ $(prohibited-properties) ]
+ || ! $(.$(rule-or-module).condition.$(f))
+ ) && ( ! $(.$(rule-or-module).variable.$(f)) in $(prohibited-vars) )
         {
             local rule_ = [ MATCH "[^.]*\.(.*)" : $(rule-or-module) ] ;
             local new-rule-or-module ;
@@ -455,9 +456,9 @@
     local rules ;
     for local g in $(base-generators)
     {
- local id = [ MATCH "[^.]*\.(.*)" : [ $(g).id ] ] ;
- rules += $(id) ;
+ rules += [ MATCH "[^.]*\.(.*)" : [ $(g).rule-name ] ] ;
     }
+ rules = [ sequence.unique $(rules) ] ;
     IMPORT $(base) : $(rules) : $(toolset) : $(rules) ;
     IMPORT $(base) : $(rules) : : $(toolset).$(rules) ;
 }

Modified: branches/release/tools/build/v2/build/type.jam
==============================================================================
--- branches/release/tools/build/v2/build/type.jam (original)
+++ branches/release/tools/build/v2/build/type.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -13,7 +13,7 @@
 import project ;
 import property ;
 import scanner ;
-
+import os ;
 
 # The following import would create a circular dependency:
 # project -> project-root -> builtin -> type -> targets -> project
@@ -378,6 +378,10 @@
 #
 rule type ( filename )
 {
+ if [ os.name ] in NT CYGWIN
+ {
+ filename = $(filename:L) ;
+ }
     local type ;
     while ! $(type) && $(filename:S)
     {

Modified: branches/release/tools/build/v2/doc/src/advanced.xml
==============================================================================
--- branches/release/tools/build/v2/doc/src/advanced.xml (original)
+++ branches/release/tools/build/v2/doc/src/advanced.xml 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -608,6 +608,49 @@
               </para>
             </listitem>
           </varlistentry>
+
+ <varlistentry>
+ <term><option>-a</option></term>
+ <listitem>
+ <para>Causes all files to be rebuilt.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-n</option></term>
+ <listitem>
+ <para>Do no execute the commands, only print them.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-d+2</option></term>
+ <listitem>
+ <para>Show commands as they are executed.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-d0</option></term>
+ <listitem>
+ <para>Supress all informational messages.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-q</option></term>
+ <listitem>
+ <para>Stop at first error, as opposed to continuing to build targets
+ that don't depend on the failed ones.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-j <replaceable>N</replaceable></option></term>
+ <listitem>
+ <para>Run up to <replaceable>N</replaceable> commands in parallel.</para>
+ </listitem>
+ </varlistentry>
          
           <varlistentry>
             <term><option>--debug-configuration</option></term>

Modified: branches/release/tools/build/v2/doc/src/reference.xml
==============================================================================
--- branches/release/tools/build/v2/doc/src/reference.xml (original)
+++ branches/release/tools/build/v2/doc/src/reference.xml 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -238,6 +238,12 @@
   <section id="bbv2.advanced.builtins.features">
     <title>Builtin features</title>
 
+ <para>This section documents the features that are built-in into
+ Boost.Build. For features with a fixed set of values, that set is
+ provided, with the default value listed first.</para>
+
+ <indexterm><primary>features</primary><secondary>builtin</secondary></indexterm>
+
     <variablelist>
       <varlistentry><term><literal>variant</literal></term>
 
@@ -328,6 +334,25 @@
         </listitem>
       </varlistentry>
 
+ <varlistentry>
+ <term><literal>threading</literal></term>
+
+ <listitem>
+
+ <para><emphasis role="bold">Allowed values:</emphasis> <literal>single</literal>,
+ <literal>multi</literal></para>
+
+ <simpara>
+ Controls if the project should be built in multi-threaded mode. This feature does not
+ necessary change code generation in the compiler, but it causes the compiler to link
+ to additional or different runtime libraries, and define additional preprocessor
+ symbols (for example, <code>_MT</code> on Windows and <code>_REENTRANT</code> on Linux).
+ How those symbols affect the compiled code depends on the code itself.
+ </simpara>
+
+ </listitem>
+ </varlistentry>
+
       <varlistentry><term><literal>source</literal></term>
 
         <listitem>
@@ -557,6 +582,32 @@
         </listitem>
       </varlistentry>
 
+ <varlistentry><term><literal>target-os</literal></term>
+ <listitem>
+
+ <anchor id="bbv2.reference.features.target-os"/>
+
+ <para>
+ The operating system for which the code is to be generated. The
+ compiler you used should be the compiler for that operating
+ system. This option causes Boost.Build to use naming conventions
+ suitable for that operating system, and adjust build process
+ accordingly. For example, with gcc, it controls if import
+ libraries are produced for shared libraries or not.
+ </para>
+
+ <para>The complete list of possible values for this feature is:
+ aix, bsd, cygwin, darwin, freebsd, hpux, iphone, linux, netbsd,
+ openbsd, osf, qnx, qnxnto, sgi, solaris, unix, unixware, windows.
+ </para>
+
+ <para>See <xref linkend="bbv2.tasks.crosscompile"/> for details of
+ crosscompilation</para>
+
+ </listitem>
+ </varlistentry>
+
+
       <varlistentry><term><literal>architecture</literal></term>
         <listitem>
 
@@ -628,6 +679,31 @@
         </listitem>
       </varlistentry>
 
+ <varlistentry><term><literal>embed-manifest</literal></term>
+ <listitem>
+
+ <indexterm><primary>manifest file</primary><secondary>embedding</secondary></indexterm>
+ <indexterm><primary>embed-manifest</primary></indexterm>
+
+ <para>
+ <emphasis role="bold">Allowed values:</emphasis> on, off.
+ </para>
+
+ <para>This feature is specific to the msvc toolset (see
+ <xref linkend="bbv2.reference.tools.compiler.msvc"/>),
+ and controls whether the manifest files should be embedded inside
+ executables and shared libraries, or placed alongside them. This
+ feature corresponds to the IDE option found in the project settings dialog,
+ under <menuchoice><guimenu>Configuration Properties</guimenu>
+ <guisubmenu>Manifest Tool</guisubmenu>
+ <guisubmenu>Input and Output</guisubmenu>
+ <guimenuitem>Embed manifest</guimenuitem> </menuchoice>.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+
     </variablelist>
   </section>
 
@@ -865,7 +941,7 @@
             </varlistentry>
         </variablelist>
 
- <section>
+ <section id="v2.reference.tools.compiler.msvc.64">
             <title>64-bit support</title>
 
             <indexterm><primary>64-bit compilation</primary>
@@ -2026,7 +2102,7 @@
 
 <!--
      Local Variables:
- mode: xml
+ mode: nxml
      sgml-indent-data: t
      sgml-parent-document: ("userman.xml" "chapter")
      sgml-set-face: t

Modified: branches/release/tools/build/v2/doc/src/tasks.xml
==============================================================================
--- branches/release/tools/build/v2/doc/src/tasks.xml (original)
+++ branches/release/tools/build/v2/doc/src/tasks.xml 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -713,11 +713,58 @@
     </para>
   </section>
 
+ <section id="bbv2.tasks.crosscompile">
+ <title>Cross-compilation</title>
+
+ <indexterm><primary>cross compilation</primary></indexterm>
+
+ <para>Boost.Build supports cross compilation with the gcc and msvc
+ toolsets.</para>
+
+ <para>
+ When using gcc, you first need to specify your cross compiler
+ in <filename>user-config.jam</filename> (see <xref linkend="bbv2.advanced.configuration"/>),
+ for example:</para>
+<programlisting>
+using gcc : arm : arm-none-linux-gnueabi-g++ ;
+</programlisting>
+ <para>
+ After that, if the host and target os are the same, for example Linux, you can
+ just request that this compiler version to be used:
+ </para>
+<screen>
+bjam toolset=gcc-arm
+</screen>
+
+ <para>
+ If you want to target different operating system from the host, you need
+ to additionally specify the value for the <code>target-os</code> feature, for
+ example:
+ </para>
+<screen>
+# On windows box
+bjam toolset=gcc-arm <emphasis role="bold">target-os=linux</emphasis>
+# On Linux box
+bjam toolset=gcc-mingw <emphasis role="bold">target-os=windows</emphasis>
+</screen>
+ <para>
+ For the complete list of allowed opeating system names, please see the documentation for
+ <link linkend="bbv2.reference.features.target-os">target-os feature</link>.
+ </para>
+
+ <para>
+ When using the msvc compiler, it's only possible to cross-compiler to a 64-bit system
+ on a 32-bit host. Please see <xref linkend="v2.reference.tools.compiler.msvc.64"/> for
+ details.
+ </para>
+
+ </section>
+
 </chapter>
 
 <!--
      Local Variables:
- mode: xml
+ mode: nxml
      sgml-indent-data: t
      sgml-parent-document: ("userman.xml" "chapter")
      sgml-set-face: t

Modified: branches/release/tools/build/v2/doc/src/tutorial.xml
==============================================================================
--- branches/release/tools/build/v2/doc/src/tutorial.xml (original)
+++ branches/release/tools/build/v2/doc/src/tutorial.xml 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -426,7 +426,7 @@
 
       <programlisting>
 project
- : requirements &lt;source&gt;/boost/filesystem//fs
+ : requirements &lt;library&gt;/boost/filesystem//fs
    ;</programlisting>
     </tip>
   </section>

Deleted: branches/release/tools/build/v2/doc/userman.pdf
==============================================================================
Binary file. No diff available.

Modified: branches/release/tools/build/v2/example/python_modules/python_helpers.jam
==============================================================================
--- branches/release/tools/build/v2/example/python_modules/python_helpers.jam (original)
+++ branches/release/tools/build/v2/example/python_modules/python_helpers.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -2,6 +2,11 @@
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 
+import modules ;
+local here = [ modules.binding $(__name__) ] ;
+here = $(here:D) ;
+modules.poke : EXTRA_PYTHONPATH : $(here) ;
+
 # Import the Python rules to Boost.Build
 PYTHON_IMPORT_RULE python_helpers : test1 : python_helpers : test1 ;
 PYTHON_IMPORT_RULE python_helpers : test2 : python_helpers : test2 ;

Modified: branches/release/tools/build/v2/kernel/bootstrap.jam
==============================================================================
--- branches/release/tools/build/v2/kernel/bootstrap.jam (original)
+++ branches/release/tools/build/v2/kernel/bootstrap.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -20,7 +20,7 @@
     {
         ECHO "error: builtin rule '$(r)' is not present" ;
         ECHO "error: your version of bjam is likely out of date" ;
- ECHO "error: please get a fresh version from CVS." ;
+ ECHO "error: please get a fresh version from SVN." ;
         EXIT ;
     }
 }
@@ -37,7 +37,7 @@
         ECHO "error: missing native rule '$(native[1]).$(native[2])'" ;
         ECHO "error: or interface version of that rule is too low" ;
         ECHO "error: your version of bjam is likely out of date" ;
- ECHO "error: please get a fresh version from CVS." ;
+ ECHO "error: please get a fresh version from SVN." ;
         EXIT ;
     }
     native = $(native[4-]) ;
@@ -54,7 +54,7 @@
     {
         ECHO "error: no builtin module .ENVIRON is found" ;
         ECHO "error: your version of bjam is likely out of date" ;
- ECHO "error: please get a fresh version from CVS." ;
+ ECHO "error: please get a fresh version from SVN." ;
         EXIT ;
     }
 }
@@ -68,12 +68,22 @@
     {
         ECHO "error: no @() functionality found" ;
         ECHO "error: your version of bjam is likely out of date" ;
- ECHO "error: please get a fresh version from CVS." ;
+ ECHO "error: please get a fresh version from SVN." ;
         EXIT ;
     }
 }
 
-
+# Make sure that \n escape is avaiable.
+if "\n" = "n"
+{
+ if $(OS) = CYGWIN
+ {
+ ECHO "warning: escape sequences are not supported" ;
+ ECHO "warning: this will cause major misbehaviour on cygwin" ;
+ ECHO "warning: your version of bjam is likely out of date" ;
+ ECHO "warning: please get a fresh version from SVN." ;
+ }
+}
 
 # Bootstrap the module system. Then bring the import rule into the global module.
 #

Modified: branches/release/tools/build/v2/kernel/errors.jam
==============================================================================
--- branches/release/tools/build/v2/kernel/errors.jam (original)
+++ branches/release/tools/build/v2/kernel/errors.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -13,8 +13,8 @@
     local drop-elements = $(frame-skips[$(skip-frames)]) ;
     if ! ( $(skip-frames) in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 )
     {
- ECHO warning: backtrace doesn't support skipping $(skip-frames) frames;
- using 1 instead. ;
+ ECHO "warning: backtrace doesn't support skipping $(skip-frames) frames;"
+ "using 1 instead." ;
         drop-elements = 5 ;
     }
 

Modified: branches/release/tools/build/v2/roll.sh
==============================================================================
--- branches/release/tools/build/v2/roll.sh (original)
+++ branches/release/tools/build/v2/roll.sh 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -33,6 +33,7 @@
 /home/ghost/Work/Boost/boost-svn/tools/jam/src/bin.linuxx86/bjam --v2 pdf
 cp `find bin -name "*.pdf"` ../..
 mv ../../standalone.pdf ../../userman.pdf
+cp ../../userman.pdf .
 rm -rf bin
 cd ..
 

Modified: branches/release/tools/build/v2/test/BoostBuild.py
==============================================================================
--- branches/release/tools/build/v2/test/BoostBuild.py (original)
+++ branches/release/tools/build/v2/test/BoostBuild.py 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -22,22 +22,28 @@
 import tree
 import types
 
+from xml.sax.saxutils import escape
+
 
 annotations = []
 
 
-def print_annotation(name, value):
+def print_annotation(name, value, xml):
     """Writes some named bits of information about test run.
     """
- print name + " {{{"
- print value
- print "}}}"
-
-
-def flush_annotations():
+ if xml:
+ print escape(name) + " {{{"
+ print escape(value)
+ print "}}}"
+ else:
+ print name + " {{{"
+ print value
+ print "}}}"
+
+def flush_annotations(xml=0):
     global annotations
     for ann in annotations:
- print_annotation(ann[0], ann[1])
+ print_annotation(ann[0], ann[1], xml)
     annotations = []
 
 
@@ -252,7 +258,7 @@
                     break
             else:
                 print "Cannot find built Boost.Jam"
- os.exit(1)
+ sys.exit(1)
 
         verbosity = ['-d0', '--quiet']
         if '--verbose' in sys.argv:

Modified: branches/release/tools/build/v2/test/generator_selection.py
==============================================================================
--- branches/release/tools/build/v2/test/generator_selection.py (original)
+++ branches/release/tools/build/v2/test/generator_selection.py 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -40,7 +40,7 @@
 type.register MY_TYPE : extension ;
 generators.register-standard mygen.generate-a-cpp-file : MY_TYPE : CPP ;
 rule generate-a-cpp-file { ECHO Generating a CPP file... ; }
-actions generate-a-cpp-file { echo void g() {} > "$(<)" }
+actions generate-a-cpp-file { echo "void g() {}" > "$(<)" }
 """)
 
     t.write("Other/jamfile.jam", """

Modified: branches/release/tools/build/v2/test/implicit_dependency.py
==============================================================================
--- branches/release/tools/build/v2/test/implicit_dependency.py (original)
+++ branches/release/tools/build/v2/test/implicit_dependency.py 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -45,4 +45,37 @@
 
 t.expect_addition("bin/$toolset/debug/hello.exe")
 
+t.rm("bin")
+
+t.write("jamroot.jam", """
+make dir/a.h : : gen-header ;
+explicit dir/a.h ;
+
+exe hello : hello.cpp : <implicit-dependency>dir/a.h ;
+
+import os ;
+if [ os.name ] = NT
+{
+ actions gen-header
+ {
+ echo int i; > $(<)
+ }
+}
+else
+{
+ actions gen-header
+ {
+ echo "int i;" > $(<)
+ }
+}
+""")
+
+t.write("hello.cpp", """
+#include "dir/a.h"
+int main() { return i; }
+""")
+t.run_build_system()
+
+t.expect_addition("bin/$toolset/debug/hello.exe")
+
 t.cleanup()

Modified: branches/release/tools/build/v2/test/relative_sources.py
==============================================================================
--- branches/release/tools/build/v2/test/relative_sources.py (original)
+++ branches/release/tools/build/v2/test/relative_sources.py 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -11,10 +11,28 @@
 
 t = BoostBuild.Tester()
 
-t.write("jamroot.jam", "import gcc ;")
-t.write("jamfile.jam", "exe a : src/a.cpp ;")
+# Test that relative path to source, 'src', is preserved.
+t.write("jamroot.jam", "exe a : src/a.cpp ;")
 t.write("src/a.cpp", "int main() {}\n")
 
 t.run_build_system()
+t.expect_addition("bin/$toolset/debug/src/a.obj")
+
+# Test that the relative path to source is preserved
+# when using 'glob'.
+t.rm("bin")
+t.write("jamroot.jam", "exe a : [ glob src/*.cpp ] ;")
+t.run_build_system()
+t.expect_addition("bin/$toolset/debug/src/a.obj")
+
+
+# Test that relative path with ".." is *not* added to
+# target path.
+t.rm(".")
+t.write("jamroot.jam", "")
+t.write("a.cpp", "int main() { return 0; }\n")
+t.write("build/Jamfile", "exe a : ../a.cpp ; ")
+t.run_build_system(subdir="build")
+t.expect_addition("build/bin/$toolset/debug/a.obj")
 
 t.cleanup()

Modified: branches/release/tools/build/v2/test/test_all.py
==============================================================================
--- branches/release/tools/build/v2/test/test_all.py (original)
+++ branches/release/tools/build/v2/test/test_all.py 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -11,7 +11,10 @@
 import string
 import BoostBuild
 
-
+xml = "--xml" in sys.argv
+toolset = BoostBuild.get_toolset()
+
+
 # Clear environment for testing.
 #
 for s in ('BOOST_ROOT', 'BOOST_BUILD_PATH', 'JAM_TOOLSET', 'BCCROOT', 'MSVCDir',
@@ -39,12 +42,15 @@
 
     pass_count = 0
     failures_count = 0
+
     for i in all_tests:
- print ("%-25s : " %(i)),
+ passed = 1
+ if not xml:
+ print ("%-25s : " %(i)),
         try:
             __import__(i)
         except SystemExit:
- print "FAILED"
+ passed = 0;
             if failures_count == 0:
                 f = open(os.path.join(invocation_dir, 'test_results.txt'), 'w')
                 f.write(i)
@@ -52,10 +58,29 @@
             failures_count = failures_count + 1
             # Restore the current directory, which might be changed by the test.
             os.chdir(invocation_dir)
- BoostBuild.flush_annotations();
- continue
- print "PASSED"
- BoostBuild.flush_annotations();
+
+ if not xml:
+ if passed:
+ print "PASSED"
+ else:
+ print "FAILED"
+ else:
+ rs = "succeed"
+ if not passed:
+ rs = "fail"
+ print """
+<test-log library="build" test-name="%s" test-type="run" toolset="%s" test-program="%s" target-directory="%s">
+<run result="%s">""" % (i, toolset, "tools/build/v2/test/" + i + ".py",
+ "boost/bin.v2/boost.build.tests/" + toolset + "/" + i, rs)
+
+ if not passed:
+ BoostBuild.flush_annotations(1)
+
+ print """
+</run>
+</test-log>
+"""
+
         pass_count = pass_count + 1
         sys.stdout.flush() # Makes testing under emacs more entertaining.
 
@@ -63,11 +88,12 @@
     if failures_count == 0:
         open('test_results.txt', 'w')
 
- print """
- === Test summary ===
- PASS: %d
- FAIL: %d
- """ % (pass_count, failures_count)
+ if not xml:
+ print """
+ === Test summary ===
+ PASS: %d
+ FAIL: %d
+ """ % (pass_count, failures_count)
 
 
 def last_failed_test():
@@ -109,6 +135,7 @@
           "conditionals3",
           "conditionals_multiple",
           "configuration",
+ "copy_time",
           "custom_generator",
           "default_build",
           "default_features",
@@ -201,7 +228,7 @@
     # Requires gettext tools.
     tests.append("example_gettext")
 
-else:
+elif not xml:
     print 'Note: skipping extra tests'
 
 run_tests(critical_tests, tests)

Modified: branches/release/tools/build/v2/tools/boostbook.jam
==============================================================================
--- branches/release/tools/build/v2/tools/boostbook.jam (original)
+++ branches/release/tools/build/v2/tools/boostbook.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -114,7 +114,7 @@
     if ! $(.boostbook-xsl-dir) || ! $(.boostbook-dtd-dir)
     {
         errors.warning
- couldn't find BoostBook xsl or dtd directories;
+ "couldn't find BoostBook xsl or dtd directories;"
         : please set \"BOOST_ROOT\" variable to the root directory of
         your boost installation. Searched in:
           : $(search-dirs:J="

Modified: branches/release/tools/build/v2/tools/builtin.jam
==============================================================================
--- branches/release/tools/build/v2/tools/builtin.jam (original)
+++ branches/release/tools/build/v2/tools/builtin.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -15,11 +15,13 @@
 import generators ;
 import numbers ;
 import os ;
+import path ;
 import print ;
 import project ;
 import property ;
 import regex ;
 import scanner ;
+import sequence ;
 import stage ;
 import symlink ;
 import toolset ;
@@ -35,10 +37,8 @@
 import generate ;
 
 
-.os-names = amiga aix bsd cygwin darwin dos emx freebsd hpux iphone linux netbsd
- openbsd osf qnx qnxnto sgi solaris sun sunos svr4 sysv ultrix unix unixware
- vms windows ;
-
+.os-names = aix bsd cygwin darwin freebsd hpux iphone linux netbsd
+ openbsd osf qnx qnxnto sgi solaris unix unixware windows ;
 
 # Feature used to determine which OS we're on. New <target-os> and <host-os>
 # features should be used instead.
@@ -70,6 +70,12 @@
             case MACOSX : host-os = darwin ;
             case KFREEBSD : host-os = freebsd ;
             case LINUX : host-os = linux ;
+ case SUNOS :
+ ECHO "SunOS is not a supported operating system." ;
+ ECHO "We believe last version of SunOS was released in 1992, " ;
+ ECHO "so if you get this message, something is very wrong with configuration logic. " ;
+ ECHO "Please report this as a bug. " ;
+ EXIT ;
             case * : host-os = unix ;
         }
     }
@@ -215,7 +221,7 @@
 
 # The addressing model to generate code for. Currently a limited set only
 # specifying the bit size of pointers.
-feature.feature address-model : 16 32 64 : propagated optional ;
+feature.feature address-model : 16 32 64 32_64 : propagated optional ;
 
 # Type of CPU architecture to compile for.
 feature.feature architecture :
@@ -437,7 +443,9 @@
     rule process ( target : matches * : binding )
     {
         local angle = [ regex.transform $(matches) : "<(.*)>" ] ;
+ angle = [ sequence.transform path.native : $(angle) ] ;
         local quoted = [ regex.transform $(matches) : "\"(.*)\"" ] ;
+ quoted = [ sequence.transform path.native : $(quoted) ] ;
 
         # CONSIDER: the new scoping rule seem to defeat "on target" variables.
         local g = [ on $(target) return $(HDRGRIST) ] ;

Modified: branches/release/tools/build/v2/tools/common.jam
==============================================================================
--- branches/release/tools/build/v2/tools/common.jam (original)
+++ branches/release/tools/build/v2/tools/common.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -466,9 +466,14 @@
 if [ os.name ] = NT
 {
     RM = del /f /q ;
- CP = copy ;
+ CP = copy /b ;
     IGNORE = "2>nul >nul & setlocal" ;
     LN ?= $(CP) ;
+ # Ugly hack to convince copy to set the timestamp of the
+ # destination to the current time by concatenating the
+ # source with a nonexistent file. Note that this requires
+ # /b (binary) as the default when concatenating files is /a (ascii).
+ WINDOWS-CP-HACK = "+ this-file-does-not-exist-A698EE7806899E69" ;
 }
 else
 {
@@ -490,6 +495,18 @@
 }
 
 
+if "\n" = "n"
+{
+ # Escape characters are not supported. Use ugly hacks that won't work,
+ # see below.
+ nl = "
+" ;
+}
+else
+{
+ nl = "\n" ;
+}
+
 # Returns the command needed to set an environment variable on the current
 # platform. The variable setting persists through all following commands and is
 # visible in the environment seen by subsequently executed commands. In other
@@ -498,43 +515,17 @@
 #
 rule variable-setting-command ( variable : value )
 {
- local nl = "
-" ;
-
     if [ os.name ] = NT
     {
         return "set $(variable)=$(value)$(nl)" ;
     }
     else
     {
- # (todo)
- # The following does not work on CYGWIN and needs to be fixed. On
- # CYGWIN the $(nl) variable holds a Windows new-line \r\n sequence that
- # messes up the executed export command which then reports that the
- # passed variable name is incorrect. This is most likely due to the
- # extra \r character getting interpreted as a part of the variable name.
- #
- # Several ideas pop to mind on how to fix this:
- # * One way would be to separate the commands using the ; shell
- # command separator. This seems like the quickest possible
- # solution but I do not know whether this would break code on any
- # platforms I I have no access to.
- # * Another would be to not use the terminating $(nl) but that would
- # require updating all the using code so it does not simply
- # prepend this variable to its own commands.
- # * I guess the cleanest solution would be to update Boost Jam to
- # allow explicitly specifying \n & \r characters in its scripts
- # instead of always relying only on the 'current OS native newline
- # sequence'.
- #
- # Some code found to depend on this behaviour:
- # * This Boost Build module.
- # * __test__ rule.
- # * path-variable-setting-command rule.
- # * python.jam toolset.
- # * xsltproc.jam toolset.
- # * fop.jam toolset.
- # (todo) (07.07.2008.) (Jurko)
+ # If we don't have escape characters support in bjam, the below blows
+ # up on CYGWIN, since the $(nl) variable holds a Windows new-line \r\n
+ # sequence that messes up the executed export command which then reports
+ # that the passed variable name is incorrect.
+ # But we have a check for cygwin in kernel/bootstrap.jam already.
         return "$(variable)=$(value)$(nl)export $(variable)$(nl)" ;
     }
 }
@@ -605,14 +596,7 @@
         $(<)-mkdir = true ;
 
         # Schedule the mkdir build action.
- if [ os.name ] = NT
- {
- MkDir1-quick-fix-for-windows $(<) ;
- }
- else
- {
- MkDir1-quick-fix-for-unix $(<) ;
- }
+ common.mkdir $(<) ;
 
         # Prepare a Jam 'dirs' target that can be used to make the build only
         # construct all the target directories.
@@ -647,27 +631,31 @@
 }
 
 
-actions MkDir1
-{
- mkdir "$(<)"
-}
+#actions MkDir1
+#{
+# mkdir "$(<)"
+#}
 
-
-# (todo)
 # The following quick-fix actions should be replaced using the original MkDir1
 # action once Boost Jam gets updated to correctly detect different paths leading
 # up to the same filesystem target and triggers their build action only once.
 # (todo) (04.07.2008.) (Jurko)
-actions MkDir1-quick-fix-for-unix
+
+if [ os.name ] = NT
 {
- mkdir -p "$(<)"
+ actions mkdir
+ {
+ if not exist "$(<)\\" mkdir "$(<)"
+ }
 }
-actions MkDir1-quick-fix-for-windows
+else
 {
- if not exist "$(<)\\" mkdir "$(<)"
+ actions mkdir
+ {
+ mkdir -p "$(<)"
+ }
 }
 
-
 actions piecemeal together existing Clean
 {
     $(RM) "$(>)"
@@ -681,7 +669,7 @@
 
 actions copy
 {
- $(CP) "$(>)" "$(<)"
+ $(CP) "$(>)" $(WINDOWS-CP-HACK) "$(<)"
 }
 
 

Modified: branches/release/tools/build/v2/tools/darwin.jam
==============================================================================
--- branches/release/tools/build/v2/tools/darwin.jam (original)
+++ branches/release/tools/build/v2/tools/darwin.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -22,8 +22,12 @@
 
 ## The MacOSX versions we can target.
 .macosx-versions =
- 10.5 10.4 10.3 10.2 10.1
- iphone-2.0 iphone-1.x iphonesim-2.0
+ 10.6 10.5 10.4 10.3 10.2 10.1
+ iphone-2.3 iphonesim-2.3
+ iphone-2.2 iphonesim-2.2
+ iphone-2.1 iphonesim-2.1
+ iphone-2.0 iphonesim-2.0
+ iphone-1.x
     ;
 
 ## The MacOSX version to compile for, which maps to the SDK to use (sysroot).
@@ -45,7 +49,7 @@
 
 feature.extend toolset : darwin ;
 import gcc ;
-toolset.inherit-generators darwin : gcc ;
+toolset.inherit-generators darwin : gcc : gcc.mingw.link gcc.mingw.link.dll ;
 
 generators.override darwin.prebuilt : builtin.prebuilt ;
 generators.override darwin.searched-lib-generator : searched-lib-generator ;
@@ -54,6 +58,8 @@
 generators.override darwin.compile.c.pch : pch.default-c-pch-generator ;
 generators.override darwin.compile.c++.pch : pch.default-cpp-pch-generator ;
 
+type.set-generated-target-suffix PCH : <toolset>darwin : gch ;
+
 toolset.inherit-rules darwin : gcc ;
 toolset.inherit-flags darwin : gcc
   : <runtime-link>static
@@ -258,6 +264,7 @@
 rule compile.m
 {
     LANG on $(<) = "-x objective-c" ;
+ gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
 }
 
 actions compile.m
@@ -265,9 +272,10 @@
     "$(CONFIG_COMMAND)" $(LANG) $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
 }
 
-rule compile.mm
+rule compile.mm ( targets * : sources * : properties * )
 {
     LANG on $(<) = "-x objective-c++" ;
+ gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
 }
 
 actions compile.mm
@@ -294,14 +302,17 @@
 
 arch-addr-flags darwin OPTIONS : combined : 32 : -arch i386 -arch ppc : default ;
 arch-addr-flags darwin OPTIONS : combined : 64 : -arch x86_64 -arch ppc64 ;
+arch-addr-flags darwin OPTIONS : combined : 32_64 : -arch i386 -arch ppc -arch x86_64 -arch ppc64 ;
 
 arch-addr-flags darwin OPTIONS : x86 : 32 : -arch i386 : default ;
 arch-addr-flags darwin OPTIONS : x86 : 64 : -arch x86_64 ;
+arch-addr-flags darwin OPTIONS : x86 : 32_64 : -arch i386 -arch x86_64 ;
 
 arch-addr-flags darwin OPTIONS : power : 32 : -arch ppc : default ;
 arch-addr-flags darwin OPTIONS : power : 64 : -arch ppc64 ;
+arch-addr-flags darwin OPTIONS : power : 32_64 : -arch ppc -arch ppc64 ;
 
-arch-addr-flags darwin OPTIONS : arm : 32 : -arch arm : default ;
+arch-addr-flags darwin OPTIONS : arm : 32 : -arch armv6 : default ;
 
 # Set the max header padding to allow renaming of libs for installation.
 flags darwin.link.dll OPTIONS : -headerpad_max_install_names ;

Modified: branches/release/tools/build/v2/tools/gcc.jam
==============================================================================
--- branches/release/tools/build/v2/tools/gcc.jam (original)
+++ branches/release/tools/build/v2/tools/gcc.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -34,6 +34,7 @@
 
 
 feature.extend toolset : gcc ;
+# feature.subfeature toolset gcc : flavor : : optional ;
 
 toolset.inherit-generators gcc : unix : unix.link unix.link.dll ;
 toolset.inherit-flags gcc : unix ;
@@ -130,11 +131,13 @@
         condition = [ common.check-init-parameters gcc
             : version $(version)
             ] ;
+ condition = $(condition) ; #/<toolset-gcc:flavor> ;
     }
 
     common.handle-options gcc : $(condition) : $(command) : $(options) ;
 
     local linker = [ feature.get-values <linker-type> : $(options) ] ;
+ # The logic below should actually be keyed on <target-os>
     if ! $(linker)
     {
         if [ os.name ] = OSF
@@ -149,6 +152,10 @@
         {
             linker = aix ;
         }
+ else if [ os.name ] = SOLARIS
+ {
+ linker = sun ;
+ }
         else
         {
             linker = gnu ;
@@ -360,22 +367,24 @@
 
 rule compile.c++.pch ( targets * : sources * : properties * )
 {
+ setup-threading $(targets) : $(sources) : $(properties) ;
     setup-fpic $(targets) : $(sources) : $(properties) ;
 }
 
 actions compile.c++.pch
 {
- "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+ "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
 }
 
 rule compile.c.pch ( targets * : sources * : properties * )
 {
+ setup-threading $(targets) : $(sources) : $(properties) ;
     setup-fpic $(targets) : $(sources) : $(properties) ;
 }
 
 actions compile.c.pch
 {
- "$(CONFIG_COMMAND)" -x c-header $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+ "$(CONFIG_COMMAND)" -x c-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
 }
 
 rule compile.c++ ( targets * : sources * : properties * )
@@ -500,34 +509,38 @@
     }
 }
 
-.IMPLIB-COMMAND = ;
-if [ os.on-windows ]
-{
- .IMPLIB-COMMAND = "-Wl,--out-implib," ;
- generators.register
- [ new gcc-linking-generator gcc.link
- : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
- : EXE
- : <toolset>gcc ] ;
- generators.register
- [ new gcc-linking-generator gcc.link.dll
- : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
- : IMPORT_LIB SHARED_LIB
- : <toolset>gcc ] ;
-}
-else
-{
- generators.register
- [ new gcc-linking-generator gcc.link
- : LIB OBJ
- : EXE
- : <toolset>gcc ] ;
- generators.register
- [ new gcc-linking-generator gcc.link.dll
- : LIB OBJ
- : SHARED_LIB
- : <toolset>gcc ] ;
-}
+# The set of permissible input types is different on mingw.
+# So, define two sets of generators, with mingw generators
+# selected when target-os=windows.
+
+local g ;
+g = [ new gcc-linking-generator gcc.mingw.link
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : EXE
+ : <toolset>gcc <target-os>windows ] ;
+$(g).set-rule-name gcc.link ;
+generators.register $(g) ;
+
+g = [ new gcc-linking-generator gcc.mingw.link.dll
+ : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB
+ : IMPORT_LIB SHARED_LIB
+ : <toolset>gcc <target-os>windows ] ;
+$(g).set-rule-name gcc.link.dll ;
+generators.register $(g) ;
+
+generators.register
+ [ new gcc-linking-generator gcc.link
+ : LIB OBJ
+ : EXE
+ : <toolset>gcc ] ;
+generators.register
+ [ new gcc-linking-generator gcc.link.dll
+ : LIB OBJ
+ : SHARED_LIB
+ : <toolset>gcc ] ;
+
+generators.override gcc.mingw.link : gcc.link ;
+generators.override gcc.mingw.link.dll : gcc.link.dll ;
 
 # Declare flags for linking.
 # First, the common flags.
@@ -539,6 +552,8 @@
 toolset.flags gcc.link FINDLIBS-SA <find-shared-library> ;
 toolset.flags gcc.link LIBRARIES <library-file> ;
 
+toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>windows : "-Wl,--out-implib," ;
+
 # For <runtime-link>static we made sure there are no dynamic libraries in the
 # link. On HP-UX not all system libraries exist as archived libraries (for
 # example, there is no libunwind.a), so, on this platform, the -static option
@@ -800,7 +815,7 @@
             {
                 option = -mthreads ;
             }
- case sunos :
+ case solaris :
             {
                 option = -pthreads ;
                 libs = rt ;

Modified: branches/release/tools/build/v2/tools/intel-darwin.jam
==============================================================================
--- branches/release/tools/build/v2/tools/intel-darwin.jam (original)
+++ branches/release/tools/build/v2/tools/intel-darwin.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -17,7 +17,7 @@
 feature.extend-subfeature toolset intel : platform : darwin ;
 
 toolset.inherit-generators intel-darwin
- <toolset>intel <toolset-intel:platform>darwin : gcc ;
+ <toolset>intel <toolset-intel:platform>darwin : gcc : gcc.mingw.link gcc.mingw.link.dll ;
 
 generators.override intel-darwin.prebuilt : builtin.lib-generator ;
 generators.override intel-darwin.prebuilt : builtin.prebuilt ;
@@ -68,7 +68,11 @@
     
         if $(root)
         {
- local lib_path = $(root)/lib ;
+ # Libraries required to run the executable may be in either
+ # $(root)/lib (10.1 and earlier)
+ # or
+ # $(root)/lib/architecture-name (11.0 and later:
+ local lib_path = $(root)/lib $(root:P)/lib/$(bin:B) ;
             if $(.debug-configuration)
             {
                 ECHO notice: using intel libraries :: $(condition) :: $(lib_path) ;

Modified: branches/release/tools/build/v2/tools/intel-linux.jam
==============================================================================
--- branches/release/tools/build/v2/tools/intel-linux.jam (original)
+++ branches/release/tools/build/v2/tools/intel-linux.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -17,7 +17,7 @@
 feature.extend-subfeature toolset intel : platform : linux ;
 
 toolset.inherit-generators intel-linux
- <toolset>intel <toolset-intel:platform>linux : gcc ;
+ <toolset>intel <toolset-intel:platform>linux : gcc : gcc.mingw.link gcc.mingw.link.dll ;
 generators.override intel-linux.prebuilt : builtin.lib-generator ;
 generators.override intel-linux.prebuilt : builtin.prebuilt ;
 generators.override intel-linux.searched-lib-generator : searched-lib-generator ;
@@ -58,7 +58,11 @@
     
         if $(root)
         {
- local lib_path = $(root)/lib ;
+ # Libraries required to run the executable may be in either
+ # $(root)/lib (10.1 and earlier)
+ # or
+ # $(root)/lib/architecture-name (11.0 and later:
+ local lib_path = $(root)/lib $(root:P)/lib/$(bin:B) ;
             if $(.debug-configuration)
             {
                 ECHO notice: using intel libraries :: $(condition) :: $(lib_path) ;
@@ -81,6 +85,7 @@
 
 rule compile.c++ ( targets * : sources * : properties * )
 {
+ gcc.setup-threading $(targets) : $(sources) : $(properties) ;
     gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
 }
 
@@ -89,8 +94,9 @@
     "$(CONFIG_COMMAND)" -c -xc++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
 }
 
-rule compile.c++ ( targets * : sources * : properties * )
+rule compile.c ( targets * : sources * : properties * )
 {
+ gcc.setup-threading $(targets) : $(sources) : $(properties) ;
     gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
 }
 
@@ -99,11 +105,25 @@
     "$(CONFIG_COMMAND)" -c -xc $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
 }
 
+rule link ( targets * : sources * : properties * )
+{
+ gcc.setup-threading $(targets) : $(sources) : $(properties) ;
+ SPACE on $(targets) = " " ;
+ JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
+}
+
 actions link bind LIBRARIES
 {
     "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
 }
 
+rule link.dll ( targets * : sources * : properties * )
+{
+ gcc.setup-threading $(targets) : $(sources) : $(properties) ;
+ SPACE on $(targets) = " " ;
+ JAM_SEMAPHORE on $(targets) = <s>gcc-link-semaphore ;
+}
+
 # Differ from 'link' above only by -shared.
 actions link.dll bind LIBRARIES
 {

Modified: branches/release/tools/build/v2/tools/intel-win.jam
==============================================================================
--- branches/release/tools/build/v2/tools/intel-win.jam (original)
+++ branches/release/tools/build/v2/tools/intel-win.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -12,14 +12,22 @@
 import msvc ;
 import os ;
 import toolset ;
-
+import generators ;
+import type ;
 
 feature.extend-subfeature toolset intel : platform : win ;
 
 toolset.inherit-generators intel-win <toolset>intel <toolset-intel:platform>win : msvc ;
-toolset.inherit-flags intel-win : msvc ;
+toolset.inherit-flags intel-win : msvc : : YLOPTION ;
 toolset.inherit-rules intel-win : msvc ;
 
+# Override default do-nothing generators.
+generators.override intel-win.compile.c.pch : pch.default-c-pch-generator ;
+generators.override intel-win.compile.c++.pch : pch.default-cpp-pch-generator ;
+generators.override intel-win.compile.rc : rc.compile.resource ;
+
+toolset.flags intel-win.compile PCH_SOURCE <pch>on : <pch-source> ;
+
 toolset.add-requirements <toolset>intel-win,<runtime-link>shared:<threading>multi ;
 
 # Initializes the intel toolset for windows
@@ -48,7 +56,11 @@
     }
 
     local setup ;
- setup = $(root)/iclvars.bat ;
+ setup = [ GLOB $(root) : iclvars_*.bat ] ;
+ if ! $(setup)
+ {
+ setup = $(root)/iclvars.bat ;
+ }
     setup = "call \""$(setup)"\" > nul " ;
 
     if [ os.name ] = NT
@@ -138,6 +150,11 @@
     }
 
     toolset.flags intel-win CFLAGS $(condition) : $(C++FLAGS) ;
+ # By default, when creating PCH, intel adds 'i' to the explicitly
+ # specified name of the PCH file. Of course, Boost.Build is not
+ # happy when compiler produces not the file it was asked for.
+ # The option below stops this behaviour.
+ toolset.flags intel-win CFLAGS : -Qpchi- ;
 
     if ! $(compatibility)
     {
@@ -159,3 +176,6 @@
 }
 
 toolset.flags intel-win.link LIBRARY_OPTION <toolset>intel : "" ;
+
+toolset.flags intel-win YLOPTION ;
+

Modified: branches/release/tools/build/v2/tools/msvc.jam
==============================================================================
--- branches/release/tools/build/v2/tools/msvc.jam (original)
+++ branches/release/tools/build/v2/tools/msvc.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -37,6 +37,9 @@
 import type ;
 
 
+type.register MANIFEST : manifest ;
+feature.feature embed-manifest : on off : incidental propagated ;
+
 ################################################################################
 #
 # Public rules.
@@ -329,42 +332,40 @@
     }
 }
 
+toolset.flags msvc YLOPTION : "-Yl" ;
 
 # Action for running the C/C++ compiler without using precompiled headers.
 #
+# WARNING: Synchronize any changes this in action with intel-win
 actions compile-c-c++
 {
     $(.CC) @"@($(<[1]:W).rsp:E="$(>[1]:W)" -Fo"$(<[1]:W)" -Yu"$(>[3]:D=)" -Fp"$(>[2]:W)" $(CC_RSPLINE))" $(.CC.FILTER)
 }
 
-
 rule compile-c-c++ ( targets + : sources * )
 {
     DEPENDS $(<[1]) : [ on $(<[1]) return $(PCH_HEADER) ] ;
     DEPENDS $(<[1]) : [ on $(<[1]) return $(PCH_FILE) ] ;
 }
 
-
 # Action for running the C/C++ compiler using precompiled headers. In addition
 # to whatever else it needs to compile, this action also adds a temporary source
 # .cpp file used to compile the precompiled headers themselves.
 #
 # The global .escaped-double-quote variable is used to avoid messing up Emacs
 # syntax highlighting in the messy N-quoted code below.
-#
 actions compile-c-c++-pch
 {
- $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" -Yl"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" "@($(<[1]:W).cpp:E=#include $(.escaped-double-quote)$(>[1]:D=)$(.escaped-double-quote))" $(.CC.FILTER)
+ $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" $(YLOPTION)"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" "@($(<[1]:W).cpp:E=#include $(.escaped-double-quote)$(>[1]:D=)$(.escaped-double-quote))" $(.CC.FILTER)
 }
 
 
 # Action for running the C/C++ compiler using precompiled headers. An already
 # built source file for compiling the precompiled headers is expected to be
 # given as one of the source parameters.
-#
 actions compile-c-c++-pch-s
 {
- $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" -Yl"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" $(.CC.FILTER)
+ $(.CC) @"@($(<[1]:W).rsp:E="$(>[2]:W)" -Fo"$(<[2]:W)" -Yc"$(>[1]:D=)" $(YLOPTION)"__bjam_pch_symbol_$(>[1]:D=)" -Fp"$(<[1]:W)" $(CC_RSPLINE))" $(.CC.FILTER)
 }
 
 
@@ -414,12 +415,23 @@
 }
 
 
+rule link ( targets + : sources * : properties * )
+{
+ if <embed-manifest>on in $(properties)
+ {
+ msvc.manifest $(targets) : $(sources) : $(properties) ;
+ }
+}
+
 rule link.dll ( targets + : sources * : properties * )
 {
     DEPENDS $(<) : [ on $(<) return $(DEF_FILE) ] ;
+ if <embed-manifest>on in $(properties)
+ {
+ msvc.manifest.dll $(targets) : $(sources) : $(properties) ;
+ }
 }
 
-
 # Incremental linking a DLL causes no end of problems: if the actual exports do
 # not change, the import .lib file is never updated. Therefore, the .lib is
 # always out-of-date and gets rebuilt every time. I am not sure that incremental
@@ -436,37 +448,53 @@
     {
         $(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" /LIBPATH:"$(LINKPATH:W)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)$(LIBRARIES) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
         if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
+ }
+
+ actions manifest
+ {
         if exist "$(<[1]).manifest" (
             $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);1"
         )
     }
-
+
     actions link.dll bind DEF_FILE LIBRARIES_MENTIONED_BY_FILE
     {
         $(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:"$(DEF_FILE)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)$(LIBRARIES) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
         if %ERRORLEVEL% NEQ 0 EXIT %ERRORLEVEL%
+ }
+
+ actions manifest.dll
+ {
         if exist "$(<[1]).manifest" (
             $(.MT) -manifest "$(<[1]).manifest" "-outputresource:$(<[1]);2"
         )
- }
+ }
 }
 else
-{
+{
     actions link bind DEF_FILE LIBRARIES_MENTIONED_BY_FILE
     {
         $(.LD) $(LINKFLAGS) /out:"$(<[1]:W)" /LIBPATH:"$(LINKPATH:W)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)$(LIBRARIES) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
+ }
+
+ actions manifest
+ {
         if test -e "$(<[1]).manifest"; then
             $(.MT) -manifest "$(<[1]:W).manifest" "-outputresource:$(<[1]:W);1"
         fi
     }
-
+
     actions link.dll bind DEF_FILE LIBRARIES_MENTIONED_BY_FILE
     {
         $(.LD) /DLL $(LINKFLAGS) /out:"$(<[1]:W)" /IMPLIB:"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W)" /def:"$(DEF_FILE)" $(OPTIONS) @"@($(<[1]:W).rsp:E=$(.nl)"$(>)" $(.nl)$(LIBRARIES_MENTIONED_BY_FILE) $(.nl)$(LIBRARIES) $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_ST).lib" $(.nl)"$(LIBRARY_OPTION)$(FINDLIBS_SA).lib")"
+ }
+
+ actions manifest.dll
+ {
         if test -e "$(<[1]).manifest"; then
- $(.MT) -manifest "$(<[1]:W).manifest" "-outputresource:$(<[1]:W);2"
+ $(.MT) -manifest "$(<[1]:W).manifest" "-outputresource:$(<[1]:W);2"
         fi
- }
+ }
 }
 
 
@@ -860,14 +888,7 @@
             toolset.flags msvc.compile .IDL $(cpu-conditions) : $(setup-$(c))$(idl-compiler) ;
             toolset.flags msvc.compile .MC $(cpu-conditions) : $(setup-$(c))$(mc-compiler) ;
 
- if ! [ os.name ] in NT
- {
- toolset.flags msvc.link .MT $(cpu-conditions) : $(setup-$(c))$(manifest-tool) -nologo ;
- }
- else
- {
- toolset.flags msvc.link .MT $(cpu-conditions) : $(manifest-tool) -nologo ;
- }
+ toolset.flags msvc.link .MT $(cpu-conditions) : $(setup-$(c))$(manifest-tool) -nologo ;
 
             if $(cc-filter)
             {
@@ -943,13 +964,39 @@
 }
 
 
-local rule get-rspline ( target : lang-opt )
+rule get-rspline ( target : lang-opt )
 {
     CC_RSPLINE on $(target) = [ on $(target) return $(lang-opt) -U$(UNDEFS)
         $(CFLAGS) $(C++FLAGS) $(OPTIONS) -c $(.nl)-D$(DEFINES)
         $(.nl)\"-I$(INCLUDES:W)\" ] ;
 }
 
+class msvc-linking-generator : linking-generator
+{
+ # Calls the base version. If necessary, also create a target for the
+ # manifest file.specifying source's name as the name of the created
+ # target. As result, the PCH will be named whatever.hpp.gch, and not
+ # whatever.gch.
+ rule generated-targets ( sources + : property-set : project name ? )
+ {
+ local result = [ linking-generator.generated-targets $(sources)
+ : $(property-set) : $(project) $(name) ] ;
+ if [ $(property-set).get <embed-manifest> ] = "off"
+ {
+ if ! $(name)
+ {
+ name = [ determine-output-name $(sources) ] ;
+ }
+
+ local action = [ $(result[0]).action ] ;
+ result += [ virtual-target.register
+ [ class.new file-target $(name) : MANIFEST : $(project) : $(action) ] ] ;
+ }
+ return $(result) ;
+ }
+}
+
+
 
 # Unsafe worker rule for the register-toolset() rule. Must not be called
 # multiple times.
@@ -982,8 +1029,10 @@
         # TODO: Is it possible to combine these? Make the generators
         # non-composing so that they do not convert each source into a separate
         # .rsp file.
- generators.register-linker msvc.link : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : EXE : <toolset>msvc ;
- generators.register-linker msvc.link.dll : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB : <toolset>msvc ;
+ generators.register [ new msvc-linking-generator
+ msvc.link : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : EXE : <toolset>msvc ] ;
+ generators.register [ new msvc-linking-generator
+ msvc.link.dll : OBJ SEARCHED_LIB STATIC_LIB IMPORT_LIB : SHARED_LIB IMPORT_LIB : <toolset>msvc ] ;
 
         generators.register-archiver msvc.archive : OBJ : STATIC_LIB : <toolset>msvc ;
         generators.register-c-compiler msvc.compile.c++ : CPP : OBJ : <toolset>msvc ;

Modified: branches/release/tools/build/v2/tools/python.jam
==============================================================================
--- branches/release/tools/build/v2/tools/python.jam (original)
+++ branches/release/tools/build/v2/tools/python.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -874,7 +874,7 @@
         }
         else
         {
- debug-message no framework directory found; using library path ;
+ debug-message "no framework directory found; using library path" ;
             framework-directory = ;
         }
     }

Modified: branches/release/tools/build/v2/tools/qcc.jam
==============================================================================
--- branches/release/tools/build/v2/tools/qcc.jam (original)
+++ branches/release/tools/build/v2/tools/qcc.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -96,7 +96,7 @@
     local template-depth = [ on $(1) return $(TEMPLATE_DEPTH) ] ;
     if ! $(template-depth)
     {
- TEMPLATE_DEPTH on $(1) = 100 ;
+ TEMPLATE_DEPTH on $(1) = 128 ;
     }
 }
 

Modified: branches/release/tools/build/v2/tools/stage.jam
==============================================================================
--- branches/release/tools/build/v2/tools/stage.jam (original)
+++ branches/release/tools/build/v2/tools/stage.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -77,7 +77,7 @@
             # Unless <hardcode-dll-paths>true is in properties, which can happen
             # only if the user has explicitly requested it, nuke all <dll-path>
             # properties.
- if [ $(property-set).get <hardcode-dll-paths> ] != true
+ if [ $(build-property-set).get <hardcode-dll-paths> ] != true
             {
                 ps-raw = [ property.change $(ps-raw) : <dll-path> ] ;
             }

Modified: branches/release/tools/build/v2/tools/sun.jam
==============================================================================
--- branches/release/tools/build/v2/tools/sun.jam (original)
+++ branches/release/tools/build/v2/tools/sun.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -15,6 +15,7 @@
 feature.extend toolset : sun ;
 toolset.inherit sun : unix ;
 generators.override sun.prebuilt : builtin.lib-generator ;
+generators.override sun.prebuilt : builtin.prebuilt ;
 generators.override sun.searched-lib-generator : searched-lib-generator ;
 
 feature.extend stdlib : sun-stlport ;

Modified: branches/release/tools/build/v2/tools/testing.jam
==============================================================================
--- branches/release/tools/build/v2/tools/testing.jam (original)
+++ branches/release/tools/build/v2/tools/testing.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -62,6 +62,7 @@
 feature.feature testing.arg : : free incidental ;
 feature.feature testing.input-file : : free dependency ;
 
+feature.feature preserve-test-targets : off on : incidental propagated ;
 
 # Register target types.
 type.register TEST : test ;
@@ -393,11 +394,6 @@
 
 
 local argv = [ modules.peek : ARGV ] ;
-if --preserve-test-targets in $(argv)
-{
- preserve-test-targets = true ;
-}
-
 
 toolset.flags testing.capture-output ARGS <testing.arg> ;
 toolset.flags testing.capture-output INPUT_FILES <testing.input-file> ;
@@ -440,7 +436,7 @@
 
     run-path-setup $(target) : $(source) : $(properties) ;
 
- if ! $(preserve-test-targets)
+ if [ feature.get-values preserve-test-targets : $(properties) ] = off
     {
         TEMPORARY $(targets-to-remove) ;
         # Set a second action on target that will be executed after capture

Modified: branches/release/tools/build/v2/util/option.jam
==============================================================================
--- branches/release/tools/build/v2/util/option.jam (original)
+++ branches/release/tools/build/v2/util/option.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -6,6 +6,12 @@
 
 import modules ;
 
+# Set a value for a named option, to be used when not overridden on the command
+# line.
+rule set ( name : value )
+{
+ .option.$(name) = $(value) ;
+}
 
 rule get ( name : default-value ? )
 {
@@ -14,6 +20,10 @@
     {
         return $(m[1]) ;
     }
+ else if $(.option.$(name))
+ {
+ return $(.option.$(name)) ;
+ }
     else
     {
         return $(default-value) ;

Modified: branches/release/tools/build/v2/util/path.jam
==============================================================================
--- branches/release/tools/build/v2/util/path.jam (original)
+++ branches/release/tools/build/v2/util/path.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -372,8 +372,9 @@
 # Assuming 'child' is a subdirectory of 'parent', return the relative path from
 # 'parent' to 'child'.
 #
-rule relative ( child parent )
+rule relative ( child parent : no-error ? )
 {
+ local not-a-child ;
     if $(parent) = "."
     {
         return $(child) ;
@@ -392,12 +393,27 @@
             }
             else
             {
- errors.error $(child) is not a subdir of $(parent) ;
+ not-a-child = true ;
+ split1 = ;
             }
         }
         if $(split2)
         {
- return [ join $(split2) ] ;
+ if $(not-a-child)
+ {
+ if $(no-error)
+ {
+ return not-a-child ;
+ }
+ else
+ {
+ errors.error $(child) is not a subdir of $(parent) ;
+ }
+ }
+ else
+ {
+ return [ join $(split2) ] ;
+ }
         }
         else
         {

Modified: branches/release/tools/build/v2/util/print.jam
==============================================================================
--- branches/release/tools/build/v2/util/print.jam (original)
+++ branches/release/tools/build/v2/util/print.jam 2009-01-14 09:31:12 EST (Wed, 14 Jan 2009)
@@ -285,11 +285,11 @@
         indent = "" ;
         for local c in $(indent-chars)
         {
- if $(c) = " " { c = &nbsp; ; }
- else if $(c) = " " { c = &nbsp;&nbsp;&nbsp;&nbsp; ; }
+ if $(c) = " " { c = "&nbsp;" ; }
+ else if $(c) = " " { c = "&nbsp;&nbsp;&nbsp;&nbsp;" ; }
             indent = $(indent)$(c) ;
         }
- local html-text = [ escape-html $(text) : &nbsp; ] ;
+ local html-text = [ escape-html $(text) : "&nbsp;" ] ;
         text $(html-text[1])<br> $(indent)$(html-text[2-])<br> ;
     }
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk