mirror of
https://github.com/boostorg/build.git
synced 2026-02-14 00:32:11 +00:00
Refactorings.
* new/targets.jam
(main-target.apply-default-build): Call
'build-request.expand-no-defaults', not 'expand'. The motivation
is to have defaults added in one place: 'property-set.add-defaults'.
Also handle the case where default-build is empty.
(main-target.generate): Apply defaults here. The motivation is
that if we're using default build, default features should be
applied here as well, or else we'll get ambiguous alternatives.
(basic-target.generate): Do not add defaults.
[SVN r17755]
This commit is contained in:
@@ -297,16 +297,23 @@ rule main-target ( name : project )
|
||||
|
||||
|
||||
rule apply-default-build ( property-set )
|
||||
{
|
||||
{
|
||||
local result ;
|
||||
if ! [ $(property-set).raw ]
|
||||
{
|
||||
properties = [ build-request.expand $(self.default-build) ] ;
|
||||
properties = [ build-request.expand-no-defaults $(self.default-build) ] ;
|
||||
|
||||
for local p in $(properties)
|
||||
{
|
||||
result += [ property-set.create [ feature.split $(p) ] ] ;
|
||||
if $(properties)
|
||||
{
|
||||
for local p in $(properties)
|
||||
{
|
||||
result += [ property-set.create [ feature.split $(p) ] ] ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result = [ property-set.empty ] ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -332,9 +339,9 @@ rule main-target ( name : project )
|
||||
local result ;
|
||||
for local p in $(all-property-sets)
|
||||
{
|
||||
result += [ generate-really $(p) ] ;
|
||||
result += [ generate-really [ $(p).add-defaults ] ] ;
|
||||
}
|
||||
return $(result) ;
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
local rule generate-really ( property-set )
|
||||
@@ -527,10 +534,6 @@ rule basic-target ( name : project
|
||||
# come from dependencies, the value is not target id, but rather
|
||||
# virtual target names, so generators.construct can use them.
|
||||
|
||||
# defaults should be added as soon as possible. For example, conditionals
|
||||
# might have "<variant>debug:..." and won't work if defaults are not
|
||||
# applied.
|
||||
rproperties = [ $(rproperties).add-defaults ] ;
|
||||
rproperties = [ $(rproperties).evaluate-conditionals ] ;
|
||||
|
||||
rproperties =
|
||||
|
||||
Reference in New Issue
Block a user