|
Boost-Commit : |
From: ghost_at_[hidden]
Date: 2007-09-01 16:28:44
Author: vladimir_prus
Date: 2007-09-01 16:28:42 EDT (Sat, 01 Sep 2007)
New Revision: 39103
URL: http://svn.boost.org/trac/boost/changeset/39103
Log:
Fix glob excludes in subdirectories.
Thanks to Norbert Unterberg for the bug report.
Text files modified:
trunk/tools/build/v2/test/project_glob.py | 33 +++++++++++++++++++++++++++++++++
trunk/tools/build/v2/util/path.jam | 2 ++
2 files changed, 35 insertions(+), 0 deletions(-)
Modified: trunk/tools/build/v2/test/project_glob.py
==============================================================================
--- trunk/tools/build/v2/test/project_glob.py (original)
+++ trunk/tools/build/v2/test/project_glob.py 2007-09-01 16:28:42 EDT (Sat, 01 Sep 2007)
@@ -143,5 +143,38 @@
t.run_build_system(subdir="d1")
t.expect_addition("d1/bin/$toolset/debug/a.exe")
+# Regression test: glob excludes used to be broken
+# when building from a subdirectory.
+t.rm(".")
+
+t.write("Jamroot", """
+build-project p ;
+""")
+
+t.write("p/p.c", """
+int main()
+{
+ return 0;
+}
+
+
+""")
+
+t.write("p/p_x.c", """
+int main()
+{
+ return 0;
+}
+
+""")
+
+t.write("p/Jamfile", """
+exe p :
+ [ glob *.c : p_x.c ]
+ ;
+""")
+
+t.run_build_system(subdir="p")
+t.expect_addition("p/bin/$toolset/debug/p.exe")
t.cleanup()
Modified: trunk/tools/build/v2/util/path.jam
==============================================================================
--- trunk/tools/build/v2/util/path.jam (original)
+++ trunk/tools/build/v2/util/path.jam 2007-09-01 16:28:42 EDT (Sat, 01 Sep 2007)
@@ -243,7 +243,9 @@
}
local inc = [ GLOB-RECURSIVELY $(real-patterns) ] ;
+ inc = [ sequence.transform NORMALIZE_PATH : $(inc) ] ;
local exc = [ GLOB-RECURSIVELY $(real-exclude-patterns) ] ;
+ exc = [ sequence.transform NORMALIZE_PATH : $(exc) ] ;
return [ sequence.transform path.make :
[ set.difference $(inc) : $(exc) ] ] ;
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