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

Handle <dependency> for 'stage'.

* tools/stage.jam
  (copy-file, relink-file): Add stage's dependency properies to
  the staged targets properties, so that <dependency> is copied too.

* test/stage.py: New test.


[SVN r26420]
This commit is contained in:
Vladimir Prus
2004-12-03 14:24:32 +00:00
parent 7d8f3051b8
commit 6f86fbc1f4
2 changed files with 23 additions and 13 deletions

View File

@@ -155,6 +155,17 @@ t.run_build_system()
t.expect_addition("dist/l3.dll")
t.expect_nothing("dist/l2.dll")
# Check if <dependency> on 'stage' works.
t.rm(".")
t.write("Jamroot", """
stage a1 : a1.txt : <location>dist ;
stage a2 : a2.txt : <location>dist <dependency>a1 ;
""")
t.write("a1.txt", "")
t.write("a2.txt", "")
t.run_build_system("a2")
t.expect_addition(["dist/a1.txt", "dist/a2.txt"])
t.cleanup()

View File

@@ -244,8 +244,6 @@ class stage-target-class : basic-target
return $(found) ;
}
}
# Create a target named 'name' in the current project
@@ -264,19 +262,20 @@ rule copy-file ( name ? : project : source : extra-properties )
: $(project) ] ;
local a = [ $(source).action ] ;
local new-a ;
local p = [ property-set.empty ] ;
if $(a)
{
local p = [ $(a).properties ] ;
# Copy the properties of original target. They, in particular
# can affect the suffix of the target.
new-a = [ new action $(targets) : $(source) : common.copy :
[ $(p).add-raw [ $(extra-properties).free ] ] ] ;
p = [ $(a).properties ] ;
}
else
{
new-a = [ new action $(targets) : $(source) : common.copy :
[ property-set.create [ $(extra-properties).free ] ] ] ;
}
# Copy the properties of original target. They, in particular
# can affect the suffix of the target.
new-a = [ new action $(targets) : $(source) : common.copy :
[ $(p).add-raw [ $(extra-properties).free ]
[ $(extra-properties).dependency ]
] ] ;
$(targets).suffix [ $(source).suffix ] ;
$(targets).action $(new-a) ;
@@ -310,7 +309,7 @@ rule relink-file ( project : property-set : source )
{
ps-raw = [ property.change $(ps-raw) : <dll-path> ] ;
}
ps-raw = $(ps-raw) [ $(property-set).free ] ;
ps-raw = $(ps-raw) [ $(property-set).free ] [ $(property-set).dependency ] ;
local new-ps = [ property-set.create $(ps-raw) ] ;
local cloned-action = [ virtual-target.clone-action $(action) : $(project) :