mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
Cleaned up several internal Boost Build modules a bit.
[SVN r48332]
This commit is contained in:
@@ -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 )
|
||||
|
||||
@@ -252,8 +252,8 @@ class property-set
|
||||
{
|
||||
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 @@ 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
|
||||
|
||||
@@ -91,13 +91,15 @@ class install-target-class : basic-target
|
||||
# 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>) ;
|
||||
|
||||
Reference in New Issue
Block a user