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 12import testing ; 13import path ; 14import regex ; 15import print ; 16import sequence ; 17import feature ; 18 19project boost/spirit/repository/test/test_headers 20 : requirements 21 <include>$(BOOST_ROOT) 22 <include>../../../../.. 23 <c++-template-depth>300 24 ; 25 26headers = 27[ 28 path.glob-tree ../../../../../boost/spirit/repository/include : *.hpp 29] ; 30 31main_headers = 32[ 33 path.glob-tree ../../../../../boost/spirit/include : *.hpp : classic* phoenix1* 34] ; 35 36for local file in $(headers) 37{ 38 compile test.cpp 39 : # requirements 40 <define>BOOST_SPIRIT_HEADER_NAME=$(file) 41 <dependency>$(file) 42 : # test name 43 [ regex.replace [ path.relative-to ../../../../../boost/spirit/repository $(file) ] "/" "_" ] 44 ; 45} 46 47feature.feature <generate-include-all-order> : forward reverse : incidental ; 48 49rule generate-include-all ( target : sources * : properties * ) 50{ 51 print.output $(target) ; 52 53 if <generate-include-all-order>reverse in $(properties) 54 { 55 sources = [ sequence.reverse $(sources) ] ; 56 } 57 58 for local file in $(sources) 59 { 60 print.text "#include <$(file:G=)> 61" : overwrite ; 62 } 63 64} 65 66make auto_all1.cpp 67 : $(headers) $(main_headers) 68 : @generate-include-all 69 ; 70 71make auto_all2.cpp 72 : $(headers) $(main_headers) 73 : @generate-include-all 74 : <generate-include-all-order>reverse 75 ; 76 77# this ought to catch non-inlined functions and other duplicate definitions 78link auto_all1.cpp auto_all2.cpp main.cpp 79 : <include>. 80 : auto_all_headers 81 ; 82