mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
* build/virtual-target.jam
(abstract-file-target.creating-subvariant): Renamed from 'dg', which was meaningless. [SVN r20657]
This commit is contained in:
@@ -968,16 +968,16 @@ class basic-target : abstract-target
|
||||
# is created.
|
||||
local all-targets =
|
||||
[ sequence.transform virtual-target.traverse : $(targets) ] ;
|
||||
local dg = [ new subvariant $(__name__) : $(build-request) : $(sources)
|
||||
local s = [ new subvariant $(__name__) : $(build-request) : $(sources)
|
||||
: $(rproperties) : $(usage-requirements) : $(all-targets) ] ;
|
||||
for local v in $(all-targets)
|
||||
{
|
||||
if ! [ $(v).dg ]
|
||||
if ! [ $(v).creating-subvariant ]
|
||||
{
|
||||
$(v).dg $(dg) ;
|
||||
$(v).creating-subvariant $(s) ;
|
||||
}
|
||||
}
|
||||
return $(dg) ;
|
||||
return $(s) ;
|
||||
}
|
||||
|
||||
|
||||
@@ -1035,8 +1035,8 @@ class basic-target : abstract-target
|
||||
{
|
||||
if [ $(p).link-incompatible-with $(build-request) ]
|
||||
{
|
||||
local dg = [ $(t).dg ] ;
|
||||
local other-mt = [ $(dg).main-target ] ;
|
||||
local s = [ $(t).creating-subvariant ] ;
|
||||
local other-mt = [ $(s).main-target ] ;
|
||||
ECHO "warning: targets produced from" [ $(other-mt).name ]
|
||||
"are link incompatible" ;
|
||||
ECHO "warning: with main target" [ name ] ;
|
||||
|
||||
@@ -261,22 +261,27 @@ class abstract-file-target : virtual-target
|
||||
return $(self.root) ;
|
||||
}
|
||||
|
||||
# Sets the dependency graph this target is part of.
|
||||
# 'dg' is an instance of 'subvariant-dg' class.
|
||||
rule dg ( dg ? )
|
||||
# Gets or sets the subvariant which created this target. Subvariant
|
||||
# is set when target is brought into existance, and is never changed
|
||||
# after that. In particual, if target is shared by subvariant, only
|
||||
# the first is stored.
|
||||
rule creating-subvariant ( s ? # If specified, specified the value to set,
|
||||
# which should be instance of 'subvariant'
|
||||
# class.
|
||||
)
|
||||
{
|
||||
if $(dg) && ( ! $(self.dg) && ! $(overwrite) )
|
||||
if $(s) && ( ! $(self.creating-subvariant) && ! $(overwrite) )
|
||||
{
|
||||
if $(self.dg)
|
||||
if $(self.creating-subvariant)
|
||||
{
|
||||
errors.error "Attempt to change 'dg'" ;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.dg = $(dg) ;
|
||||
self.creatin-subvariant = $(s) ;
|
||||
}
|
||||
}
|
||||
return $(self.dg) ;
|
||||
return $(self.creatin-subvariant) ;
|
||||
}
|
||||
|
||||
rule actualize-action ( target )
|
||||
@@ -830,7 +835,7 @@ rule clone-action ( action : new-project : new-action-name ? : new-properties ?
|
||||
$(cloned-target).depends $(d) ;
|
||||
}
|
||||
$(cloned-target).root [ $(target).root ] ;
|
||||
$(cloned-target).dg [ $(target).dg ] ;
|
||||
$(cloned-target).creating-subvariant [ $(target).creating-subvariant ] ;
|
||||
|
||||
cloned-targets += $(cloned-target) ;
|
||||
}
|
||||
@@ -967,7 +972,7 @@ class subvariant
|
||||
local deps = [ $(build-properties).get implicit-dependency ] ;
|
||||
for local d in $(deps)
|
||||
{
|
||||
self.other-dg += [ $(d:G=).dg ] ;
|
||||
self.other-dg += [ $(d:G=).creating-subvariant ] ;
|
||||
}
|
||||
|
||||
self.other-dg = [ sequence.unique $(self.other-dg) ] ;
|
||||
@@ -1022,7 +1027,7 @@ class subvariant
|
||||
local r ;
|
||||
for local t in $(all-targets)
|
||||
{
|
||||
r += [ $(t).dg ] ;
|
||||
r += [ $(t).creating-subvariant ] ;
|
||||
}
|
||||
r = [ sequence.unique $(r) ] ;
|
||||
for local s in $(r)
|
||||
|
||||
@@ -421,7 +421,7 @@ class lib-target-class : basic-target
|
||||
# subvariant, we add usage requirements.
|
||||
for local t in [ $(subvariant).created-targets ]
|
||||
{
|
||||
local s = [ $(t).dg ] ;
|
||||
local s = [ $(t).creating-subvariant ] ;
|
||||
if $(s) != $(subvariant)
|
||||
{
|
||||
result = [ $(result).add [ $(s).usage-requirements ] ] ;
|
||||
@@ -561,8 +561,8 @@ class compile-action : action
|
||||
# to include path.
|
||||
rule adjust-properties ( properties * )
|
||||
{
|
||||
local dg = [ $(self.targets[1]).dg ] ;
|
||||
return $(properties) [ $(dg).implicit-includes "include" ] ;
|
||||
local s = [ $(self.targets[1]).creating-subvariant ] ;
|
||||
return $(properties) [ $(s).implicit-includes "include" ] ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ class stage-target-class : basic-target
|
||||
local s ;
|
||||
for local t in $(targets)
|
||||
{
|
||||
s += [ $(t).dg ] ;
|
||||
s += [ $(t).creating-subvariant ] ;
|
||||
}
|
||||
s = [ sequence.unique $(s) ] ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user