Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54971 - in branches/release/tools/build/v2: build doc/src tools util
From: ghost_at_[hidden]
Date: 2009-07-15 14:44:40


Author: vladimir_prus
Date: 2009-07-15 14:44:38 EDT (Wed, 15 Jul 2009)
New Revision: 54971
URL: http://svn.boost.org/trac/boost/changeset/54971

Log:
Merge from trunk
Text files modified:
   branches/release/tools/build/v2/build/project.jam | 2 +-
   branches/release/tools/build/v2/build/property-set.jam | 23 +++++++++++++++++++++--
   branches/release/tools/build/v2/doc/src/reference.xml | 29 ++++++++++++++++++++++++++---
   branches/release/tools/build/v2/tools/acc.jam | 8 ++++++--
   branches/release/tools/build/v2/tools/boostbook.jam | 2 +-
   branches/release/tools/build/v2/tools/package.jam | 12 +++++++++++-
   branches/release/tools/build/v2/util/option.jam | 28 ++++++++++++++++++----------
   7 files changed, 84 insertions(+), 20 deletions(-)

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-07-15 14:44:38 EDT (Wed, 15 Jul 2009)
@@ -1067,7 +1067,7 @@
     
     rule option ( name : value )
     {
- if $(__name__) != site-config && $(__name__) != user-config
+ if $(__name__) != site-config && $(__name__) != user-config && $(__name__) != project-config
         {
             import errors ;
             errors.error "The 'option' rule may be used only in site-config or user-config" ;

Modified: branches/release/tools/build/v2/build/property-set.jam
==============================================================================
--- branches/release/tools/build/v2/build/property-set.jam (original)
+++ branches/release/tools/build/v2/build/property-set.jam 2009-07-15 14:44:38 EDT (Wed, 15 Jul 2009)
@@ -10,7 +10,7 @@
 import property ;
 import sequence ;
 import set ;
-
+import option ;
 
 # Class for storing a set of properties.
 #
@@ -37,7 +37,7 @@
     import property ;
     import property-set ;
     import set ;
-
+
     rule __init__ ( raw-properties * )
     {
         self.raw = $(raw-properties) ;
@@ -262,6 +262,8 @@
             else
             {
                 local p = [ as-path ] ;
+ p = [ property-set.hash-maybe $(p) ] ;
+
                 # A real ugly hack. Boost regression test system requires
                 # specific target paths, and it seems that changing it to handle
                 # other directory layout is really hard. For that reason, we
@@ -460,3 +462,20 @@
     }
     return $(.empty) ;
 }
+
+if [ option.get hash : : yes ] = yes
+{
+ rule hash-maybe ( path ? )
+ {
+ path ?= "" ;
+ return [ MD5 $(path) ] ;
+ }
+}
+else
+{
+ rule hash-maybe ( path ? )
+ {
+ return $(path) ;
+ }
+}
+

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-07-15 14:44:38 EDT (Wed, 15 Jul 2009)
@@ -746,9 +746,10 @@
 
           <para>The <code>gcc</code> module supports the
           <ulink url="http://gcc.gnu.org">GNU C++ compiler</ulink>
- on Linux, a number of Unix-like system including MacOS X, SunOS and
- BeOS, and on Windows (either <ulink url="http://www.cygwin.com">Cygwin</ulink>
- or <ulink url="http://www.mingw.org">MinGW</ulink>).
+ on Linux, a number of Unix-like system including SunOS and on Windows
+ (either <ulink url="http://www.cygwin.com">Cygwin</ulink> or
+ <ulink url="http://www.mingw.org">MinGW</ulink>). On Mac OSX, it is recommended
+ to use system gcc, see <xref linkend="bbv2.reference.tools.compiler.darwin"/>.
           </para>
 
           <para>The <code>gcc</code> module is initialized using the following
@@ -811,6 +812,28 @@
 
         </section>
 
+ <section id="bbv2.reference.tools.compiler.darwin">
+
+ <title>Apple Darwin gcc</title>
+
+ <para>The <code>darwin</code> module supports the version of gcc that is
+ modified and provided by Apple. The configuration is essentially identical
+ to that of the gcc module.
+ </para>
+
+ <para>
+ <indexterm><primary>fat binaries</primary></indexterm>
+ The darwin toolset can generate so called "fat"
+ binaries&#x2014;binaries that can run support more than one
+ architecture, or address mode. To build a binary that can run both
+ on Intel and PowerPC processors, specify
+ <code>architecture=combined</code>. To build a binary that can run
+ both in 32-bit and 64-bit modes, specify
+ <code>address-model=32_64</code>. If you specify both of those
+ properties, a "4-way" fat binary will be generated.
+ </para>
+
+ </section>
 
         <section id="bbv2.reference.tools.compiler.msvc">
 

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-07-15 14:44:38 EDT (Wed, 15 Jul 2009)
@@ -66,6 +66,10 @@
 flags acc CFLAGS <address-model>64 : +DD64 ;
 flags acc LINKFLAGS <address-model>64 : +DD64 ;
 
+# It is unknown if there's separate option for rpath used only
+# at link time, similar to -rpath-link in GNU. We'll use -L.
+flags acc RPATH_LINK : <xdll-path> ;
+
 flags acc CFLAGS <cflags> ;
 flags acc C++FLAGS <cxxflags> ;
 flags acc DEFINES <define> ;
@@ -89,13 +93,13 @@
 
 actions acc.link bind NEEDLIBS
 {
- $(CONFIG_COMMAND) -AA $(LINKFLAGS) -o "$(<[1])" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS)
+ $(CONFIG_COMMAND) -AA $(LINKFLAGS) -o "$(<[1])" -L"$(RPATH_LINK)" -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS)
 }
 
 SPACE = " " ;
 actions acc.link.dll bind NEEDLIBS
 {
- $(CONFIG_COMMAND) -AA -b $(LINKFLAGS) -o "$(<[1])" -Wl,+h$(SPACE)-Wl,$(<[-1]:D=) -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS)
+ $(CONFIG_COMMAND) -AA -b $(LINKFLAGS) -o "$(<[1])" -L"$(RPATH_LINK)" -Wl,+h$(<[-1]:D=) -L$(LIBPATH) -L$(STDLIBPATH) "$(>)" "$(NEEDLIBS)" "$(NEEDLIBS)" -l$(FINDLIBS) $(OPTIONS)
 }
 
 actions acc.compile.c

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-07-15 14:44:38 EDT (Wed, 15 Jul 2009)
@@ -305,7 +305,7 @@
         generator.__init__ $(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
     }
     
- rule run ( project name ? : property-set : sources * : multiple ? )
+ rule run ( project name ? : property-set : sources * )
     {
         # Generate the catalog, but only once...
         local global-catalog = [ boostbook.xml-catalog ] ;

Modified: branches/release/tools/build/v2/tools/package.jam
==============================================================================
--- branches/release/tools/build/v2/tools/package.jam (original)
+++ branches/release/tools/build/v2/tools/package.jam 2009-07-15 14:44:38 EDT (Wed, 15 Jul 2009)
@@ -36,10 +36,20 @@
 import property ;
 import stage ;
 import targets ;
-
+import modules ;
 
 rule install ( name : requirements * : binaries * : libraries * : headers * )
 {
+ if [ MATCH --prefix=(.*) : [ modules.peek : ARGV ] ]
+ {
+ # If --prefix is explicitly specified on the command line,
+ # then we need wipe away any settings of libdir/includir that
+ # is specified via options in config files.
+ option.set bindir : ;
+ option.set libdir : ;
+ option.set includedir : ;
+ }
+
     # If <install-source-root> is not specified, all headers are installed to
     # prefix/include, no matter what their relative path is. Sometimes that is
     # what is needed.

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-07-15 14:44:38 EDT (Wed, 15 Jul 2009)
@@ -8,26 +8,34 @@
 
 # Set a value for a named option, to be used when not overridden on the command
 # line.
-rule set ( name : value )
+rule set ( name : value ? )
 {
     .option.$(name) = $(value) ;
 }
 
-rule get ( name : default-value ? )
+rule get ( name : default-value ? : implied-value ? )
 {
     local m = [ MATCH --$(name)=(.*) : [ modules.peek : ARGV ] ] ;
     if $(m)
     {
         return $(m[1]) ;
     }
- else if $(.option.$(name))
- {
- return $(.option.$(name)) ;
- }
- else
- {
- return $(default-value) ;
- }
+ else
+ {
+ m = [ MATCH (--$(name)) : [ modules.peek : ARGV ] ] ;
+ if $(m) && $(implied-value)
+ {
+ return $(implied-value) ;
+ }
+ else if $(.option.$(name))
+ {
+ return $(.option.$(name)) ;
+ }
+ else
+ {
+ return $(default-value) ;
+ }
+ }
 }
 
 


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