]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #!/usr/bin/python |
2 | ||
3 | # Copyright (C) Vladimir Prus 2005. | |
4 | # Distributed under the Boost Software License, Version 1.0. (See | |
5 | # accompanying file LICENSE_1_0.txt or copy at | |
6 | # http://www.boost.org/LICENSE_1_0.txt) | |
7 | ||
8 | # Tests that we can declare a rule in Jamroot that will be can be called in | |
9 | # child Jamfile to declare a target. Specifically test for use of 'glob' in that | |
10 | # rule. | |
11 | ||
12 | import BoostBuild | |
13 | ||
14 | t = BoostBuild.Tester(use_test_config=False) | |
15 | ||
16 | ||
17 | t.write("jamroot.jam", """ | |
18 | project : requirements <link>static ; | |
19 | rule my-lib ( name ) { lib $(name) : [ glob *.cpp ] ; } | |
20 | """) | |
21 | ||
22 | t.write("sub/a.cpp", """ | |
23 | """) | |
24 | ||
25 | t.write("sub/jamfile.jam", """ | |
26 | my-lib foo ; | |
27 | """) | |
28 | ||
29 | ||
30 | t.run_build_system(subdir="sub") | |
31 | ||
32 | t.expect_addition("sub/bin/$toolset/debug/link-static/foo.lib") | |
33 | ||
34 | t.cleanup() |