From f7ef4fd7c81879a510b8600a96038338ffaf095f Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Thu, 22 May 2003 13:23:40 +0000 Subject: [PATCH] Bugfix. * new/stage.jam (stage-target-class.construct): Pass the result via 'virtual-target.register'. I wonder if virtual targets should be create via 'virtual-target.create' which will invoke 'virtual-target.register' internally. Passing via 'register' was forgotten in many places. * test/stage.py: New test. [SVN r18497] --- new/stage.jam | 2 +- test/stage.py | 14 ++++++++++++++ v2/test/stage.py | 14 ++++++++++++++ v2/tools/stage.jam | 2 +- 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/new/stage.jam b/new/stage.jam index 3096b4f3c..50d591fb7 100644 --- a/new/stage.jam +++ b/new/stage.jam @@ -75,7 +75,7 @@ rule stage-target-class ( name-and-dir : project : sources * : requirements * : # FIXME: Since we can have property, it might be better # to use it to distinguish staged copies with different locations. $(i2).set-path $(location) ; - result += $(i2) ; + result += [ virtual-target.register $(i2) ] ; } return $(result) ; } diff --git a/test/stage.py b/test/stage.py index 6f4306fc1..96c3b7779 100644 --- a/test/stage.py +++ b/test/stage.py @@ -30,6 +30,20 @@ t.write("auxilliary/1", "") t.run_build_system() t.expect_addition(["dist/a.dll", "dist/a.h", "dist/1"]) + +# Regression test: the following was causing the "duplicate target name" +# error. +t.write( + "Jamfile", +""" +project : requirements true ; +lib a : a.cpp ; +stage dist : a a.h auxilliary/1 ; +alias dist-alias : dist ; +""") +t.run_build_system() + + # Test the property t.write("Jamfile", """ lib a : a.cpp ; diff --git a/v2/test/stage.py b/v2/test/stage.py index 6f4306fc1..96c3b7779 100644 --- a/v2/test/stage.py +++ b/v2/test/stage.py @@ -30,6 +30,20 @@ t.write("auxilliary/1", "") t.run_build_system() t.expect_addition(["dist/a.dll", "dist/a.h", "dist/1"]) + +# Regression test: the following was causing the "duplicate target name" +# error. +t.write( + "Jamfile", +""" +project : requirements true ; +lib a : a.cpp ; +stage dist : a a.h auxilliary/1 ; +alias dist-alias : dist ; +""") +t.run_build_system() + + # Test the property t.write("Jamfile", """ lib a : a.cpp ; diff --git a/v2/tools/stage.jam b/v2/tools/stage.jam index 3096b4f3c..50d591fb7 100644 --- a/v2/tools/stage.jam +++ b/v2/tools/stage.jam @@ -75,7 +75,7 @@ rule stage-target-class ( name-and-dir : project : sources * : requirements * : # FIXME: Since we can have property, it might be better # to use it to distinguish staged copies with different locations. $(i2).set-path $(location) ; - result += $(i2) ; + result += [ virtual-target.register $(i2) ] ; } return $(result) ; }