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

Make the 'glob' rule in the project scope to operate relatively to

the 'source-location', not project location.

Thanks to Johannes Brunen for the bug report.


[SVN r22799]
This commit is contained in:
Vladimir Prus
2004-05-12 07:38:48 +00:00
parent c2fa30eecd
commit 4235d88e10
2 changed files with 18 additions and 1 deletions

View File

@@ -600,7 +600,7 @@ module project-rules
import path ;
import project ;
local location = [ project.attribute $(__name__) location ] ;
local location = [ project.attribute $(__name__) source-location ] ;
local all-paths = [ path.glob $(location) : $(wildcards) ] ;
return $(all-paths:D="") ;
}

View File

@@ -45,5 +45,22 @@ t.rm("d2/d/bin")
t.run_build_system(subdir="d2/d")
t.expect_addition("d2/d/bin/$toolset/debug/l.dll")
# Test that when 'source-location' is explicitly-specified
# glob works relatively to source location
t.rm("d1")
t.write("d1/src/a.cpp", """
int main() { return 0; }
""")
t.write("d1/Jamfile", """
project : source-location src ;
exe a : [ glob *.cpp ] ../d2/d//l ;
""")
t.run_build_system(subdir="d1")
t.expect_addition("d1/bin/$toolset/debug/a.exe")
t.cleanup()