Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63913 - in branches/release/tools/build/v2: . contrib doc/src test tools tools/doxygen tools/xsltproc util
From: ghost_at_[hidden]
Date: 2010-07-12 03:37:45


Author: vladimir_prus
Date: 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
New Revision: 63913
URL: http://svn.boost.org/trac/boost/changeset/63913

Log:
Merge from trunk
Added:
   branches/release/tools/build/v2/test/exit_status.py
      - copied unchanged from r62659, /trunk/tools/build/v2/test/exit_status.py
   branches/release/tools/build/v2/tools/doxygen/
      - copied from r62247, /trunk/tools/build/v2/tools/doxygen/
   branches/release/tools/build/v2/tools/doxygen/windows-paths-check.doxyfile
      - copied unchanged from r62247, /trunk/tools/build/v2/tools/doxygen/windows-paths-check.doxyfile
   branches/release/tools/build/v2/tools/doxygen/windows-paths-check.hpp
      - copied unchanged from r62247, /trunk/tools/build/v2/tools/doxygen/windows-paths-check.hpp
   branches/release/tools/build/v2/tools/xsltproc/
      - copied from r62244, /trunk/tools/build/v2/tools/xsltproc/
   branches/release/tools/build/v2/tools/xsltproc/included.xsl
      - copied unchanged from r62244, /trunk/tools/build/v2/tools/xsltproc/included.xsl
   branches/release/tools/build/v2/tools/xsltproc/test.xml
      - copied unchanged from r62244, /trunk/tools/build/v2/tools/xsltproc/test.xml
   branches/release/tools/build/v2/tools/xsltproc/test.xsl
      - copied unchanged from r62244, /trunk/tools/build/v2/tools/xsltproc/test.xsl
Properties modified:
   branches/release/tools/build/v2/ (props changed)
   branches/release/tools/build/v2/tools/ (props changed)
Text files modified:
   branches/release/tools/build/v2/build-system.jam | 10 +
   branches/release/tools/build/v2/contrib/boost.jam | 117 ++++++++++++++----
   branches/release/tools/build/v2/doc/src/standalone.xml | 17 ++
   branches/release/tools/build/v2/doc/src/userman.xml | 17 ++
   branches/release/tools/build/v2/test/BoostBuild.py | 6
   branches/release/tools/build/v2/test/gcc_runtime.py | 2
   branches/release/tools/build/v2/test/test_all.py | 3
   branches/release/tools/build/v2/tools/boostbook-config.jam | 52 -------
   branches/release/tools/build/v2/tools/boostbook.jam | 244 ++++++++++++++++++++++++++++++---------
   branches/release/tools/build/v2/tools/como-win.jam | 6
   branches/release/tools/build/v2/tools/darwin.jam | 17 +
   branches/release/tools/build/v2/tools/doxygen.jam | 143 ++++++++++++++++++++++-
   branches/release/tools/build/v2/tools/mpi.jam | 62 ++++++++++
   branches/release/tools/build/v2/tools/testing.jam | 8
   branches/release/tools/build/v2/tools/xsltproc.jam | 60 +++++++++
   branches/release/tools/build/v2/util/print.jam | 74 ++++++++++++
   16 files changed, 677 insertions(+), 161 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 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -921,6 +921,15 @@
             __ACTION_RULE__ = build-system.out-xml.collect
                 [ modules.peek build-system : .out-xml ] ;
         }
+
+ IMPORT
+ build-system :
+ out-xml.collect
+ out-xml.generate-action
+ : :
+ build-system.out-xml.collect
+ build-system.out-xml.generate-action
+ ;
     }
 
     local j = [ option.get jobs ] ;
@@ -998,4 +1007,3 @@
         }
     }
 }
-

Modified: branches/release/tools/build/v2/contrib/boost.jam
==============================================================================
--- branches/release/tools/build/v2/contrib/boost.jam (original)
+++ branches/release/tools/build/v2/contrib/boost.jam 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -59,6 +59,7 @@
 import regex ;
 import common ;
 import option ;
+import numbers ;
 
 .boost.auto_config = [ property-set.create <layout>system ] ;
 
@@ -114,7 +115,7 @@
 # searchable pre-built boost libraries, or references a source tree
 # of the boost library. If the 'version' parameter is omitted either
 # the configured default (first in config files) is used or an auto
-# configuration will be attemted.
+# configuration will be attempted.
 #
 rule use-project
 (
@@ -190,40 +191,61 @@
 # The default definitions for pre-built libraries.
 
     project boost
- : usage-requirements <include>$(inc)
+ : usage-requirements <include>$(inc) <define>BOOST_ALL_NO_LIB
         : requirements <tag>@tag_std <search>$(lib)
         ;
 
     alias headers ;
+ lib date_time : : : :
+ <link>shared:<define>BOOST_DATE_TIME_DYN_LINK ;
+ lib filesystem : : : :
+ <link>shared:<define>BOOST_FILE_SYSTEM_DYN_LINK ;
+ lib graph : : : :
+ <link>shared:<define>BOOST_GRAPH_DYN_LINK ;
+ lib graph_parallel : : : :
+ <link>shared:<define>BOOST_GRAPH_DYN_LINK ;
+ lib iostreams : : : :
+ <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK ;
+ lib math_tr1 : : : :
+ <link>shared:<define>BOOST_MATH_TR1_DYN_LINK ;
+ lib math_tr1f : : : :
+ <link>shared:<define>BOOST_MATH_TR1_DYN_LINK ;
+ lib math_tr1l : : : :
+ <link>shared:<define>BOOST_MATH_TR1_DYN_LINK ;
+ lib math_c99 : : : :
+ <link>shared:<define>BOOST_MATH_TR1_DYN_LINK ;
+ lib math_c99f : : : :
+ <link>shared:<define>BOOST_MATH_TR1_DYN_LINK ;
+ lib math_c99l : : : :
+ <link>shared:<define>BOOST_MATH_TR1_DYN_LINK ;
+ lib mpi : : : :
+ <link>shared:<define>BOOST_MPI_DYN_LINK ;
     lib program_options : : : :
         <link>shared:<define>BOOST_PROGRAM_OPTIONS_DYN_LINK ;
- lib thread : : : :
- <link>shared:<define>BOOST_THREAD_DYN_DLL ;
- lib iostreams : : : :
- <link>shared:<define>BOOST_IOSTREAMS_DYN_LINK ;
- lib wave : : : :
- <link>shared:<define>BOOST_WAVE_DYN_LINK ;
     lib python : : : :
         <link>shared:<define>BOOST_PYTHON_DYN_LINK ;
- lib serialization : : : :
- <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK ;
- lib graph : : : :
- <link>shared:<define>BOOST_GRAPH_DYN_LINK ;
- lib date_time : : : :
- <link>shared:<define>BOOST_DATE_TIME_DYN_LINK ;
- lib test : : : :
- <link>shared:<define>BOOST_TEST_DYN_LINK ;
+ lib random : : : :
+ <link>shared:<define>BOOST_RANDOM_DYN_LINK ;
     lib regex : : : :
         <link>shared:<define>BOOST_REGEX_DYN_LINK ;
- lib filesystem : : : :
- <link>shared:<define>BOOST_FILE_SYSTEM_DYN_LINK ;
+ lib serialization : : : :
+ <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK ;
+ lib wserialization : : : :
+ <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK ;
     lib signals : : : :
         <link>shared:<define>BOOST_SIGNALS_DYN_LINK ;
- lib function_types ;
- lib mpi : : : :
- <link>shared:<define>BOOST_MPI_DYN_LINK ;
     lib system : : : :
         <link>shared:<define>BOOST_SYSTEM_DYN_LINK ;
+ lib unit_test_framework : : : :
+ <link>shared:<define>BOOST_TEST_DYN_LINK ;
+ lib prg_exec_monitor : : : :
+ <link>shared:<define>BOOST_TEST_DYN_LINK ;
+ lib test_exec_monitor : : : :
+ <link>shared:<define>BOOST_TEST_DYN_LINK ;
+ lib thread : : : :
+ <link>shared:<define>BOOST_THREAD_DYN_DLL ;
+ lib wave : : : :
+ <link>shared:<define>BOOST_WAVE_DYN_LINK ;
 }
 
 rule boost_0_0_1 ( inc ? lib ? )
@@ -244,13 +266,56 @@
     {
         name = lib$(name) ;
     }
- if $(.layout) = versioned
+
+ local result ;
+ if $(.layout) = system
     {
- version = $(.version_tag) ;
- toolset = <toolset> ;
+ local version = [ MATCH ^([0-9]+)_([0-9]+) : $(.version_tag) ] ;
+ if $(version[1]) = "1" && [ numbers.less $(version[2]) 39 ]
+ {
+ result = [ tag_tagged $(name) : $(type) : $(property-set) ] ;
+ }
+ else
+ {
+ result = [ tag_system $(name) : $(type) : $(property-set) ] ;
+ }
+ }
+ else if $(.layout) = tagged
+ {
+ result = [ tag_tagged $(name) : $(type) : $(property-set) ] ;
     }
+ else if $(.layout) = versioned
+ {
+ result = [ tag_versioned $(name) : $(type) : $(property-set) ] ;
+ }
+ else
+ {
+ errors.error "Missing layout" ;
+ }
+
+ return $(result) ;
+}
+
+rule tag_system ( name : type ? : property-set )
+{
+ return [ common.format-name
+ <base>
+ -$(.build_id)
+ : $(name) : $(type) : $(property-set) ] ;
+}
+
+rule tag_tagged ( name : type ? : property-set )
+{
+ return [ common.format-name
+ <base> <threading> <runtime>
+ -$(.build_id)
+ : $(name) : $(type) : $(property-set) ] ;
+}
 
+rule tag_versioned ( name : type ? : property-set )
+{
     return [ common.format-name
- <base> $(toolset) <threading> <runtime> -$(version) -$(.build_id)
- : $(name) : $(type) : $(property-set) ] ;
+ <base> <toolset> <threading> <runtime> -$(.version_tag)
+ -$(.build_id)
+ : $(name) : $(type) : $(property-set) ] ;
 }

Modified: branches/release/tools/build/v2/doc/src/standalone.xml
==============================================================================
--- branches/release/tools/build/v2/doc/src/standalone.xml (original)
+++ branches/release/tools/build/v2/doc/src/standalone.xml 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -4,6 +4,23 @@
 
 <book xmlns:xi="http://www.w3.org/2001/XInclude"
       id="bbv2" last-revision="$Date$">
+ <bookinfo>
+ <copyright>
+ <year>2006</year>
+ <year>2007</year>
+ <year>2008</year>
+ <year>2009</year>
+ <holder>Vladimir Prus</holder>
+ </copyright>
+
+ <legalnotice>
+ <para>Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file <filename>LICENSE_1_0.txt</filename> or copy at
+ <ulink
+ url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt>)
+ </para>
+ </legalnotice>
+ </bookinfo>
 
   <title>Boost.Build V2 User Manual</title>
 

Modified: branches/release/tools/build/v2/doc/src/userman.xml
==============================================================================
--- branches/release/tools/build/v2/doc/src/userman.xml (original)
+++ branches/release/tools/build/v2/doc/src/userman.xml 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -4,6 +4,23 @@
 
 <part xmlns:xi="
http://www.w3.org/2001/XInclude"
       id="bbv2" last-revision="$Date$">
+ <partinfo>
+ <copyright>
+ <year>2006</year>
+ <year>2007</year>
+ <year>2008</year>
+ <year>2009</year>
+ <holder>Vladimir Prus</holder>
+ </copyright>
+
+ <legalnotice>
+ <para>Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file <filename>LICENSE_1_0.txt</filename> or copy at
+ <ulink
+ url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt>)
+ </para>
+ </legalnotice>
+ </partinfo>
 
   <title>Boost.Build V2 User Manual</title>
 

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 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -131,8 +131,6 @@
     def _failed(self, status=0):
         if self.status is None:
             return None
- if os.WIFSIGNALED(status):
- return None
         return _status(self) != status
     def _status(self):
         if os.WIFEXITED(self.status):
@@ -458,8 +456,8 @@
 
             annotation("failure", '"%s" returned %d%s'
                 % (kw['program'], _status(self), expect))
-
- annotation("reason", "error returned by bjam")
+
+ annotation("reason", "unexpected status returned by bjam")
             self.fail_test(1)
 
         if not (stdout is None) and not match(self.stdout(), stdout):

Modified: branches/release/tools/build/v2/test/gcc_runtime.py
==============================================================================
--- branches/release/tools/build/v2/test/gcc_runtime.py (original)
+++ branches/release/tools/build/v2/test/gcc_runtime.py 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -23,7 +23,7 @@
 int main() { }
 """)
 
-t.run_build_system("runtime-link=static", status=1)
+t.run_build_system("runtime-link=static")
 t.fail_test(string.find(t.stdout(),
     "On gcc, DLL can't be build with '<runtime-link>static'") == -1)
 

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 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -201,7 +201,8 @@
           "use_requirements",
           "using",
           "wrapper",
- "wrong_project"
+ "wrong_project",
+ "exit_status",
           ]
 
 if os.name == 'posix':

Modified: branches/release/tools/build/v2/tools/boostbook-config.jam
==============================================================================
--- branches/release/tools/build/v2/tools/boostbook-config.jam (original)
+++ branches/release/tools/build/v2/tools/boostbook-config.jam 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -3,53 +3,11 @@
 #~ (See accompanying file LICENSE_1_0.txt or
http://www.boost.org/LICENSE_1_0.txt)
 
 # Automatic configuration for BoostBook tools. To use, just import this module.
+#
+# This module is deprecated.
+# using boostbook ;
+# with no arguments now suffices.
 
-import os ;
 import toolset : using ;
 
-local docbook_xsl-path = [ modules.peek : DOCBOOK_XSL_DIR ] ;
-local docbook_dtd-path = [ modules.peek : DOCBOOK_DTD_DIR ] ;
-local boostbook-path = [ modules.peek : BOOSTBOOK_DIR ] ;
-if [ os.name ] = NT
-{
- # If installed by the Boost installer.
- local boost-dir = ;
- for local R in snapshot cvs 1.33.0
- {
- boost-dir += [ W32_GETREG
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Boost.org\\$(R)"
- : "InstallRoot" ] ;
- }
- # Plausible locations.
- local root = [ PWD ] ;
- while $(root) != $(root:D) { root = $(root:D) ; }
- docbook_xsl-path ?= [ GLOB "$(boost-dir)\\share" "$(root)Boost\\share" : docbook-xsl* ] ;
- docbook_dtd-path ?= [ GLOB "$(boost-dir)\\share" "$(root)Boost\\share" : docbook-xml* ] ;
- boostbook-path ?= [ GLOB "$(boost-dir)\\share" "$(root)Boost\\share" : boostbook* ] ;
-
- docbook_xsl-path = $(docbook_xsl-path[1]) ;
- docbook_dtd-path = $(docbook_dtd-path[1]) ;
- boostbook-path = $(boostbook-path[1]) ;
-}
-else
-{
- # Plausible locations.
- docbook_xsl-path ?= [ GLOB "/usr/local/share" "/usr/share" "/opt/share" : docbook-xsl* ] ;
- docbook_dtd-path ?= [ GLOB "/usr/local/share" "/usr/share" "/opt/share" : docbook-xml* ] ;
- boostbook-path ?= [ GLOB "/usr/local/share" "/usr/share" "/opt/share" : boostbook* ] ;
- # Ubuntu Linux
- docbook_xsl-path ?= [ GLOB "/usr/share/xml/docbook/stylesheet" : nwalsh ] ;
- docbook_dtd-path ?= [ GLOB "/usr/share/xml/docbook/schema/dtd" : 4.3 4.2 ] ;
-
- docbook_xsl-path = $(docbook_xsl-path[1]) ;
- docbook_dtd-path = $(docbook_dtd-path[1]) ;
- boostbook-path = $(boostbook-path[1]) ;
-}
-if $(docbook_xsl-path) && $(docbook_dtd-path)
-{
- if --debug-configuration in [ modules.peek : ARGV ]
- {
- ECHO "notice:" using boostbook ":" $(docbook_xsl-path) ":" $(docbook_dtd-path) ":" $(boostbook-path) ;
- }
- using boostbook : $(docbook_xsl-path) : $(docbook_dtd-path) : $(boostbook-path) ;
-}
+using boostbook ;

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 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -22,6 +22,7 @@
 import scanner ;
 import sequence ;
 import make ;
+import os ;
 import type ;
 import modules path project ;
 import build-system ;
@@ -56,71 +57,26 @@
 
 # Initialize BoostBook support. The parameters are:
 # docbook-xsl-dir: The DocBook XSL stylesheet directory. If not provided,
-# we use DOCBOOK_XSL_DIR from the environment (if available). Otherwise,
-# we let the XML processor load the stylesheets remotely.
+# we use DOCBOOK_XSL_DIR from the environment (if available) or look in
+# standard locations. Otherwise, we let the XML processor load the
+# stylesheets remotely.
 #
 # docbook-dtd-dir: The DocBook DTD directory. If not provided, we use
-# DOCBOOK_DTD_DIR From the environment (if available). Otherwise, we let
-# the XML processor load the DTD remotely.
+# DOCBOOK_DTD_DIR From the environment (if available) or look in
+# standard locations. Otherwise, we let the XML processor load the
+# DTD remotely.
 #
 # boost-book-dir: The BoostBook directory with the DTD and XSL subdirs.
 #
 rule init ( docbook-xsl-dir ? : docbook-dtd-dir ? : boostbook-dir ? )
 {
 
- docbook-xsl-dir ?= [ modules.peek : DOCBOOK_XSL_DIR ] ;
-
- docbook-dtd-dir ?= [ modules.peek : DOCBOOK_DTD_DIR ] ;
-
   if ! $(.initialized)
   {
     .initialized = true ;
- if $(docbook-xsl-dir)
- {
- .docbook-xsl-dir = [ path.make $(docbook-xsl-dir) ] ;
- }
- if $(docbook-dtd-dir)
- {
- .docbook-dtd-dir = [ path.make $(docbook-dtd-dir) ] ;
- }
-
- local boost-root = [ modules.peek : BOOST_ROOT ] ;
- if $(boost-root)
- {
- boost-root = [ path.make $(boost-root) ] ;
- }
- local boost-build-root = [ build-system.location ] ;
- local search-dirs = $(boostbook-dir) [ path.join $(boost-root) tools boostbook ]
- $(boost-build-root)/../../boostbook ;
-
-
- if --debug-configuration in [ modules.peek : ARGV ]
- {
- ECHO "notice: Boost.Book: searching XSLS/DTD in" ;
- ECHO "notice:" [ sequence.transform path.native : $(search-dirs) ] ;
- }
- local boostbook-xsl-dir ;
- for local dir in $(search-dirs) {
- boostbook-xsl-dir += [ path.glob $(dir) : xsl ] ;
- }
- local boostbook-dtd-dir ;
- for local dir in $(search-dirs) {
- boostbook-dtd-dir += [ path.glob $(dir) : dtd ] ;
- }
- .boostbook-xsl-dir = $(boostbook-xsl-dir[1]) ;
- .boostbook-dtd-dir = $(boostbook-dtd-dir[1]) ;
-
-
- if ! $(.boostbook-xsl-dir) || ! $(.boostbook-dtd-dir)
- {
- errors.warning
- "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="
-") ;
- }
     
+ find-tools $(docbook-xsl-dir) : $(docbook-dtd-dir) : $(boostbook-dir) ;
+
     # Register generators only if we've were called via "using boostbook ; "
     generators.register-standard boostbook.dtdxml-to-boostbook : DTDXML : XML ;
     generators.register-standard boostbook.boostbook-to-docbook : XML : DOCBOOK ;
@@ -137,6 +93,160 @@
   }
 }
 
+rule find-boost-in-registry ( keys * )
+{
+ local boost-root = ;
+ for local R in $(keys)
+ {
+ local installed-boost = [ W32_GETREG
+ "HKEY_LOCAL_MACHINE\\SOFTWARE\\$(R)"
+ : "InstallRoot" ] ;
+ if $(installed-boost)
+ {
+ boost-root += [ path.make $(installed-boost) ] ;
+ }
+ }
+ return $(boost-root) ;
+}
+
+rule find-tools ( docbook-xsl-dir ? : docbook-dtd-dir ? : boostbook-dir ? )
+{
+ docbook-xsl-dir ?= [ modules.peek : DOCBOOK_XSL_DIR ] ;
+ docbook-dtd-dir ?= [ modules.peek : DOCBOOK_DTD_DIR ] ;
+ boostbook-dir ?= [ modules.peek : BOOSTBOOK_DIR ] ;
+
+ # Look for the boostbook stylesheets relative to BOOST_ROOT
+ # and Boost.Build.
+ local boost-build-root = [ path.make [ build-system.location ] ] ;
+ local boostbook-search-dirs = [ path.join $(boost-build-root) .. .. ] ;
+
+ local boost-root = [ modules.peek : BOOST_ROOT ] ;
+ if $(boost-root)
+ {
+ boostbook-search-dirs += [ path.join [ path.make $(boost-root) ] tools ] ;
+ }
+ boostbook-dir ?= [ path.glob $(boostbook-search-dirs) : boostbook* ] ;
+
+ # Try to find the tools in platform specific locations
+ if [ os.name ] = NT
+ {
+ # If installed by the Boost installer.
+ local boost-root = ;
+
+ local boost-installer-versions = snapshot cvs 1.33.0 ;
+ local boost-consulting-installer-versions = 1.33.1 1.34.0 1.34.1 ;
+ local boostpro-installer-versions =
+ 1.35.0 1.36.0 1.37.0 1.38.0 1.39.0 1.40.0 1.41.0 1.42.0
+ 1.43.0 1.44.0 1.45.0 1.46.0 1.47.0 1.48.0 1.49.0 1.50.0 ;
+
+ local old-installer-root = [ find-boost-in-registry Boost.org\\$(boost-installer-versions) ] ;
+
+ # Make sure that the most recent version is searched for first
+ boost-root += [ sequence.reverse
+ [ find-boost-in-registry
+ Boost-Consulting.com\\$(boost-consulting-installer-versions)
+ boostpro.com\\$(boostpro-installer-versions) ] ] ;
+
+ # Plausible locations.
+ local root = [ PWD ] ;
+ while $(root) != $(root:D) { root = $(root:D) ; }
+ root = [ path.make $(root) ] ;
+ local search-dirs = ;
+ local docbook-search-dirs = ;
+ for local p in $(boost-root) {
+ search-dirs += [ path.join $(p) tools ] ;
+ }
+ for local p in $(old-installer-root)
+ {
+ search-dirs += [ path.join $(p) share ] ;
+ docbook-search-dirs += [ path.join $(p) share ] ;
+ }
+ search-dirs += [ path.join $(root) Boost tools ] ;
+ search-dirs += [ path.join $(root) Boost share ] ;
+ docbook-search-dirs += [ path.join $(root) Boost share ] ;
+
+ docbook-xsl-dir ?= [ path.glob $(docbook-search-dirs) : docbook-xsl* ] ;
+ docbook-dtd-dir ?= [ path.glob $(docbook-search-dirs) : docbook-xml* ] ;
+ boostbook-dir ?= [ path.glob $(search-dirs) : boostbook* ] ;
+ }
+ else
+ {
+ # Plausible locations.
+
+ local share = /usr/local/share /usr/share /opt/share /opt/local/share ;
+ local dtd-versions = 4.2 ;
+
+ docbook-xsl-dir ?= [ path.glob $(share) : docbook-xsl* ] ;
+ docbook-xsl-dir ?= [ path.glob $(share)/sgml/docbook : xsl-stylesheets ] ;
+ docbook-xsl-dir ?= [ path.glob $(share)/xsl : docbook* ] ;
+
+ docbook-dtd-dir ?= [ path.glob $(share) : docbook-xml* ] ;
+ docbook-dtd-dir ?= [ path.glob $(share)/sgml/docbook : xml-dtd-$(dtd-versions)* ] ;
+ docbook-dtd-dir ?= [ path.glob $(share)/xml/docbook : $(dtd-versions) ] ;
+
+ boostbook-dir ?= [ path.glob $(share) : boostbook* ] ;
+
+ # Ubuntu Linux
+ docbook-xsl-dir ?= [ path.glob /usr/share/xml/docbook/stylesheet : nwalsh ] ;
+ docbook-dtd-dir ?= [ path.glob /usr/share/xml/docbook/schema/dtd : $(dtd-versions) ] ;
+ }
+
+ if $(docbook-xsl-dir)
+ {
+ .docbook-xsl-dir = [ path.make $(docbook-xsl-dir[1]) ] ;
+ }
+ if $(docbook-dtd-dir)
+ {
+ .docbook-dtd-dir = [ path.make $(docbook-dtd-dir[1]) ] ;
+ }
+
+ if --debug-configuration in [ modules.peek : ARGV ]
+ {
+ ECHO "notice: Boost.Book: searching XSL/DTD in" ;
+ ECHO "notice:" [ sequence.transform path.native : $(boostbook-dir) ] ;
+ }
+ local boostbook-xsl-dir ;
+ for local dir in $(boostbook-dir) {
+ boostbook-xsl-dir += [ path.glob $(dir) : xsl ] ;
+ }
+ local boostbook-dtd-dir ;
+ for local dir in $(boostbook-dir) {
+ boostbook-dtd-dir += [ path.glob $(dir) : dtd ] ;
+ }
+ .boostbook-xsl-dir = $(boostbook-xsl-dir[1]) ;
+ .boostbook-dtd-dir = $(boostbook-dtd-dir[1]) ;
+
+ if --debug-configuration in [ modules.peek : ARGV ]
+ {
+ if $(.docbook-xsl-dir)
+ {
+ ECHO "notice: Boost.Book: found docbook XSL stylesheets in:" [ path.native $(.docbook-xsl-dir) ] ;
+ }
+ if $(.docbook-dtd-dir)
+ {
+ ECHO "notice: Boost.Book: found docbook DTD in:" [ path.native $(.docbook-dtd-dir) ] ;
+ }
+ if $(.boostbook-xsl-dir)
+ {
+ ECHO "notice: Boost.Book: found boostbook XSL stylesheets in:" [ path.native $(.boostbook-xsl-dir) ] ;
+ }
+ if $(.boostbook-dtd-dir)
+ {
+ ECHO "notice: Boost.Book: found boostbook DTD in:" [ path.native $(.boostbook-dtd-dir) ] ;
+ }
+ }
+
+ if ! $(.boostbook-xsl-dir) || ! $(.boostbook-dtd-dir)
+ {
+ errors.warning
+ "couldn't find BoostBook xsl or dtd directories;"
+ : please set \"BOOST_ROOT\" variable to the root directory of
+ your boost installation. Searched in:
+ : $(boostbook-dir:J="
+") ;
+ }
+}
+
 rule xsl-dir
 {
   return $(.boostbook-xsl-dir) ;
@@ -205,6 +315,28 @@
   xslt $(target) : $(source) $(stylesheet) : $(properties) ;
 }
 
+rule format-catalog-path ( path )
+{
+ local result = $(path) ;
+ if [ xsltproc.is-cygwin ]
+ {
+ if [ os.name ] = NT
+ {
+ drive = [ MATCH ^/(.):(.*)$ : $(path) ] ;
+ result = /cygdrive/$(drive[1])$(drive[2]) ;
+ }
+ }
+ else
+ {
+ if [ os.name ] = CYGWIN
+ {
+ local native-path = [ path.native $(path) ] ;
+ result = [ path.make $(native-path:W) ] ;
+ }
+ }
+ return [ regex.replace $(result) " " "%20" ] ;
+}
+
 rule generate-xml-catalog ( target : sources * : properties * )
 {
   print.output $(target) ;
@@ -213,7 +345,7 @@
   local boostbook-dtd-dir = [ boostbook.dtd-dir ] ;
   if $(boostbook-dtd-dir)
   {
- boostbook-dtd-dir = [ regex.replace $(boostbook-dtd-dir) " " "%20" ] ;
+ boostbook-dtd-dir = [ format-catalog-path $(boostbook-dtd-dir) ] ;
   }
     
   print.text
@@ -238,7 +370,7 @@
   }
   else
   {
- docbook-xsl-dir = [ regex.replace $(docbook-xsl-dir) " " "%20" ] ;
+ docbook-xsl-dir = [ format-catalog-path $(docbook-xsl-dir) ] ;
     print.text " <rewriteURI uriStartString=\"http://docbook.sourceforge.net/release/xsl/current/\" rewritePrefix=\"file://$(docbook-xsl-dir)/\"/>" ;
   }
 
@@ -255,7 +387,7 @@
   }
   else
   {
- docbook-dtd-dir = [ regex.replace $(docbook-dtd-dir) " " "%20" ] ;
+ docbook-dtd-dir = [ format-catalog-path $(docbook-dtd-dir) ] ;
     print.text " <rewriteURI uriStartString=\"http://www.oasis-open.org/docbook/xml/4.2/\" rewritePrefix=\"file://$(docbook-dtd-dir)/\"/>" ;
   }
 

Modified: branches/release/tools/build/v2/tools/como-win.jam
==============================================================================
--- branches/release/tools/build/v2/tools/como-win.jam (original)
+++ branches/release/tools/build/v2/tools/como-win.jam 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -110,8 +110,8 @@
     $(CONFIG_COMMAND) -c -e5 --no_version --no_prelink_verbose --display_error_number --long_long --diag_suppress=9,21,161,748,940,962 --diag_error=461 -D__STL_LONG_LONG -U$(UNDEFS) -D$(DEFINES) $(WARN) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I"$(STDHDRS)" -I"$(SYSHDRS)" -o "$(<)" "$(>)"
 }
 
-actions updated together piecemeal archive
+actions archive
 {
- $(CONFIG_COMMAND) --no_version --no_prelink_verbose --prelink_object "$(>)"
- lib $(ARFLAGS) /nologo /out:"$(<:S=.lib)" "$(>)"
+ $(CONFIG_COMMAND) --no_version --no_prelink_verbose --prelink_object @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
+ lib $(ARFLAGS) /nologo /out:"$(<:S=.lib)" @"@($(<[1]:W).rsp:E=$(nl)"$(>)")"
 }

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 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -3,7 +3,7 @@
 # Copyright 2003, 2004, 2005, 2006 Vladimir Prus
 # Copyright 2005-2007 Mat Marcus
 # Copyright 2005-2007 Adobe Systems Incorporated
-# Copyright 2007-2009 Rene Rivera
+# Copyright 2007-2010 Rene Rivera
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 
@@ -30,6 +30,9 @@
 ## The minimal MacOSX version to target.
 feature macosx-version-min : : propagated optional ;
 
+## A dependency, that is forced to be included in the link.
+feature force-load : : free dependency incidental ;
+
 #############################################################################
 
 if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
@@ -262,9 +265,9 @@
             case mac* :
             {
                 flags darwin.compile OPTIONS <macosx-version-min>$(version-feature)
- : -miphoneos-version-min=$(version[2-]:J=.) ;
+ : -mmacosx-version-min=$(version[2-]:J=.) ;
                 flags darwin.link OPTIONS <macosx-version-min>$(version-feature)
- : -miphoneos-version-min=$(version[2-]:J=.) ;
+ : -mmacosx-version-min=$(version[2-]:J=.) ;
             }
         }
         
@@ -484,6 +487,9 @@
 # Add the framework names to use.
 flags darwin.link FRAMEWORK <framework> ;
 
+#
+flags darwin.link FORCE_LOAD <force-load> ;
+
 # This is flag is useful for debugging the link step
 # uncomment to see what libtool is doing under the hood
 #~ flags darwin.link.dll OPTIONS : -Wl,-v ;
@@ -511,6 +517,7 @@
 
 rule link ( targets * : sources * : properties * )
 {
+ DEPENDS $(targets) : [ on $(targets) return $(FORCE_LOAD) ] ;
     setup-address-model $(targets) : $(sources) : $(properties) ;
     prepare-framework-path $(<) ;
 }
@@ -519,9 +526,9 @@
 # binaries, at least on OS X 10.5.5, see:
 # http://svn.boost.org/trac/boost/ticket/2347
 # So we pass -S -x.
-actions link bind LIBRARIES
+actions link bind LIBRARIES FORCE_LOAD
 {
- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(FRAMEWORK_PATH) -framework$(_)$(FRAMEWORK:D=:S=) $(OPTIONS) $(USER_OPTIONS)
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -o "$(<)" "$(>)" -Wl,-force_load$(_)"$(FORCE_LOAD)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(FRAMEWORK_PATH) -framework$(_)$(FRAMEWORK:D=:S=) $(OPTIONS) $(USER_OPTIONS)
     $(NEED_STRIP)"$(.STRIP)" $(NEED_STRIP)-S $(NEED_STRIP)-x $(NEED_STRIP)"$(<)"
 }
 

Modified: branches/release/tools/build/v2/tools/doxygen.jam
==============================================================================
--- branches/release/tools/build/v2/tools/doxygen.jam (original)
+++ branches/release/tools/build/v2/tools/doxygen.jam 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -37,6 +37,7 @@
 import common ;
 import modules ;
 import project ;
+import utility ;
 
 
 # Use to specify extra configuration paramters. These get translated
@@ -64,6 +65,9 @@
 # Location for images when generating XML
 feature.feature doxygen:xml-imagedir : : free ;
 
+# Indicates whether the entire directory should be deleted
+feature.feature doxygen.rmdir : off on : optional incidental ;
+
 # Doxygen configuration input file.
 type.register DOXYFILE : doxyfile ;
 
@@ -140,6 +144,11 @@
             ECHO "notice:" using doxygen ":" $(.doxygen) ;
         }
 
+ if [ .is-cygwin ]
+ {
+ .is-cygwin = true ;
+ }
+
         .doxproc = [ modules.binding $(__name__) ] ;
         .doxproc = $(.doxproc:D)/doxproc.py ;
 
@@ -170,6 +179,22 @@
     return $(.doxygen) ;
 }
 
+rule .is-cygwin ( )
+{
+ if [ os.on-windows ]
+ {
+ local file = [ path.make [ modules.binding $(__name__) ] ] ;
+ local dir = [ path.native
+ [ path.join [ path.parent $(file) ] doxygen ] ] ;
+ local command =
+ "cd \"$(dir)\" && \"$(.doxygen)\" windows-paths-check.doxyfile 2>&1" ;
+ result = [ SHELL $(command) ] ;
+ if [ MATCH "(Parsing file /)" : $(result) ]
+ {
+ return true ;
+ }
+ }
+}
 
 # Runs Doxygen on the given Doxygen configuration file (the source) to generate
 # the Doxygen files. The output is dumped according to the settings in the
@@ -192,6 +217,48 @@
 }
 
 
+rule translate-path ( path )
+{
+ if [ os.on-windows ]
+ {
+ if [ os.name ] = CYGWIN
+ {
+ if $(.is-cygwin)
+ {
+ return $(path) ;
+ }
+ else
+ {
+ return $(path:W) ;
+ }
+ }
+ else
+ {
+ if $(.is-cygwin)
+ {
+ match = [ MATCH ^(.):(.*) : $(path) ] ;
+ if $(match)
+ {
+ return /cygdrive/$(match[1])$(match[2]:T) ;
+ }
+ else
+ {
+ return $(path:T) ;
+ }
+ }
+ else
+ {
+ return $(path) ;
+ }
+ }
+ }
+ else
+ {
+ return $(path) ;
+ }
+}
+
+
 # Generates a doxygen configuration file (doxyfile) given a set of C++ sources
 # and a property list that may contain <doxygen:param> features.
 #
@@ -205,20 +272,30 @@
     for local param in [ feature.get-values <doxygen:param> : $(properties) ]
     {
         local namevalue = [ regex.match ([^=]*)=(.*) : $(param) ] ;
- text += "$(namevalue[1]) = $(namevalue[2])" ;
         if $(namevalue[1]) = OUTPUT_DIRECTORY
         {
- output-dir = "$(namevalue[2])" ;
+ output-dir = [ translate-path
+ [ utility.unquote $(namevalue[2]) ] ] ;
+ text += "OUTPUT_DIRECTORY = \"$(output-dir)\"" ;
+ }
+ else
+ {
+ text += "$(namevalue[1]) = $(namevalue[2])" ;
         }
     }
 
     if ! $(output-dir)
     {
- output-dir = [ on $(target) return $(LOCATE) ] ;
+ output-dir = [ translate-path [ on $(target) return $(LOCATE) ] ] ;
         text += "OUTPUT_DIRECTORY = \"$(output-dir)\"" ;
     }
 
- local headers = \"$(sources:G=)\" ;
+ local headers = ;
+ for local header in $(sources:G=)
+ {
+ header = [ translate-path $(header) ] ;
+ headers += \"$(header)\" ;
+ }
 
     # Doxygen generates LaTex by default. So disable it unconditionally, or at
     # least until someone needs, and hence writes support for, LaTex output.
@@ -234,6 +311,24 @@
 #
 rule run ( target : source : properties * )
 {
+ if <doxygen.rmdir>on in $(properties)
+ {
+ local output-dir =
+ [ path.make
+ [ MATCH <doxygen:param>OUTPUT_DIRECTORY=\"?([^\"]*) :
+ $(properties) ] ] ;
+ local html-dir =
+ [ path.make
+ [ MATCH <doxygen:param>HTML_OUTPUT=(.*) :
+ $(properties) ] ] ;
+ if $(output-dir) && $(html-dir) &&
+ [ path.glob $(output-dir) : $(html-dir) ]
+ {
+ HTMLDIR on $(target) =
+ [ path.native [ path.join $(output-dir) $(html-dir) ] ] ;
+ rm-htmldir $(target) ;
+ }
+ }
     doxygen-action $(target) : $(source) ;
     NAME on $(target) = $(.doxygen) ;
     RM on $(target) = [ modules.peek common : RM ] ;
@@ -245,6 +340,19 @@
                 *.xml ] ] ;
 }
 
+if [ os.name ] = NT
+{
+ RMDIR = rmdir /s /q ;
+}
+else
+{
+ RMDIR = rm -rf ;
+}
+
+actions quietly rm-htmldir
+{
+ $(RMDIR) $(HTMLDIR)
+}
 
 # The rules below require Boost.Book stylesheets, so we need some code to check
 # that the boostbook module has actualy been initialized.
@@ -355,10 +463,29 @@
     local directory = [ path.native
                         [ feature.get-values <doxygen:xml-imagedir> :
                           $(requirements) ] ] ;
+
+ local location = [ on $(target) return $(LOCATE) ] ;
+
+ local pdf-location =
+ [ path.native
+ [ path.join
+ [ path.make $(location) ]
+ [ path.make $(directory) ] ] ] ;
+ local html-location =
+ [ path.native
+ [ path.join
+ .
+ html
+ [ path.make $(directory) ] ] ] ;
+
+ common.MkDir $(pdf-location) ;
+ common.MkDir $(html-location) ;
+
+ DEPENDS $(target) : $(pdf-location) $(html-location) ;
+
     if [ os.name ] = NT
     {
         CP on $(target) = copy /y ;
- MKDIR on $(target) = mkdir ;
         FROM on $(target) = \\*.png ;
         TOHTML on $(target) = .\\html\\$(directory) ;
         TOPDF on $(target) = \\$(directory) ;
@@ -366,7 +493,6 @@
     else
     {
         CP on $(target) = cp ;
- MKDIR on $(target) = mkdir -p ;
         FROM on $(target) = /*.png ;
         TOHTML on $(target) = ./html/$(directory) ;
         TOPDF on $(target) = $(target:D)/$(directory) ;
@@ -375,8 +501,6 @@
 
 actions copy-latex-pngs
 {
- $(MKDIR) $(TOHTML)
- $(MKDIR) $(<:D)$(TOPDF)
     $(CP) $(>:S=)$(FROM) $(TOHTML)
     $(CP) $(>:S=)$(FROM) $(<:D)$(TOPDF)
     echo "Stamped" > "$(<)"
@@ -520,6 +644,8 @@
             [ new typed-target $(target:S=.dir) : $(project) : DOXYGEN_HTML_MULTIFILE
                 : $(target:S=.tag)
                 : [ targets.main-target-requirements $(requirements)
+ <doxygen:param>"OUTPUT_DIRECTORY=\"$(output-dir-native)\""
+ <doxygen:param>HTML_OUTPUT=$(target:B)
                     : $(project) ]
                 : [ targets.main-target-default-build $(default-build) : $(project) ]
                 ] ;
@@ -549,6 +675,7 @@
         {
             doxygen $(target).doxygen-xml-images.html : $(sources)
                 : $(requirements)
+ <doxygen.rmdir>on
                   <doxygen:param>QUIET=YES
                   <doxygen:param>WARNINGS=NO
                   <doxygen:param>WARN_IF_UNDOCUMENTED=NO

Modified: branches/release/tools/build/v2/tools/mpi.jam
==============================================================================
--- branches/release/tools/build/v2/tools/mpi.jam (original)
+++ branches/release/tools/build/v2/tools/mpi.jam 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -336,6 +336,65 @@
       compile_flags = [ SHELL "$(command) -compile_info" ] ;
       link_flags = [ SHELL "$(command) -link_info" ] ;
     }
+ # Sun HPC and Ibm POE
+ else if [ SHELL "$(command) -v 2>/dev/null" ]
+ {
+ compile_flags = [ SHELL "$(command) -c -v -xtarget=native64 2>/dev/null" ] ;
+
+ local back = [ MATCH "--------------------(.*)" : $(compile_flags) ] ;
+ if $(back)
+ {
+ # Sun HPC
+ if $(.debug-configuration)
+ {
+ ECHO "Found Sun MPI wrapper compiler: $(command)" ;
+ }
+
+ compile_flags = [ MATCH "(.*)--------------------" : $(back) ] ;
+ compile_flags = [ MATCH "(.*)-v" : $(compile_flags) ] ;
+ link_flags = [ SHELL "$(command) -v -xtarget=native64 2>/dev/null" ] ;
+ link_flags = [ MATCH "--------------------(.*)" : $(link_flags) ] ;
+ link_flags = [ MATCH "(.*)--------------------" : $(link_flags) ] ;
+
+ # strip out -v from compile options
+ local front = [ MATCH "(.*)-v" : $(link_flags) ] ;
+ local back = [ MATCH "-v(.*)" : $(link_flags) ] ;
+ link_flags = "$(front) $(back)" ;
+ front = [ MATCH "(.*)-xtarget=native64" : $(link_flags) ] ;
+ back = [ MATCH "-xtarget=native64(.*)" : $(link_flags) ] ;
+ link_flags = "$(front) $(back)" ;
+ }
+ else
+ {
+ # Ibm POE
+ if $(.debug-configuration)
+ {
+ ECHO "Found IBM MPI wrapper compiler: $(command)" ;
+ }
+
+ #
+ compile_flags = [ SHELL "$(command) -c -v 2>/dev/null" ] ;
+ compile_flags = [ MATCH "(.*)exec: export.*" : $(compile_flags) ] ;
+ local front = [ MATCH "(.*)-v" : $(compile_flags) ] ;
+ local back = [ MATCH "-v(.*)" : $(compile_flags) ] ;
+ compile_flags = "$(front) $(back)" ;
+ front = [ MATCH "(.*)-c" : $(compile_flags) ] ;
+ back = [ MATCH "-c(.*)" : $(compile_flags) ] ;
+ compile_flags = "$(front) $(back)" ;
+ link_flags = $(compile_flags) ;
+
+ # get location of mpif.h from mpxlf
+ local f_flags = [ SHELL "mpxlf -v 2>/dev/null" ] ;
+ f_flags = [ MATCH "(.*)exec: export.*" : $(f_flags) ] ;
+ front = [ MATCH "(.*)-v" : $(f_flags) ] ;
+ back = [ MATCH "-v(.*)" : $(f_flags) ] ;
+ f_flags = "$(front) $(back)" ;
+ f_flags = [ MATCH "xlf_r(.*)" : $(f_flags) ] ;
+ f_flags = [ MATCH "-F:mpxlf_r(.*)" : $(f_flags) ] ;
+ compile_flags = [ strip-eol $(compile_flags) ] ;
+ compile_flags = "$(compile_flags) $(f_flags)" ;
+ }
+ }
 
     if $(result) || $(compile_flags) && $(link_flags)
     {
@@ -493,6 +552,9 @@
     local num_processes = [ property.select <mpi:processes> : $(properties) ] ;
     num_processes = $(num_processes:G=) ;
 
+ # serialize the MPI tests to avoid overloading systems
+ JAM_SEMAPHORE on $(target) = <s>mpi-run-semaphore ;
+
     # We launch MPI processes using the "mpirun" equivalent specified by the user.
     LAUNCHER on $(target) =
       [ on $(target) return $(.mpirun) $(.mpirun_flags) $(num_processes) ] ;

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 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -205,12 +205,12 @@
 local rule get-library-name ( path )
 {
     # Path is in normalized form, so all slashes are forward.
- local match1 = [ MATCH /libs/(.*)/(test|example) : $(path) ] ;
- local match2 = [ MATCH /libs/(.*)$ : $(path) ] ;
+ local match1 = [ MATCH /(tools|libs)/(.*)/(test|example) : $(path) ] ;
+ local match2 = [ MATCH /(tools|libs)/(.*)$ : $(path) ] ;
     local match3 = [ MATCH (/status$) : $(path) ] ;
 
- if $(match1) { return $(match1[0]) ; }
- else if $(match2) { return $(match2[0]) ; }
+ if $(match1) { return $(match1[2]) ; }
+ else if $(match2) { return $(match2[2]) ; }
     else if $(match3) { return "" ; }
     else if --dump-tests in [ modules.peek : ARGV ]
     {

Modified: branches/release/tools/build/v2/tools/xsltproc.jam
==============================================================================
--- branches/release/tools/build/v2/tools/xsltproc.jam (original)
+++ branches/release/tools/build/v2/tools/xsltproc.jam 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -13,6 +13,9 @@
 import regex ;
 import sequence ;
 import common ;
+import os ;
+import modules ;
+import path ;
 
 feature.feature xsl:param : : free ;
 feature.feature xsl:path : : free ;
@@ -31,11 +34,42 @@
 
     if ! $(.initialized)
     {
- $(.initialized) = true ;
+ .initialized = true ;
         .xsltproc = $(xsltproc) ;
+ .is-cygwin = [ .is-cygwin $(xsltproc:E=xsltproc) ] ;
     }
 }
 
+# Returns a non-empty string if a cygwin xsltproc binary was specified.
+rule is-cygwin ( )
+{
+ if ! $(.initialized)
+ {
+ init ;
+ }
+ return $(.is-cygwin) ;
+}
+
+rule .is-cygwin ( xsltproc )
+{
+ if [ os.on-windows ]
+ {
+ local file = [ path.make [ modules.binding $(__name__) ] ] ;
+ local dir = [ path.native
+ [ path.join [ path.parent $(file) ] xsltproc ] ] ;
+ if [ os.name ] = CYGWIN
+ {
+ dir = $(dir:W) ;
+ }
+ local command =
+ "\"$(xsltproc)\" \"$(dir)\\test.xsl\" \"$(dir)\\test.xml\" 2>&1" ;
+ local status = [ SHELL $(command) : no-output : exit-status ] ;
+ if $(status[2]) != "0"
+ {
+ return true ;
+ }
+ }
+}
 
 rule compute-xslt-flags ( target : properties * )
 {
@@ -72,7 +106,7 @@
 
     for local dir in $(implicit-target-directories)
     {
- flags += --path \"$(dir)\" ;
+ flags += --path \"$(dir:T)\" ;
     }
 
     return $(flags) ;
@@ -87,7 +121,12 @@
 
     for local catalog in [ feature.get-values <catalog> : $(properties) ]
     {
- CATALOG = [ common.variable-setting-command XML_CATALOG_FILES : $(catalog) ] ;
+ CATALOG = [ common.variable-setting-command XML_CATALOG_FILES : $(catalog:T) ] ;
+ }
+
+ if [ os.on-windows ] && ! [ is-cygwin ]
+ {
+ action = $(action).windows ;
     }
 
     $(action) $(target) : $(source) ;
@@ -105,14 +144,25 @@
     return [ .xsltproc $(target) : $(source) $(stylesheet) : $(properties) : $(dirname) : xslt-xsltproc-dir ] ;
 }
 
+actions xslt-xsltproc.windows
+{
+ $(CATALOG) "$(NAME:E=xsltproc)" $(FLAGS) --xinclude -o "$(<)" "$(STYLESHEET:W)" "$(>:W)"
+}
+
 
 actions xslt-xsltproc bind STYLESHEET
 {
- $(CATALOG) "$(NAME:E=xsltproc)" $(FLAGS) --xinclude -o "$(<)" "$(STYLESHEET)" "$(>)"
+ $(CATALOG) "$(NAME:E=xsltproc)" $(FLAGS) --xinclude -o "$(<)" "$(STYLESHEET:T)" "$(>:T)"
+}
+
+
+actions xslt-xsltproc-dir.windows bind STYLESHEET
+{
+ $(CATALOG) "$(NAME:E=xsltproc)" $(FLAGS) --xinclude -o "$(<:D)/" "$(STYLESHEET:W)" "$(>:W)"
 }
 
 
 actions xslt-xsltproc-dir bind STYLESHEET
 {
- $(CATALOG) "$(NAME:E=xsltproc)" $(FLAGS) --xinclude -o "$(<:D)/" "$(STYLESHEET)" "$(>)"
+ $(CATALOG) "$(NAME:E=xsltproc)" $(FLAGS) --xinclude -o "$(<:D)/" "$(STYLESHEET:T)" "$(>:T)"
 }

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 2010-07-12 03:37:43 EDT (Mon, 12 Jul 2010)
@@ -12,6 +12,9 @@
 import numbers ;
 import string ;
 import regex ;
+import "class" ;
+import scanner ;
+import path ;
 
 # The current output target. Defaults to console.
 output-target = console ;
@@ -341,6 +344,11 @@
         text-content on $(output-target) = ;
         
         text-action $(output-target) ;
+
+ if $(overwrite) && $(output-target) != console
+ {
+ check-for-update $(output-target) ;
+ }
     }
     $(output-target).text-$(prefix-body-suffix) += $(strings) ;
     text-content on $(output-target) =
@@ -394,6 +402,72 @@
 }
 
 
+rule get-scanner ( )
+{
+ if ! $(.scanner)
+ {
+ .scanner = [ class.new print-scanner ] ;
+ }
+ return $(.scanner) ;
+}
+
+
+# The following code to update print targets when their contents
+# change is a horrible hack. It basically creates a target which
+# binds to this file (print.jam) and installs a scanner on it
+# which reads the target and compares its contents to the new
+# contents that we're writing.
+#
+rule check-for-update ( target )
+{
+ local scanner = [ get-scanner ] ;
+ local file = [ path.native [ modules.binding $(__name__) ] ] ;
+ local g = [ MATCH <(.*)> : $(target:G) ] ;
+ local dependency-target = $(__file__:G=$(g)-$(target:G=)-$(scanner)) ;
+ DEPENDS $(target) : $(dependency-target) ;
+ SEARCH on $(dependency-target) = $(file:D) ;
+ ISFILE $(dependency-target) ;
+ NOUPDATE $(dependency-target) ;
+ base on $(dependency-target) = $(target) ;
+ scanner.install $(scanner) : $(dependency-target) none ;
+ return $(dependency-target) ;
+}
+
+
+class print-scanner : scanner
+{
+ import path ;
+ import os ;
+
+ rule pattern ( )
+ {
+ return "(One match...)" ;
+ }
+
+ rule process ( target : matches * : binding )
+ {
+ local base = [ on $(target) return $(base) ] ;
+ local nl = [ on $(base) return $(nl) ] ;
+ local text-content = [ on $(base) return $(text-content) ] ;
+ local dir = [ path.make [ on $(base) return $(LOCATE) ] ] ;
+ local file = [ path.native [ path.join $(dir) $(base:G=) ] ] ;
+ local actual-content ;
+ if [ os.name ] = NT
+ {
+ actual-content = [ SHELL "type \"$(file)\" 2>nul" ] ;
+ }
+ else
+ {
+ actual-content = [ SHELL "cat \"$(file)\" 2>/dev/null" ] ;
+ }
+ if $(text-content:J=$(nl)) != $(actual-content)
+ {
+ ALWAYS $(base) ;
+ }
+ }
+}
+
+
 rule __test__ ( )
 {
     import assert ;


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