2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

Fix glob excludes in subdirectories.

Thanks to Norbert Unterberg for the bug report.


[SVN r39103]
This commit is contained in:
Vladimir Prus
2007-09-01 20:28:42 +00:00
parent 79e71a3d0c
commit 02a6e3ad65
2 changed files with 35 additions and 0 deletions

View File

@@ -143,5 +143,38 @@ exe a : [ glob $(pwd)/src/foo/*.cpp $(pwd)/src/bar/*.cpp ] ../d2/d//l ;
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()

View File

@@ -243,7 +243,9 @@ rule glob ( dirs * : patterns + : exclude-patterns * )
}
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) ] ] ;