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

Support the && syntax in the property.translate-paths rule.

[SVN r25339]
This commit is contained in:
Vladimir Prus
2004-09-22 14:25:04 +00:00
parent 3265b13893
commit d348f6a020
2 changed files with 23 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ import regex ;
import sequence ;
import set ;
import path ;
import assert ;
# Refines 'properties' by overriding any non-free properties
# for which a different value is specified in 'requirements'.
@@ -410,7 +411,13 @@ rule translate-paths ( properties * : path )
if path in [ feature.attributes $(p:G) ]
{
local t = [ path.root [ path.make $(p:TG=) ] $(path) ] ;
local values = [ regex.split $(p:TG=) "&&" ] ;
local t ;
for local v in $(values)
{
t += [ path.root [ path.make $(v) ] $(path) ] ;
}
t = $(t:J="&&") ;
result += $(condition)$(t:TG=$(p:G)) ;
}
else

View File

@@ -59,9 +59,20 @@ t.write("x/include2/h2.hpp", "\n")
t.run_build_system()
t.expect_addition("x/bin/$toolset/debug/m.exe")
# Test that "&&" in path features is handled correctly.
t.rm("bin")
t.write("Jamfile", "build-project sub ;")
t.write("sub/Jamfile", """
exe a : a.cpp : <include>../h1&&../h2 ;
""")
t.write("sub/a.cpp", """
#include <header.h>
int main() { return OK; }
""")
t.write("h2/header.h", """
const int OK = 0;
""")
t.run_build_system()
t.expect_addition("sub/bin/$toolset/debug/a.exe")
t.cleanup()