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

Don't allow a toolset module to set flags for other module.

[SVN r17085]
This commit is contained in:
Vladimir Prus
2003-01-30 10:24:55 +00:00
parent a3f42a2183
commit ff3c854c57
4 changed files with 18 additions and 2 deletions

View File

@@ -49,7 +49,6 @@ toolset.flags borland.link FINDLIBS-ST <find-static-library> ;
toolset.flags borland.link FINDLIBS-SA <find-shared-library> ;
toolset.flags borland.link LIBRARIES <library-file> ;
toolset.flags borland.link LIBRARIES <library> ;
toolset.flags gcc.link-dll LINKPATH <library-path> ;
actions link bind LIBRARIES
{

View File

@@ -48,6 +48,8 @@ rule flags ( rule-or-module # If contains dot, should be a rule name.
# If does not contain dot, should be a module name.
# The flags will be applied for all rules in that
# module.
# If module for rule is different from the calling
# module, an error is issued.
variable-name # Variable that should be set on target
condition * : # Can specify either
@@ -69,6 +71,13 @@ rule flags ( rule-or-module # If contains dot, should be a rule name.
# unconditionally
values * )
{
local module_ = [ MATCH "([^.]*).*" : $(rule-or-module) ] ;
local caller = [ CALLER_MODULE ] ;
if $(module_) != $(caller)
{
errors.error "Module $(caller) attempted to set flags for module $(module_)" ;
}
local match-type ;
if $(condition[1]:G=)
{

View File

@@ -49,7 +49,6 @@ toolset.flags borland.link FINDLIBS-ST <find-static-library> ;
toolset.flags borland.link FINDLIBS-SA <find-shared-library> ;
toolset.flags borland.link LIBRARIES <library-file> ;
toolset.flags borland.link LIBRARIES <library> ;
toolset.flags gcc.link-dll LINKPATH <library-path> ;
actions link bind LIBRARIES
{

View File

@@ -48,6 +48,8 @@ rule flags ( rule-or-module # If contains dot, should be a rule name.
# If does not contain dot, should be a module name.
# The flags will be applied for all rules in that
# module.
# If module for rule is different from the calling
# module, an error is issued.
variable-name # Variable that should be set on target
condition * : # Can specify either
@@ -69,6 +71,13 @@ rule flags ( rule-or-module # If contains dot, should be a rule name.
# unconditionally
values * )
{
local module_ = [ MATCH "([^.]*).*" : $(rule-or-module) ] ;
local caller = [ CALLER_MODULE ] ;
if $(module_) != $(caller)
{
errors.error "Module $(caller) attempted to set flags for module $(module_)" ;
}
local match-type ;
if $(condition[1]:G=)
{