|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r59862 - trunk/tools/build/v2/util
From: ghost_at_[hidden]
Date: 2010-02-24 05:27:51
Author: vladimir_prus
Date: 2010-02-24 05:27:50 EST (Wed, 24 Feb 2010)
New Revision: 59862
URL: http://svn.boost.org/trac/boost/changeset/59862
Log:
Robustify against dots in Jamfile pathnames.
Without this patch, if a Jamfile uses $(__name__).some-rule
for example as generator id, the rule would not be
actually called if Jamfile's path included a dot.
Text files modified:
trunk/tools/build/v2/util/indirect.jam | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
Modified: trunk/tools/build/v2/util/indirect.jam
==============================================================================
--- trunk/tools/build/v2/util/indirect.jam (original)
+++ trunk/tools/build/v2/util/indirect.jam 2010-02-24 05:27:50 EST (Wed, 24 Feb 2010)
@@ -51,9 +51,15 @@
else
{
frames ?= 1 ;
- # Take the first dot-separated element as module name. This disallows
- # module names with dots, but allows rule names with dots.
- local module-context = [ MATCH ^([^.]*)\\..* : $(rulename) ] ;
+ # If the rule name includes a Jamfile module, grab it.
+ local module-context = [ MATCH ^(Jamfile<[^>]*>)\\..* : $(rulename) ] ;
+
+ if ! $(module-context)
+ {
+ # Take the first dot-separated element as module name. This disallows
+ # module names with dots, but allows rule names with dots.
+ module-context = [ MATCH ^([^.]*)\\..* : $(rulename) ] ;
+ }
module-context ?= [ CALLER_MODULE $(frames) ] ;
return [ make $(rulename) $(bound-args) : $(module-context) ] ;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk