]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | # Jamfile |
2 | # | |
3 | # Copyright (c) 2007-2008 Steven Watanabe | |
4 | # Copyright (c) 2009 Joel de Guzman | |
5 | # Copyright (c) 2009 Hartmut Kaiser | |
6 | # Copyright (c) 2009 Francois Barel | |
7 | # | |
8 | # Distributed under the Boost Software License, Version 1.0. (See | |
9 | # accompanying file LICENSE_1_0.txt or copy at | |
10 | # http://www.boost.org/LICENSE_1_0.txt | |
11 | ||
12 | import testing ; | |
13 | import path ; | |
14 | import regex ; | |
15 | import print ; | |
16 | import sequence ; | |
17 | import feature ; | |
18 | ||
19 | project boost/spirit/test/test_headers | |
20 | : requirements | |
21 | <include>$(BOOST_ROOT) | |
22 | <include>../../../.. | |
11fdf7f2 | 23 | <c++-template-depth>300 |
7c673cae FG |
24 | ; |
25 | ||
26 | headers = | |
27 | [ | |
28 | path.glob-tree ../../../../boost/spirit/include : *.hpp : classic* phoenix1* | |
29 | ] ; | |
30 | ||
31 | for local file in $(headers) | |
32 | { | |
33 | compile test.cpp | |
34 | : # requirements | |
35 | <define>BOOST_SPIRIT_HEADER_NAME=$(file) | |
36 | <dependency>$(file) | |
37 | : # test name | |
38 | [ regex.replace [ path.relative-to ../../../../boost/spirit $(file) ] "/" "_" ] | |
39 | ; | |
40 | } | |
41 | ||
42 | feature.feature <generate-include-all-order> : forward reverse : incidental ; | |
43 | ||
44 | rule generate-include-all ( target : sources * : properties * ) | |
45 | { | |
46 | print.output $(target) ; | |
47 | ||
48 | if <generate-include-all-order>reverse in $(properties) | |
49 | { | |
50 | sources = [ sequence.reverse $(sources) ] ; | |
51 | } | |
52 | ||
53 | for local file in $(sources) | |
54 | { | |
55 | print.text "#include <$(file:G=)> | |
56 | " : overwrite ; | |
57 | } | |
58 | ||
59 | } | |
60 | ||
61 | make auto_all1.cpp | |
62 | : $(headers) | |
63 | : @generate-include-all | |
64 | ; | |
65 | ||
66 | make auto_all2.cpp | |
67 | : $(headers) | |
68 | : @generate-include-all | |
69 | : <generate-include-all-order>reverse | |
70 | ; | |
71 | ||
72 | # this ought to catch non-inlined functions and other duplicate definitions | |
73 | link auto_all1.cpp auto_all2.cpp main.cpp | |
74 | : <include>. | |
75 | : auto_all_headers | |
76 | ; |