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:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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=)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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=)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user