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

Bugfix. Make values of path-constants into absolute paths, so that they

can be used without problems as values of path features.


[SVN r17908]
This commit is contained in:
Vladimir Prus
2003-03-14 07:50:19 +00:00
parent f5adde7477
commit a5efdf0444
4 changed files with 46 additions and 0 deletions

View File

@@ -153,6 +153,8 @@ rule project-root-object (
{
case path :
value = [ path.root [ path.native $(value) ] $(self.location) ] ;
# Now make the value absolute path
value = [ path.root $(value) [ path.pwd ] ] ;
}
if ! $(name) in $(self.constants)
{

View File

@@ -31,4 +31,25 @@ t.expect_addition("ds/a.dll")
t.run_build_system("release")
t.expect_addition("rs/a.dll")
# Test the <location> property in subprojects.
# Thanks to Kirill Lapshin for bug report.
t.write("project-root.jam", """
path-constant DIST : dist ;
""")
t.write("Jamfile", "build-project d ;")
t.write("d/Jamfile","""
exe a : a.cpp ;
stage dist : a : <location>$(DIST) ;
""")
t.write("d/a.cpp", "int main() { return 0;}\n")
t.run_build_system()
t.expect_addition("dist/a.exe")
t.rm("dist")
t.run_build_system(subdir="d")
t.expect_addition("dist/a.exe")
t.cleanup()

View File

@@ -153,6 +153,8 @@ rule project-root-object (
{
case path :
value = [ path.root [ path.native $(value) ] $(self.location) ] ;
# Now make the value absolute path
value = [ path.root $(value) [ path.pwd ] ] ;
}
if ! $(name) in $(self.constants)
{

View File

@@ -31,4 +31,25 @@ t.expect_addition("ds/a.dll")
t.run_build_system("release")
t.expect_addition("rs/a.dll")
# Test the <location> property in subprojects.
# Thanks to Kirill Lapshin for bug report.
t.write("project-root.jam", """
path-constant DIST : dist ;
""")
t.write("Jamfile", "build-project d ;")
t.write("d/Jamfile","""
exe a : a.cpp ;
stage dist : a : <location>$(DIST) ;
""")
t.write("d/a.cpp", "int main() { return 0;}\n")
t.run_build_system()
t.expect_addition("dist/a.exe")
t.rm("dist")
t.run_build_system(subdir="d")
t.expect_addition("dist/a.exe")
t.cleanup()