Boost logo

Boost-Commit :

From: jurko.gospodnetic_at_[hidden]
Date: 2008-08-23 19:49:01


Author: jurko
Date: 2008-08-23 19:49:00 EDT (Sat, 23 Aug 2008)
New Revision: 48332
URL: http://svn.boost.org/trac/boost/changeset/48332

Log:
Cleaned up several internal Boost Build modules a bit.
Text files modified:
   trunk/tools/build/v2/build/generators.jam | 44 +++++++++++++++++++++------------------
   trunk/tools/build/v2/build/property-set.jam | 6 ++--
   trunk/tools/build/v2/tools/stage.jam | 14 +++++++-----
   3 files changed, 35 insertions(+), 29 deletions(-)

Modified: trunk/tools/build/v2/build/generators.jam
==============================================================================
--- trunk/tools/build/v2/build/generators.jam (original)
+++ trunk/tools/build/v2/build/generators.jam 2008-08-23 19:49:00 EDT (Sat, 23 Aug 2008)
@@ -298,7 +298,7 @@
         # the top-level of a transformation graph, or if their name is passed
         # explicitly. Thus, we dissallow composing generators in the middle. For
         # example, the transformation CPP -> OBJ -> STATIC_LIB -> RSP -> EXE
- # willl not be allowed as the OBJ -> STATIC_LIB generator is composing.
+ # will not be allowed as the OBJ -> STATIC_LIB generator is composing.
         if ! $(self.composing) || $(name)
         {
             run-really $(project) $(name) : $(property-set) : $(sources) ;
@@ -344,15 +344,20 @@
 
     # Constructs the dependency graph to be returned by this generator.
     #
- rule construct-result (
- consumed + # Already prepared list of consumable targets. If
- # generator requires several source files, will
- # contain exactly len $(self.source-types) targets
- # with matching types. Otherwise, might contain
- # several targets with the type of
- # $(self.source-types[1]).
+ rule construct-result
+ (
+ consumed + # Already prepared list of consumable targets.
+ # Composing generators may receive multiple sources
+ # all of which will have types matching those in
+ # $(self.source-types). Non-composing generators with
+ # multiple $(self.source-types) will receive exactly
+ # len $(self.source-types) sources with types matching
+ # those in $(self.source-types). And non-composing
+ # generators with only a single source type may
+ # receive multiple sources with all of them of the
+ # type listed in $(self.source-types).
         : project name ?
- : property-set # Properties to be used for all actions create here.
+ : property-set # Properties to be used for all actions created here.
     )
     {
         local result ;
@@ -362,16 +367,14 @@
         {
             for local r in $(consumed)
             {
- result += [ generated-targets $(r) : $(property-set) : $(project) $(name) ] ;
+ result += [ generated-targets $(r) : $(property-set) :
+ $(project) $(name) ] ;
             }
         }
- else
+ else if $(consumed)
         {
- if $(consumed)
- {
- result += [ generated-targets $(consumed) : $(property-set)
- : $(project) $(name) ] ;
- }
+ result += [ generated-targets $(consumed) : $(property-set) :
+ $(project) $(name) ] ;
         }
         return $(result) ;
     }
@@ -455,9 +458,9 @@
         return [ sequence.transform virtual-target.register : $(targets) ] ;
     }
 
- # Attempts to convert 'source' to the types that this generator can handle.
- # The intention is to produce the set of targets can should be used when the
- # generator is run.
+ # Attempts to convert 'sources' to targets of types that this generator can
+ # handle. The intention is to produce the set of targets that can be used
+ # when the generator is run.
     #
     rule convert-to-consumable-types
     (
@@ -548,7 +551,8 @@
         $(bypassed-var) += $(_bypassed) ;
     }
 
- # Converts several files to consumable types.
+ # Converts several files to consumable types. Called for composing
+ # generators only.
     #
     rule convert-multiple-sources-to-consumable-types ( project : property-set :
         sources * : consumed-var bypassed-var )

Modified: trunk/tools/build/v2/build/property-set.jam
==============================================================================
--- trunk/tools/build/v2/build/property-set.jam (original)
+++ trunk/tools/build/v2/build/property-set.jam 2008-08-23 19:49:00 EDT (Sat, 23 Aug 2008)
@@ -252,8 +252,8 @@
     {
         if ! $(self.target-path)
         {
- # The <location> feature can be used to explicitly
- # change the location of generated targetsv
+ # The <location> feature can be used to explicitly change the
+ # location of generated targets.
             local l = [ get <location> ] ;
             if $(l)
             {
@@ -262,7 +262,7 @@
             else
             {
                 local p = [ as-path ] ;
- # Really, an ugly hack. Boost regression test system requires
+ # 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
                 # teach V2 to do the things regression system requires. The

Modified: trunk/tools/build/v2/tools/stage.jam
==============================================================================
--- trunk/tools/build/v2/tools/stage.jam (original)
+++ trunk/tools/build/v2/tools/stage.jam 2008-08-23 19:49:00 EDT (Sat, 23 Aug 2008)
@@ -91,13 +91,15 @@
             # for relinking.
             local l = [ $(build-property-set).get <linkflags> ] ;
             ps-raw += $(l:G=<linkflags>) ;
- }
 
- # Remove the <tag> feature on original targets.
- ps-raw = [ property.change $(ps-raw) : <tag> ] ;
- # And <location>. If stage target has another stage target in sources,
- # then we shall get virtual targets with <location> property set.
- ps-raw = [ property.change $(ps-raw) : <location> ] ;
+ # Remove the <tag> feature on original targets.
+ ps-raw = [ property.change $(ps-raw) : <tag> ] ;
+
+ # And <location>. If stage target has another stage target in
+ # sources, then we shall get virtual targets with the <location>
+ # property set.
+ ps-raw = [ property.change $(ps-raw) : <location> ] ;
+ }
 
         local d = [ $(build-property-set).get <dependency> ] ;
         ps-raw += $(d:G=<dependency>) ;


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