2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00
Files
build/test/make_rule.py
Vladimir Prus 5b56d78725 Allow additional argument for user rule, with "make" main target.
* new/make.jam
    (make): Change name only of the first element in 'generating-rule'

* new/virtual-target.jam
    (action.actualize): Pass only first element of action name to
       toolset.set-target-variables.

* test/make_rule.py: New test.


[SVN r17543]
2003-02-20 07:20:52 +00:00

33 lines
526 B
Python

#!/usr/bin/python
# Test the 'make' rule
from BoostBuild import Tester
from string import find
t = Tester()
t.write("project-root.jam", "")
t.write("Jamfile", """
rule creator ( string targets * : sources * : * )
{
STRING on $(targets) = $(string) ;
creator2 $(targets) : $(sources) ;
}
actions creator2
{
echo $(STRING) > $(<)
}
make foo.bar : : creator foobar ;
""")
t.run_build_system()
t.expect_addition("bin/debug/foo.bar")
t.fail_test(find(t.read("bin/debug/foo.bar"), "foobar") == -1)
t.cleanup()