mirror of
https://github.com/boostorg/build.git
synced 2026-02-15 00:52:16 +00:00
Undo addition of generator.can-build. Use generator.run to get the same effect.
[SVN r34834]
This commit is contained in:
@@ -222,13 +222,6 @@ class generator
|
||||
}
|
||||
}
|
||||
|
||||
# Indicates if this generator can handle building the given target
|
||||
# combination.
|
||||
rule can-build ( target-type : property-set : sources * )
|
||||
{
|
||||
return true ;
|
||||
}
|
||||
|
||||
# Returns another generator which differers from $(self) in
|
||||
# - id
|
||||
# - value to <toolset> feature in properties
|
||||
@@ -273,6 +266,8 @@ class generator
|
||||
|
||||
# Tries to invoke this generator on the given sources. Returns a
|
||||
# list of generated targets (instances of 'virtual-target').
|
||||
# Returning nothing from run indicates that the generator was
|
||||
# unable to create the target.
|
||||
rule run ( project # Project for which the targets are generated
|
||||
name ? # Determines the name of 'name' attribute for
|
||||
# all generated targets. See 'generated-targets' method.
|
||||
@@ -937,7 +932,7 @@ local rule ensure-type ( targets * )
|
||||
#
|
||||
# Note: this algorithm explicitly ignores generators for base classes if there's
|
||||
# at least one generator for requested target-type.
|
||||
local rule find-viable-generators-aux ( target-type : property-set : sources * )
|
||||
local rule find-viable-generators-aux ( target-type : property-set )
|
||||
{
|
||||
# Select generators that can create the required target type.
|
||||
local viable-generators = ;
|
||||
@@ -991,27 +986,24 @@ local rule find-viable-generators-aux ( target-type : property-set : sources * )
|
||||
{
|
||||
generators.dout [ indent ] "trying generator" [ $(g).id ] "(" [ $(g).source-types ] -> [ $(g).target-types ] ")" ;
|
||||
|
||||
if [ $(g).can-build $(target-type) : $(property-set) : $(sources) ]
|
||||
local m = [ $(g).match-rank $(property-set) ] ;
|
||||
if $(m)
|
||||
{
|
||||
local m = [ $(g).match-rank $(property-set) ] ;
|
||||
if $(m)
|
||||
{
|
||||
generators.dout [ indent ] " is viable" ;
|
||||
viable-generators += $(g) ;
|
||||
}
|
||||
generators.dout [ indent ] " is viable" ;
|
||||
viable-generators += $(g) ;
|
||||
}
|
||||
}
|
||||
|
||||
return $(viable-generators) ;
|
||||
}
|
||||
|
||||
rule find-viable-generators ( target-type : property-set : sources * )
|
||||
rule find-viable-generators ( target-type : property-set )
|
||||
{
|
||||
local key = $(target-type).$(property-set) ;
|
||||
local l = $(.fv.$(key)) ;
|
||||
if ! $(l)
|
||||
{
|
||||
l = [ find-viable-generators-aux $(target-type) : $(property-set) : $(sources) ] ;
|
||||
l = [ find-viable-generators-aux $(target-type) : $(property-set) ] ;
|
||||
if ! $(l)
|
||||
{
|
||||
l = none ;
|
||||
@@ -1071,7 +1063,7 @@ rule find-viable-generators ( target-type : property-set : sources * )
|
||||
local rule construct-really (
|
||||
project name ? : target-type : property-set : sources * )
|
||||
{
|
||||
viable-generators = [ find-viable-generators $(target-type) : $(property-set) : $(sources) ] ;
|
||||
viable-generators = [ find-viable-generators $(target-type) : $(property-set) ] ;
|
||||
|
||||
generators.dout [ indent ] "*** " [ sequence.length $(viable-generators) ]
|
||||
" viable generators" ;
|
||||
|
||||
@@ -1350,7 +1350,7 @@ class typed-target : basic-target
|
||||
|
||||
# Are there any top-level generators for this type/property set.
|
||||
if ! [ generators.find-viable-generators
|
||||
$(self.type) : $(property-set) : $(source-targets) ]
|
||||
$(self.type) : $(property-set) ]
|
||||
{
|
||||
ECHO "error: no generators were found for type '$(self.type)'" ;
|
||||
ECHO "error: and the requested properties" ;
|
||||
@@ -1358,6 +1358,7 @@ class typed-target : basic-target
|
||||
ECHO "See http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html" ;
|
||||
|
||||
ECHO "To debug this problem, try the --debug-generators option." ;
|
||||
EXIT ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -254,8 +254,9 @@ actions compile.asm
|
||||
# since it's not supported by gcc/libc.
|
||||
class gcc-linking-generator : unix-linking-generator
|
||||
{
|
||||
rule can-build ( target-type : property-set : sources * )
|
||||
rule run ( project name ? : property-set : sources + )
|
||||
{
|
||||
#~ TODO: Replace this with the use of a target-os property.
|
||||
local no-static-link = ;
|
||||
if [ modules.peek : UNIX ]
|
||||
{
|
||||
@@ -274,7 +275,7 @@ class gcc-linking-generator : unix-linking-generator
|
||||
reason =
|
||||
"On gcc, DLL can't be build with '<runtime-link>static'." ;
|
||||
}
|
||||
else if [ type.is-derived $(target-type) EXE ]
|
||||
else if [ type.is-derived $(self.target-types[1]) EXE ]
|
||||
{
|
||||
for local s in $(sources)
|
||||
{
|
||||
@@ -290,16 +291,17 @@ class gcc-linking-generator : unix-linking-generator
|
||||
}
|
||||
if $(reason)
|
||||
{
|
||||
ECHO warn:
|
||||
ECHO warning:
|
||||
$(reason) ;
|
||||
ECHO warn:
|
||||
ECHO warning:
|
||||
"It's suggested to use '<runtime-link>static' together"
|
||||
"with the '<link>static'." ;
|
||||
return ;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true ;
|
||||
return [ unix-linking-generator.run $(project) $(name)
|
||||
: $(property-set) : $(sources) ] ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user