mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 13:22:11 +00:00
Fix a recent regression: <location>. did not work.
[SVN r26598]
This commit is contained in:
@@ -231,6 +231,12 @@ class property-set
|
||||
return $(self.as-path) ;
|
||||
}
|
||||
|
||||
# Computes the target path that should be used for
|
||||
# target with these properties.
|
||||
# Returns a list of
|
||||
# - the computed path
|
||||
# - if the path is relative to build directory, a value of
|
||||
# 'true'.
|
||||
rule target-path ( )
|
||||
{
|
||||
if ! $(self.target-path)
|
||||
@@ -253,12 +259,14 @@ class property-set
|
||||
local prefix = [ get <location-prefix> ] ;
|
||||
if $(prefix)
|
||||
{
|
||||
self.target-path = "." [ path.join $(prefix) $(p) ] ;
|
||||
self.target-path = [ path.join $(prefix) $(p) ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
self.target-path = "." $(p) ;
|
||||
self.target-path = $(p) ;
|
||||
}
|
||||
# The path is relative to build dir.
|
||||
self.target-path += true ;
|
||||
}
|
||||
}
|
||||
return $(self.target-path) ;
|
||||
|
||||
@@ -500,15 +500,14 @@ class file-target : abstract-file-target
|
||||
local p = [ $(self.action).properties ] ;
|
||||
local path = [ $(p).target-path ] ;
|
||||
|
||||
if $(path[1]) = "."
|
||||
if $(path[2]) = true
|
||||
{
|
||||
# Indicates that the path is relative to
|
||||
# build dir.
|
||||
path = [ path.root $(path[2])
|
||||
[ $(self.project).build-dir ] ] ;
|
||||
path = [ path.join [ $(self.project).build-dir ]
|
||||
$(path[1]) ] ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Store the computed path, so that it's not recomputed
|
||||
# any more
|
||||
self.path = [ path.native $(path) ] ;
|
||||
|
||||
@@ -166,6 +166,15 @@ t.write("a2.txt", "")
|
||||
t.run_build_system("a2")
|
||||
t.expect_addition(["dist/a1.txt", "dist/a2.txt"])
|
||||
|
||||
# Regression test: check if <location>. works
|
||||
t.rm(".")
|
||||
t.write("Jamroot", """
|
||||
stage a1 : d/a1.txt : <location>. ;
|
||||
""")
|
||||
t.write("d/a1.txt", "")
|
||||
t.run_build_system()
|
||||
t.expect_addition("a1.txt")
|
||||
|
||||
|
||||
|
||||
t.cleanup()
|
||||
|
||||
Reference in New Issue
Block a user