From e5e7ef7f779ea012fec03564f13c7f4a667e2f27 Mon Sep 17 00:00:00 2001 From: Roland Schwarz Date: Fri, 2 Nov 2007 07:42:49 +0000 Subject: [PATCH] changed translate-indirect to skip rules, that are already in indirect format. This allows e.g. to make use of the - to remove already set tag feature. [SVN r40676] --- src/build/property.jam | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/build/property.jam b/src/build/property.jam index d8971cf4a..1abc3043a 100644 --- a/src/build/property.jam +++ b/src/build/property.jam @@ -455,19 +455,29 @@ rule translate-indirect ( specification * : context-module ) local m = [ MATCH ^@(.+) : $(p:G=) ] ; if $(m) { - if ! [ MATCH ".*([.]).*" : $(m) ] + local v ; + if [ MATCH "^([^%]*)%([^%]+)$" : $(m) ] { - # This is unqualified rule name. The user might want - # to set flags on this rule name, and toolset.flag - # auto-qualifies the rule name. Need to do the same - # here so set flag setting work. - # We can arrange for toolset.flag to *not* auto-qualify - # the argument, but then two rules defined in two Jamfiles - # will conflict. - m = $(context-module).$(m) ; + # Rule is already in indirect format + v = $(m) ; } - - local v = [ indirect.make $(m) : $(context-module) ] ; + else + { + if ! [ MATCH ".*([.]).*" : $(m) ] + { + # This is unqualified rule name. The user might want + # to set flags on this rule name, and toolset.flag + # auto-qualifies the rule name. Need to do the same + # here so set flag setting work. + # We can arrange for toolset.flag to *not* auto-qualify + # the argument, but then two rules defined in two Jamfiles + # will conflict. + m = $(context-module).$(m) ; + } + + v = [ indirect.make $(m) : $(context-module) ] ; + } + v = @$(v) ; result += $(v:G=$(p:G)) ; }