2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00

Allow prepare-target rule in toolsets, fix error reporting

[SVN r17647]
This commit is contained in:
Dave Abrahams
2003-02-25 16:25:28 +00:00
parent 13631ddc7f
commit 53836b7ca2
2 changed files with 28 additions and 4 deletions

View File

@@ -100,9 +100,11 @@ rule flags ( rule-or-module # If contains dot, should be a rule name.
}
else
{
# CONSIDER: Why setting match type and calling error?
match-type += unconditional ;
error empty value set used with unconditional match criterion ;
if ! $(values)
{
error empty value set used with unconditional match criterion ;
}
}
add-flag $(rule-or-module) : $(match-type) : $(variable-name)
: $(condition) : $(values) ;
@@ -200,6 +202,16 @@ rule set-target-variables ( rule-or-module target : properties * )
if $(module_)
{
set-target-variables $(module_) $(target) : $(properties) ;
# Allow a rule-based hook for more-sophisticated setting
# of build options than flags allows.
if prepare-target in [ RULENAMES $(module_) ]
{
module $(module_)
{
prepare-target [ modules.peek toolset : target ] : [ modules.peek toolset : properties ] ;
}
}
}
}

View File

@@ -100,9 +100,11 @@ rule flags ( rule-or-module # If contains dot, should be a rule name.
}
else
{
# CONSIDER: Why setting match type and calling error?
match-type += unconditional ;
error empty value set used with unconditional match criterion ;
if ! $(values)
{
error empty value set used with unconditional match criterion ;
}
}
add-flag $(rule-or-module) : $(match-type) : $(variable-name)
: $(condition) : $(values) ;
@@ -200,6 +202,16 @@ rule set-target-variables ( rule-or-module target : properties * )
if $(module_)
{
set-target-variables $(module_) $(target) : $(properties) ;
# Allow a rule-based hook for more-sophisticated setting
# of build options than flags allows.
if prepare-target in [ RULENAMES $(module_) ]
{
module $(module_)
{
prepare-target [ modules.peek toolset : target ] : [ modules.peek toolset : properties ] ;
}
}
}
}