]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/suffix.py
b6946a48a89ec5fa879b121611c81a209da6f3de
3 # Copyright 2003, 2004 Vladimir Prus
4 # Distributed under the Boost Software License, Version 1.0.
5 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
9 t
= BoostBuild
.Tester()
11 # Regression test: when staging V2 used to change suffixes on targets
12 # corresponding to real files.
13 t
.write("jamfile.jam", """
14 import type : register ;
15 register A : a1 a2 a3 ;
19 t
.write("jamroot.jam", "")
23 t
.expect_addition("a/a.a3");
25 # Regression test: we should be able to specify empty suffix for derived target
26 # type, even if base type has non-empty suffix.
29 t
.write("suffixes.jam", """
34 type.register First : first : ;
35 type.register Second : "" : First ;
37 generators.register-standard $(__name__).second : CPP : Second ;
41 TOUCH on $(<) = [ common.file-creation-command ] ;
50 t
.write("suffixes.py", """
51 import b2.build.type as type
52 import b2.build.generators as generators
53 import b2.tools.common as common
55 from b2.manager import get_manager
57 type.register("First", ["first"])
58 type.register("Second", [""], "First")
60 generators.register_standard("suffixes.second", ["CPP"], ["Second"])
62 get_manager().engine().register_action("suffixes.second",
63 "%s $(<)" % common.file_creation_command())
67 t
.write("jamroot.jam", """
71 t
.write("jamfile.jam", """
76 t
.expect_addition("bin/$toolset/debug*/a")