]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/core_bindrule.py
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / tools / build / test / core_bindrule.py
1 #!/usr/bin/python
2
3 # Copyright 2001 Dave Abrahams
4 # Copyright 2011 Steven Watanabe
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7
8 import BoostBuild
9 import os
10
11 t = BoostBuild.Tester(["-d1"], pass_toolset=0)
12
13 t.write("subdir1/file-to-bind", "# This file intentionally left blank")
14
15 t.write("file.jam", """\
16 rule do-nothing ( target : source )
17 {
18 DEPENDS $(target) : $(source) ;
19 }
20 actions quietly do-nothing { }
21
22 # Make a non-file target which depends on a file that exists
23 NOTFILE fake-target ;
24 SEARCH on file-to-bind = subdir1 ;
25
26 do-nothing fake-target : file-to-bind ;
27
28 # Set jam up to call our bind-rule
29 BINDRULE = bind-rule ;
30
31 rule bind-rule ( target : path )
32 {
33 ECHO "found:" $(target) at $(path) ;
34 }
35
36 DEPENDS all : fake-target ;
37 """)
38
39 t.run_build_system(["-ffile.jam"], stdout="""\
40 found: all at all
41 found: file-to-bind at subdir1%sfile-to-bind
42 ...found 3 targets...
43 """ % os.sep)
44
45 t.cleanup()