diff --git a/v2/build/generators.jam b/v2/build/generators.jam index 13db8de4e..6ed47bef5 100644 --- a/v2/build/generators.jam +++ b/v2/build/generators.jam @@ -298,7 +298,7 @@ class generator # 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 @@ class generator # 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 @@ class generator { 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 @@ class generator 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 @@ class generator $(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 ) diff --git a/v2/build/property-set.jam b/v2/build/property-set.jam index 366e3e661..cb2e79917 100644 --- a/v2/build/property-set.jam +++ b/v2/build/property-set.jam @@ -252,8 +252,8 @@ class property-set { if ! $(self.target-path) { - # The feature can be used to explicitly - # change the location of generated targetsv + # The feature can be used to explicitly change the + # location of generated targets. local l = [ get ] ; if $(l) { @@ -262,7 +262,7 @@ class property-set 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 diff --git a/v2/tools/stage.jam b/v2/tools/stage.jam index dee0bb446..dbfea0b84 100644 --- a/v2/tools/stage.jam +++ b/v2/tools/stage.jam @@ -91,13 +91,15 @@ class install-target-class : basic-target # for relinking. local l = [ $(build-property-set).get ] ; ps-raw += $(l:G=) ; - } - # Remove the feature on original targets. - ps-raw = [ property.change $(ps-raw) : ] ; - # And . If stage target has another stage target in sources, - # then we shall get virtual targets with property set. - ps-raw = [ property.change $(ps-raw) : ] ; + # Remove the feature on original targets. + ps-raw = [ property.change $(ps-raw) : ] ; + + # And . If stage target has another stage target in + # sources, then we shall get virtual targets with the + # property set. + ps-raw = [ property.change $(ps-raw) : ] ; + } local d = [ $(build-property-set).get ] ; ps-raw += $(d:G=) ;