diff --git a/new/borland.jam b/new/borland.jam index 353a51f92..bba76aba7 100644 --- a/new/borland.jam +++ b/new/borland.jam @@ -49,7 +49,6 @@ toolset.flags borland.link FINDLIBS-ST ; toolset.flags borland.link FINDLIBS-SA ; toolset.flags borland.link LIBRARIES ; toolset.flags borland.link LIBRARIES ; -toolset.flags gcc.link-dll LINKPATH ; actions link bind LIBRARIES { diff --git a/new/toolset.jam b/new/toolset.jam index f5f0292e7..e89ffe3d4 100644 --- a/new/toolset.jam +++ b/new/toolset.jam @@ -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=) { diff --git a/v2/borland.jam b/v2/borland.jam index 353a51f92..bba76aba7 100644 --- a/v2/borland.jam +++ b/v2/borland.jam @@ -49,7 +49,6 @@ toolset.flags borland.link FINDLIBS-ST ; toolset.flags borland.link FINDLIBS-SA ; toolset.flags borland.link LIBRARIES ; toolset.flags borland.link LIBRARIES ; -toolset.flags gcc.link-dll LINKPATH ; actions link bind LIBRARIES { diff --git a/v2/build/toolset.jam b/v2/build/toolset.jam index f5f0292e7..e89ffe3d4 100644 --- a/v2/build/toolset.jam +++ b/v2/build/toolset.jam @@ -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=) {