Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52376 - in branches/release/tools/build/v2: . build doc/src example/built_tool example/built_tool/core example/built_tool/tblgen example/generate test tools tools/types
From: ghost_at_[hidden]
Date: 2009-04-14 03:59:33


Author: vladimir_prus
Date: 2009-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
New Revision: 52376
URL: http://svn.boost.org/trac/boost/changeset/52376

Log:
Merge from trunk
Added:
   branches/release/tools/build/v2/example/built_tool/
      - copied from r52375, /trunk/tools/build/v2/example/built_tool/
   branches/release/tools/build/v2/example/built_tool/Jamroot.jam
      - copied unchanged from r52375, /trunk/tools/build/v2/example/built_tool/Jamroot.jam
   branches/release/tools/build/v2/example/built_tool/core/
      - copied from r52375, /trunk/tools/build/v2/example/built_tool/core/
   branches/release/tools/build/v2/example/built_tool/core/Jamfile.jam
      - copied unchanged from r52375, /trunk/tools/build/v2/example/built_tool/core/Jamfile.jam
   branches/release/tools/build/v2/example/built_tool/core/a.td
      - copied unchanged from r52375, /trunk/tools/build/v2/example/built_tool/core/a.td
   branches/release/tools/build/v2/example/built_tool/core/core.cpp
      - copied unchanged from r52375, /trunk/tools/build/v2/example/built_tool/core/core.cpp
   branches/release/tools/build/v2/example/built_tool/readme.txt
      - copied unchanged from r52375, /trunk/tools/build/v2/example/built_tool/readme.txt
   branches/release/tools/build/v2/example/built_tool/tblgen/
      - copied from r52375, /trunk/tools/build/v2/example/built_tool/tblgen/
   branches/release/tools/build/v2/example/built_tool/tblgen/Jamfile.jam
      - copied unchanged from r52375, /trunk/tools/build/v2/example/built_tool/tblgen/Jamfile.jam
   branches/release/tools/build/v2/example/built_tool/tblgen/tblgen.cpp
      - copied unchanged from r52375, /trunk/tools/build/v2/example/built_tool/tblgen/tblgen.cpp
Text files modified:
   branches/release/tools/build/v2/build-system.jam | 18 +++++
   branches/release/tools/build/v2/build/feature.jam | 4
   branches/release/tools/build/v2/build/project.jam | 14 +++
   branches/release/tools/build/v2/build/targets.jam | 143 +++++++++++++++++++++++----------------
   branches/release/tools/build/v2/build/type.jam | 2
   branches/release/tools/build/v2/build/virtual-target.jam | 9 ++
   branches/release/tools/build/v2/doc/src/tasks.xml | 10 +-
   branches/release/tools/build/v2/example/generate/jamroot.jam | 34 ++++-----
   branches/release/tools/build/v2/test/generator_selection.py | 10 ++
   branches/release/tools/build/v2/test/test_all.py | 20 ++--
   branches/release/tools/build/v2/tools/acc.jam | 3
   branches/release/tools/build/v2/tools/boostbook.jam | 1
   branches/release/tools/build/v2/tools/common.jam | 17 ++++
   branches/release/tools/build/v2/tools/darwin.jam | 10 +
   branches/release/tools/build/v2/tools/docutils.jam | 10 +
   branches/release/tools/build/v2/tools/intel-darwin.jam | 7 +
   branches/release/tools/build/v2/tools/intel-linux.jam | 72 +++++++++++++++++--
   branches/release/tools/build/v2/tools/msvc.jam | 20 +++-
   branches/release/tools/build/v2/tools/pathscale.jam | 2
   branches/release/tools/build/v2/tools/stlport.jam | 9 ++
   branches/release/tools/build/v2/tools/sun.jam | 2
   branches/release/tools/build/v2/tools/testing.jam | 2
   branches/release/tools/build/v2/tools/types/exe.jam | 2
   branches/release/tools/build/v2/tools/types/lib.jam | 1
   branches/release/tools/build/v2/tools/vacpp.jam | 23 ++++-
   25 files changed, 314 insertions(+), 131 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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -388,6 +388,24 @@
             ECHO "notice: User configuration file loading explicitly disabled." ;
         }
     }
+
+ # We look for project-config.jam from "." upward.
+ # I am not sure this is 100% right decision, we might as well check for
+ # it only alonside the Jamroot file. However:
+ #
+ # - We need to load project-root.jam before Jamroot
+ # - We probably would need to load project-root.jam even if there's no
+ # Jamroot - e.g. to implement automake-style out-of-tree builds.
+ local file = [ path.glob "." : project-config.jam ] ;
+ if ! $(file)
+ {
+ file = [ path.glob-in-parents "." : project-config.jam ] ;
+ }
+ if $(file)
+ {
+ initialize-config-module project-config ;
+ load-config project-config : project-config.jam : $(file:D) ;
+ }
 }
 
 

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -469,7 +469,9 @@
 
         if $($(feature).subfeatures)
         {
- values = [ regex.split $(value-string) - ] ;
+ if ! ( $(value-string) in $($(feature).subfeatures) ) {
+ values = [ regex.split $(value-string) - ] ;
+ }
         }
 
         if ! ( $(values[1]) in $($(feature).values) ) &&

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -439,6 +439,10 @@
     {
         parent-module = site-config ;
     }
+ else if $(module-name) = project-config
+ {
+ parent-module = user-config ;
+ }
     else
     {
         # We search for parent/project-root only if Jamfile was specified, i.e.
@@ -453,7 +457,15 @@
             # inherit from user-config.
             if $(location)
             {
- parent-module = user-config ;
+ # If project-config module exist, inherit from it.
+ if $(project-config.attributes)
+ {
+ parent-module = project-config ;
+ }
+ else
+ {
+ parent-module = user-config ;
+ }
                 jamroot = true ;
             }
         }

Modified: branches/release/tools/build/v2/build/targets.jam
==============================================================================
--- branches/release/tools/build/v2/build/targets.jam (original)
+++ branches/release/tools/build/v2/build/targets.jam 2009-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -78,6 +78,7 @@
 import sequence ;
 import set ;
 import toolset ;
+import build-request ;
 
 
 # Base class for all abstract targets.
@@ -557,7 +558,6 @@
 class main-target : abstract-target
 {
     import assert ;
- import build-request ;
     import errors ;
     import feature ;
     import print ;
@@ -657,65 +657,8 @@
 
     rule apply-default-build ( property-set )
     {
- # 1. First, see what properties from default-build are already present
- # in property-set.
-
- local raw = [ $(property-set).raw ] ;
- local specified-features = $(raw:G) ;
-
- local defaults-to-apply ;
- for local d in [ $(self.default-build).raw ]
- {
- if ! $(d:G) in $(specified-features)
- {
- defaults-to-apply += $(d) ;
- }
- }
-
- # 2. If there are any defaults to be applied, form a new build request.
- # Pass it through to 'expand-no-defaults' since default-build might
- # contain "release debug" resulting in two property-sets.
- local result ;
- if $(defaults-to-apply)
- {
- properties = [
- build-request.expand-no-defaults
-
- # We have to compress subproperties here to prevent property
- # lists like:
- #
- # <toolset>msvc <toolset-msvc:version>7.1 <threading>multi
- #
- # from being expanded into:
- #
- # <toolset-msvc:version>7.1/<threading>multi
- # <toolset>msvc/<toolset-msvc:version>7.1/<threading>multi
- #
- # due to a cross-product property combination. That may be an
- # indication that build-request.expand-no-defaults is the wrong
- # rule to use here.
- [ feature.compress-subproperties $(raw) ]
- $(defaults-to-apply)
- ] ;
-
- if $(properties)
- {
- for local p in $(properties)
- {
- result += [ property-set.create
- [ feature.expand [ feature.split $(p) ] ] ] ;
- }
- }
- else
- {
- result = [ property-set.empty ] ;
- }
- }
- else
- {
- result = $(property-set) ;
- }
- return $(result) ;
+ return [ targets.apply-default-build $(property-set)
+ : $(self.default-build) ] ;
     }
 
     # Select an alternative for this main target, by finding all alternatives
@@ -883,6 +826,69 @@
     return [ $(target).generate $(rproperties) ] ;
 }
 
+rule apply-default-build ( property-set : default-build )
+{
+ # 1. First, see what properties from default-build are already present
+ # in property-set.
+
+ local raw = [ $(property-set).raw ] ;
+ local specified-features = $(raw:G) ;
+
+ local defaults-to-apply ;
+ for local d in [ $(default-build).raw ]
+ {
+ if ! $(d:G) in $(specified-features)
+ {
+ defaults-to-apply += $(d) ;
+ }
+ }
+
+ # 2. If there are any defaults to be applied, form a new build request.
+ # Pass it through to 'expand-no-defaults' since default-build might
+ # contain "release debug" resulting in two property-sets.
+ local result ;
+ if $(defaults-to-apply)
+ {
+ properties = [
+ build-request.expand-no-defaults
+
+ # We have to compress subproperties here to prevent property
+ # lists like:
+ #
+ # <toolset>msvc <toolset-msvc:version>7.1 <threading>multi
+ #
+ # from being expanded into:
+ #
+ # <toolset-msvc:version>7.1/<threading>multi
+ # <toolset>msvc/<toolset-msvc:version>7.1/<threading>multi
+ #
+ # due to a cross-product property combination. That may be an
+ # indication that build-request.expand-no-defaults is the wrong
+ # rule to use here.
+ [ feature.compress-subproperties $(raw) ]
+ $(defaults-to-apply)
+ ] ;
+
+ if $(properties)
+ {
+ for local p in $(properties)
+ {
+ result += [ property-set.create
+ [ feature.expand [ feature.split $(p) ] ] ] ;
+ }
+ }
+ else
+ {
+ result = [ property-set.empty ] ;
+ }
+ }
+ else
+ {
+ result = $(property-set) ;
+ }
+ return $(result) ;
+}
+
 
 # Given a build request and requirements, return properties common to dependency
 # build request and target requirements.
@@ -1559,6 +1565,23 @@
     return $(target) ;
 }
 
+# Creates a new metargets with the specified properties, using 'klass' as
+# the class. The 'name', 'sources',
+# 'requirements', 'default-build' and 'usage-requirements' are assumed to be in
+# the form specified by the user in Jamfile corresponding to 'project'.
+#
+rule create-metatarget ( klass : project : name : sources * : requirements * :
+ default-build * : usage-requirements * )
+{
+ return [
+ targets.main-target-alternative
+ [ new $(klass) $(name) : $(project)
+ : [ targets.main-target-sources $(sources) : $(name) ]
+ : [ targets.main-target-requirements $(requirements) : $(project) ]
+ : [ targets.main-target-default-build $(default-build) : $(project) ]
+ : [ targets.main-target-usage-requirements $(usage-requirements) : $(project) ]
+ ] ] ;
+}
 
 # Creates a typed-target with the specified properties. The 'name', 'sources',
 # 'requirements', 'default-build' and 'usage-requirements' are assumed to be in

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -117,7 +117,7 @@
         {
             .type.$(s) = $(type) ;
         }
- else if $(.type.$(s)) != type
+ else if $(.type.$(s)) != $(type)
         {
             errors.error Attempting to specify multiple types for suffix
                 \"$(s)\" : "Old type $(.type.$(s)), New type $(type)" ;

Modified: branches/release/tools/build/v2/build/virtual-target.jam
==============================================================================
--- branches/release/tools/build/v2/build/virtual-target.jam (original)
+++ branches/release/tools/build/v2/build/virtual-target.jam 2009-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -655,6 +655,8 @@
     {
         NOTFILE $(target) ;
         ALWAYS $(target) ;
+ # TEMPORARY $(target) ;
+ NOUPDATE $(target) ;
     }
 }
 
@@ -675,6 +677,7 @@
     import property-set ;
     import indirect ;
     import path ;
+ import set : difference ;
 
     rule __init__ ( sources * : action-name + : property-set ? )
     {
@@ -700,6 +703,12 @@
         self.targets += $(targets) ;
     }
 
+ rule replace-targets ( old-targets * : new-targets * )
+ {
+ self.targets = [ set.difference $(self.targets) : $(old-targets) ] ;
+ self.targets += $(new-targets) ;
+ }
+
     rule targets ( )
     {
         return $(self.targets) ;

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -457,10 +457,12 @@
     </para>
 
     <para>
- The <code>run</code> and the <code>run-fail</code> rules, if the test
- passes, automatically delete the linked executable, to save space. This
- behaviour can be suppressed by passing the <literal>
- --preserve-test-targets</literal> command line option.
+ <indexterm><primary>preserve-test-targets</primary></indexterm>
+ If the <literal>preserve-test-targets</literal> feature has the value
+ <literal>off</literal>, then <code>run</code> and the <code>run-fail</code>
+ rules will remove the executable after running it. This somewhat decreases
+ disk space requirements for continuous testing environments. The default
+ value of <literal>preserve-test-targets</literal> feature is <literal>on</literal>.
     </para>
 
     <para>

Modified: branches/release/tools/build/v2/example/generate/jamroot.jam
==============================================================================
--- branches/release/tools/build/v2/example/generate/jamroot.jam (original)
+++ branches/release/tools/build/v2/example/generate/jamroot.jam 2009-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -2,32 +2,28 @@
 # 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 common ;
 import "class" : new ;
+import common ;
 
 rule generate-example ( project name : property-set : sources * )
 {
     local result ;
     for local s in $(sources)
     {
- #local ea = [ $(s).action ] ;
- #local ep = [ $(ea).properties ] ;
-
- # Create a new action, that takes the source target
- # and runs 'common.copy' comamnd on it.
- local a = [
- new non-scanning-action $(s) : common.copy : $(property-set) ] ;
-
- local source-name = [ $(s).name ] ;
-
- # Create the target to represent the result of the action.
- # The target has the name that was specified in Jamfile
- # and passed here via the 'name' parameter,
- # and the same type and project as the source.
- result += [ new file-target $(name)
- : [ $(s).type ]
- : $(project)
- : $(a) ] ;
+ #local source-name = [ $(s).name ] ;
+ #local source-action = [ $(s).action ] ;
+ #local source-properties = [ $(source-action).properties ] ;
+
+ # Create a new action, that takes the source target and runs the
+ # 'common.copy' command on it.
+ local a = [ new non-scanning-action $(s) : common.copy : $(property-set)
+ ] ;
+
+ # Create a target to represent the action result. Uses the target name
+ # passed here via the 'name' parameter and the same type and project as
+ # the source.
+ result += [ new file-target $(name) : [ $(s).type ] : $(project) : $(a)
+ ] ;
     }
     return $(result) ;
 }

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -36,11 +36,19 @@
 
     t.write("Other/mygen.jam", """
 import generators ;
+import os ;
 import type ;
 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() {}" > "$(<)" }
+if [ os.name ] = NT
+{
+ actions generate-a-cpp-file { echo void g() {} > "$(<)" }
+}
+else
+{
+ actions generate-a-cpp-file { echo "void g() {}" > "$(<)" }
+}
 """)
 
     t.write("Other/jamfile.jam", """

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -13,8 +13,8 @@
 
 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',
@@ -42,11 +42,11 @@
 
     pass_count = 0
     failures_count = 0
-
+
     for i in all_tests:
         passed = 1
- if not xml:
- print ("%-25s : " %(i)),
+ if not xml:
+ print ("%-25s : " %(i)),
         try:
             __import__(i)
         except SystemExit:
@@ -58,12 +58,12 @@
             failures_count = failures_count + 1
             # Restore the current directory, which might be changed by the test.
             os.chdir(invocation_dir)
-
+
         if not xml:
             if passed:
                 print "PASSED"
             else:
- print "FAILED"
+ print "FAILED"
         else:
             rs = "succeed"
             if not passed:
@@ -79,9 +79,9 @@
             print """
 </run>
 </test-log>
-"""
-
- pass_count = pass_count + 1
+"""
+ if passed:
+ pass_count = pass_count + 1
         sys.stdout.flush() # Makes testing under emacs more entertaining.
 
     # Erase the file on success.

Modified: branches/release/tools/build/v2/tools/acc.jam
==============================================================================
--- branches/release/tools/build/v2/tools/acc.jam (original)
+++ branches/release/tools/build/v2/tools/acc.jam 2009-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -63,6 +63,9 @@
 flags acc CFLAGS <profiling>on : -pg ;
 flags acc LINKFLAGS <profiling>on : -pg ;
 
+flags acc CFLAGS <address-model>64 : +DD64 ;
+flags acc LINKFLAGS <address-model>64 : +DD64 ;
+
 flags acc CFLAGS <cflags> ;
 flags acc C++FLAGS <cxxflags> ;
 flags acc DEFINES <define> ;

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -312,7 +312,6 @@
         local catalog = $(global-catalog[1]) ;
         local catalog-file = $(global-catalog[2]) ;
         local targets ;
- local targets ;
        
         # Add the catalog to the property set
         property-set = [ $(property-set).add-raw <catalog>$(catalog-file) ] ;

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -559,6 +559,23 @@
 {
     if [ os.name ] = NT
     {
+ # A few alternative implementations on Windows:
+ #
+ # 'type NUL >> '
+ # That would construct an empty file instead of a file containing
+ # a space and an end-of-line marker but it would also not change
+ # the target's timestamp in case the file already exists.
+ #
+ # 'type NUL > '
+ # That would construct an empty file instead of a file containing
+ # a space and an end-of-line marker but it would also destroy an
+ # already existing file by overwriting it with an empty one.
+ #
+ # I guess the best solution would be to allow Boost Jam to define
+ # built-in functions such as 'create a file', 'touch a file' or 'copy a
+ # file' which could be used from inside action code. That would allow
+ # completely portable operations without this kind of kludge.
+ # (22.02.2009.) (Jurko)
         return "echo. > " ;
     }
     else

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -91,6 +91,9 @@
     # - The configured compile driver command.
     local command = [ common.get-invocation-command darwin : g++ : $(command) ] ;
     
+ # The version as reported by the compiler
+ local real-version ;
+
     # - Autodetect the root and bin dir if not given.
     if $(command)
     {
@@ -113,8 +116,9 @@
         # - The 'command' variable can have multiple elements. When calling
         # the SHELL builtin we need a single string.
         local command-string = $(command:J=" ") ;
- version ?= [ MATCH "^([0-9.]+)"
+ real-version = [ MATCH "^([0-9.]+)"
             : [ SHELL "$(command-string) -dumpversion" ] ] ;
+ version ?= $(real-version) ;
     }
     
     # - Define the condition for this toolset instance.
@@ -125,12 +129,12 @@
     common.handle-options darwin : $(condition) : $(command) : $(options) ;
     
     # - GCC 4.0 and higher in Darwin does not have -fcoalesce-templates.
- if $(version) < "4.0.0"
+ if $(real-version) < "4.0.0"
     {
         flags darwin.compile.c++ OPTIONS $(condition) : -fcoalesce-templates ;
     }
     # - GCC 4.2 and higher in Darwin does not have -Wno-long-double.
- if $(version) < "4.2.0"
+ if $(real-version) < "4.2.0"
     {
         flags darwin.compile OPTIONS $(condition) : -Wno-long-double ;
     }

Modified: branches/release/tools/build/v2/tools/docutils.jam
==============================================================================
--- branches/release/tools/build/v2/tools/docutils.jam (original)
+++ branches/release/tools/build/v2/tools/docutils.jam 2009-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -42,15 +42,19 @@
 
 generators.register-standard docutils.html : ReST : HTML ;
 
-rule init ( docutils-dir ? )
+rule init ( docutils-dir ? : tools-dir ? )
 {
+ ECHO docutils-dir= $(docutils-dir) ;
     docutils-dir ?= [ modules.peek : DOCUTILS_DIR ] ;
+ ECHO tools-dir= $(tools-dir) ;
+ tools-dir ?= $(docutils-dir)/tools ;
 
     if ! $(.initialized)
     {
         .initialized = true ;
         .docutils-dir = $(docutils-dir) ;
-
+ .tools-dir = $(tools-dir:R="") ;
+
         .setup = [
           common.prepend-path-variable-command PYTHONPATH
             : $(.docutils-dir) $(.docutils-dir)/extras ] ;
@@ -62,7 +66,7 @@
     if ! [ on $(target) return $(RST2XXX) ]
     {
         local python-cmd = [ property.select <python.interpreter> : $(properties) ] ;
- RST2XXX on $(target) = $(python-cmd:G=:E="python") $(.docutils-dir)/tools/rst2html.py ;
+ RST2XXX on $(target) = $(python-cmd:G=:E="python") $(.tools-dir)/rst2html.py ;
     }
 }
 

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -17,7 +17,12 @@
 feature.extend-subfeature toolset intel : platform : darwin ;
 
 toolset.inherit-generators intel-darwin
- <toolset>intel <toolset-intel:platform>darwin : gcc : gcc.mingw.link gcc.mingw.link.dll ;
+ <toolset>intel <toolset-intel:platform>darwin
+ : gcc
+ # Don't inherit PCH generators. They were not tested, and probably
+ # don't work for this compiler.
+ : gcc.mingw.link gcc.mingw.link.dll gcc.compile.c.pch gcc.compile.c++.pch
+ ;
 
 generators.override intel-darwin.prebuilt : builtin.lib-generator ;
 generators.override intel-darwin.prebuilt : builtin.prebuilt ;

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -13,6 +13,8 @@
 import common ;
 import errors ;
 import generators ;
+import type ;
+import numbers ;
 
 feature.extend-subfeature toolset intel : platform : linux ;
 
@@ -22,6 +24,12 @@
 generators.override intel-linux.prebuilt : builtin.prebuilt ;
 generators.override intel-linux.searched-lib-generator : searched-lib-generator ;
 
+# Override default do-nothing generators.
+generators.override intel-linux.compile.c.pch : pch.default-c-pch-generator ;
+generators.override intel-linux.compile.c++.pch : pch.default-cpp-pch-generator ;
+
+type.set-generated-target-suffix PCH : <toolset>intel <toolset-intel:platform>linux : pchi ;
+
 toolset.inherit-rules intel-linux : gcc ;
 toolset.inherit-flags intel-linux : gcc
         : <inlining>off <inlining>on <inlining>full <optimization>space
@@ -55,7 +63,27 @@
     {
         bin ?= [ common.get-absolute-tool-path $(command[-1]) ] ;
         root ?= $(bin:D) ;
-
+
+ local command-string = $(command:J=" ") ;
+ local version-output = [ SHELL "$(command-string) --version" ] ;
+ local real-version = [ MATCH "([0-9.]+)" : $(version-output) ] ;
+ local major = [ MATCH "([0-9]+).*" : $(real-version) ] ;
+
+ # If we failed to determine major version, use the behaviour for
+ # the current compiler.
+ if $(major) && [ numbers.less $(major) 10 ]
+ {
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>off : "-Ob0" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-Ob1" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-Ob2" ;
+ }
+ else
+ {
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>off : "-inline-level=0" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-inline-level=1" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-inline-level=2" ;
+ }
+
         if $(root)
         {
             # Libraries required to run the executable may be in either
@@ -74,9 +102,6 @@
 
 SPACE = " " ;
 
-flags intel-linux.compile OPTIONS <inlining>off : "-Ob0" ;
-flags intel-linux.compile OPTIONS <inlining>on : "-Ob1" ;
-flags intel-linux.compile OPTIONS <inlining>full : "-Ob2" ;
 flags intel-linux.compile OPTIONS <optimization>space : "-O1" ; # no specific space optimization flag in icc
 
 flags intel-linux.compile OPTIONS <warnings>off : -w0 ;
@@ -87,22 +112,50 @@
 {
     gcc.setup-threading $(targets) : $(sources) : $(properties) ;
     gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
+ DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
 }
 
-actions compile.c++
+actions compile.c++ bind PCH_FILE
 {
- "$(CONFIG_COMMAND)" -c -xc++ $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+ "$(CONFIG_COMMAND)" -c -xc++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -use-pch"$(PCH_FILE)" -c -o "$(<)" "$(>)"
 }
 
 rule compile.c ( targets * : sources * : properties * )
 {
     gcc.setup-threading $(targets) : $(sources) : $(properties) ;
     gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
+ DEPENDS $(<) : [ on $(<) return $(PCH_FILE) ] ;
+}
+
+actions compile.c bind PCH_FILE
+{
+ "$(CONFIG_COMMAND)" -c -xc $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -use-pch"$(PCH_FILE)" -c -o "$(<)" "$(>)"
 }
 
-actions compile.c
+rule compile.c++.pch ( targets * : sources * : properties * )
+{
+ gcc.setup-threading $(targets) : $(sources) : $(properties) ;
+ gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
+}
+#
+# Compiling a pch first deletes any existing *.pchi file, as Intel's compiler
+# won't over-write an existing pch: instead it creates filename$1.pchi, filename$2.pchi
+# etc - which appear not to do anything except take up disk space :-(
+#
+actions compile.c++.pch
 {
- "$(CONFIG_COMMAND)" -c -xc $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
+ rm -f "$(<)" && "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -pch-create "$(<)" "$(>)"
+}
+
+rule compile.c.pch ( targets * : sources * : properties * )
+{
+ gcc.setup-threading $(targets) : $(sources) : $(properties) ;
+ gcc.setup-fpic $(targets) : $(sources) : $(properties) ;
+}
+
+actions compile.c.pch
+{
+ rm -f "$(<)" && "$(CONFIG_COMMAND)" -x c-header $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -pch-create "$(<)" "$(>)"
 }
 
 rule link ( targets * : sources * : properties * )
@@ -129,3 +182,6 @@
 {
     "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o "$(<)" -Wl,-soname$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
 }
+
+
+

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -988,16 +988,22 @@
     {
         local result = [ linking-generator.generated-targets $(sources)
           : $(property-set) : $(project) $(name) ] ;
- if [ $(property-set).get <embed-manifest> ] = "off"
+
+ if $(result)
         {
- if ! $(name)
+ local name = [ $(result[0]).name ] ;
+ local action = [ $(result[0]).action ] ;
+
+ if [ $(property-set).get <embed-manifest> ] = "off"
             {
- name = [ determine-output-name $(sources) ] ;
+ local target = [ class.new file-target $(name) : MANIFEST : $(project) : $(action) ] ;
+ local registered-target = [ virtual-target.register $(target) ] ;
+ if $(action) && ( $(target) != $(registered-target) )
+ {
+ $(action).replace-targets $(target) : $(registered-target) ;
+ }
+ result += $(registered-target) ;
             }
-
- local action = [ $(result[0]).action ] ;
- result += [ virtual-target.register
- [ class.new file-target $(name) : MANIFEST : $(project) : $(action) ] ] ;
         }
         return $(result) ;
     }

Modified: branches/release/tools/build/v2/tools/pathscale.jam
==============================================================================
--- branches/release/tools/build/v2/tools/pathscale.jam (original)
+++ branches/release/tools/build/v2/tools/pathscale.jam 2009-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -13,7 +13,7 @@
 
 feature.extend toolset : pathscale ;
 toolset.inherit pathscale : unix ;
-generators.override pathscale.prebuilt : builtin.lib-generator ;
+generators.override pathscale.prebuilt : builtin.prebuilt ;
 generators.override pathscale.searched-lib-generator : searched-lib-generator ;
 
 # Documentation and toolchain description located

Modified: branches/release/tools/build/v2/tools/stlport.jam
==============================================================================
--- branches/release/tools/build/v2/tools/stlport.jam (original)
+++ branches/release/tools/build/v2/tools/stlport.jam 2009-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -142,7 +142,14 @@
                 name += _static ;
             }
 
- name += .$(self.version.5) ;
+ # Starting with version 5.2.0, the STLport static libraries no longer
+ # include a version number in their name
+ local version.pre.5.2 = [ MATCH "^(5[.][01]+).*" : $(version) ] ;
+ if $(version.pre.5.2) || [ feature.get-values <runtime-link> : $(raw) ] != "static"
+ {
+ name += .$(self.version.5) ;
+ }
+
             name = $(name:J=) ;
             
             if [ feature.get-values <install-dependencies> : $(raw) ] = "on"

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -49,7 +49,7 @@
 # Declare flags and actions for compilation
 flags sun.compile OPTIONS <debug-symbols>on : -g ;
 flags sun.compile OPTIONS <profiling>on : -xprofile=tcov ;
-flags sun.compile OPTIONS <optimization>speed : -fast ;
+flags sun.compile OPTIONS <optimization>speed : -xO4 ;
 flags sun.compile OPTIONS <optimization>space : -xO2 -xspace ;
 flags sun.compile OPTIONS <threading>multi : -mt ;
 

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-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -62,7 +62,7 @@
 feature.feature testing.arg : : free incidental ;
 feature.feature testing.input-file : : free dependency ;
 
-feature.feature preserve-test-targets : off on : incidental propagated ;
+feature.feature preserve-test-targets : on off : incidental propagated ;
 
 # Register target types.
 type.register TEST : test ;

Modified: branches/release/tools/build/v2/tools/types/exe.jam
==============================================================================
--- branches/release/tools/build/v2/tools/types/exe.jam (original)
+++ branches/release/tools/build/v2/tools/types/exe.jam 2009-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -6,4 +6,4 @@
 
 type.register EXE ;
 type.set-generated-target-suffix EXE : <target-os>windows : "exe" ;
-type.set-generated-target-suffix EXE : <target-os>cygiwn : "exe" ;
+type.set-generated-target-suffix EXE : <target-os>cygwin : "exe" ;

Modified: branches/release/tools/build/v2/tools/types/lib.jam
==============================================================================
--- branches/release/tools/build/v2/tools/types/lib.jam (original)
+++ branches/release/tools/build/v2/tools/types/lib.jam 2009-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -25,6 +25,7 @@
 
 type.register SHARED_LIB : so dll dylib : LIB ;
 type.set-generated-target-suffix SHARED_LIB : <target-os>windows : dll ;
+type.set-generated-target-suffix SHARED_LIB : <target-os>cygwin : dll ;
 type.set-generated-target-suffix SHARED_LIB : <target-os>darwin : dylib ;
 
 type SEARCHED_LIB : : LIB ;

Modified: branches/release/tools/build/v2/tools/vacpp.jam
==============================================================================
--- branches/release/tools/build/v2/tools/vacpp.jam (original)
+++ branches/release/tools/build/v2/tools/vacpp.jam 2009-04-14 03:59:30 EDT (Tue, 14 Apr 2009)
@@ -16,7 +16,7 @@
 
 feature.extend toolset : vacpp ;
 toolset.inherit vacpp : unix ;
-generators.override vacpp.prebuilt : builtin.lib-generator ;
+generators.override vacpp.prebuilt : builtin.prebuilt ;
 generators.override vacpp.searched-lib-generator : searched-lib-generator ;
 
 # Configure the vacpp toolset
@@ -69,14 +69,25 @@
 
 if [ os.name ] = AIX
 {
- # Tell the linker to discard unneeded object files from archive libraries.
- # Please note that the static constructors contained by the discarded object
- # files will not be invoked.
     flags vacpp.compile C++FLAGS : -qfuncsect ;
- flags vacpp.link LINKFLAGS <link>static : -qtwolink ;
+
+ # The -bnoipath strips the prepending (relative) path of libraries from
+ # the loader section in the target library or executable. Hence, during
+ # load-time LIBPATH (identical to LD_LIBRARY_PATH) or a hard-coded
+ # -blibpath (*similar* to -lrpath/-lrpath-link) is searched. Without
+ # this option, the prepending (relative) path + library name is
+ # hard-coded in the loader section, causing *only* this path to be
+ # searched during load-time. Note that the AIX linker does not have an
+ # -soname equivalent, this is as close as it gets.
+ #
+ # The above options are definately for AIX 5.x, and most likely also for
+ # AIX 4.x and AIX 6.x. For details about the AIX linker see:
+ # http://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf
+ #
+ flags vacpp.link LINKFLAGS <link>shared : -bnoipath ;
 
     # Run-time linking
- flags vacpp.link EXE-LINKFLAGS <link>shared : -brtl -qtwolink ;
+ flags vacpp.link EXE-LINKFLAGS <link>shared : -brtl ;
 }
 else
 {


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