Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54535 - trunk/tools/build/v2/build
From: ghost_at_[hidden]
Date: 2009-06-30 08:41:37


Author: vladimir_prus
Date: 2009-06-30 08:41:37 EDT (Tue, 30 Jun 2009)
New Revision: 54535
URL: http://svn.boost.org/trac/boost/changeset/54535

Log:
When starting building each metatarget, ignore active generators up the stack.

Text files modified:
   trunk/tools/build/v2/build/generators.jam | 24 ++++++++++++++++++++++--
   trunk/tools/build/v2/build/targets.jam | 2 +-
   2 files changed, 23 insertions(+), 3 deletions(-)

Modified: trunk/tools/build/v2/build/generators.jam
==============================================================================
--- trunk/tools/build/v2/build/generators.jam (original)
+++ trunk/tools/build/v2/build/generators.jam 2009-06-30 08:41:37 EDT (Tue, 30 Jun 2009)
@@ -1215,6 +1215,10 @@
         {
             viable-generators += $(g) ;
         }
+ else
+ {
+ generators.dout [ indent ] " generator " [ $(g).id ] "is active, discaring" ;
+ }
     }
 
     # Generators which override 'all'.
@@ -1320,8 +1324,20 @@
 # 'construct' in stack, returns only targets of requested 'target-type',
 # otherwise, returns also unused sources and additionally generated targets.
 #
-rule construct ( project name ? : target-type : property-set * : sources * )
+# If 'top-level' is set, does not suppress generators that are already
+# used in the stack. This may be useful in cases where a generator
+# has to build a metatargets -- for example a target corresponding to
+# built tool.
+#
+rule construct ( project name ? : target-type : property-set * : sources * : top-level ? )
 {
+ local saved-stack ;
+ if $(top-level)
+ {
+ saved-active = $(.active-generators) ;
+ .active-generators = ;
+ }
+
     if (.construct-stack)
     {
         ensure-type $(sources) ;
@@ -1348,11 +1364,15 @@
     decrease-indent ;
 
     .construct-stack = $(.construct-stack[2-]) ;
+
+ if $(top-level)
+ {
+ .active-generators = $(saved-active) ;
+ }
 
     return $(result) ;
 }
 
-
 # Given 'result', obtained from some generator or generators.construct, adds
 # 'raw-properties' as usage requirements to it. If result already contains usage
 # requirements -- that is the first element of result of an instance of the

Modified: trunk/tools/build/v2/build/targets.jam
==============================================================================
--- trunk/tools/build/v2/build/targets.jam (original)
+++ trunk/tools/build/v2/build/targets.jam 2009-06-30 08:41:37 EDT (Tue, 30 Jun 2009)
@@ -1434,7 +1434,7 @@
         local r = [ generators.construct $(self.project) $(name:S=) : $(self.type)
             : [ property-set.create [ $(property-set).raw ]
                 <main-target-type>$(self.type) ]
- : $(source-targets) ] ;
+ : $(source-targets) : true ] ;
         if ! $(r)
         {
             ECHO "warn: Unable to construct" [ full-name ] ;


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