1# Jamfile.v2 2# 3# Copyright (c) 2007-2008 4# Steven Watanabe 5# 6# Distributed under the Boost Software License, Version 1.0. (See 7# accompanying file LICENSE_1_0.txt or copy at 8# http://www.boost.org/LICENSE_1_0.txt 9 10import testing ; 11import path ; 12import regex ; 13import print ; 14import sequence ; 15import feature ; 16 17project boost/units/test_headers : 18 requirements <include>$(BOOST_ROOT) <include>../../.. 19; 20 21headers = [ path.glob-tree ../../../boost/units : *.hpp : detail ] ; 22 23for local file in $(headers) 24{ 25 compile test.cpp 26 : # requirements 27 <define>BOOST_UNITS_HEADER_NAME=$(file) 28 <dependency>$(file) 29 : # test name 30 [ regex.replace [ path.relative-to ../../.. $(file) ] "/" "_" ] ; 31} 32 33feature.feature <generate-include-all-order> : forward reverse : incidental ; 34 35rule generate-include-all ( target : sources * : properties * ) 36{ 37 print.output $(target) ; 38 39 if <generate-include-all-order>reverse in $(properties) 40 { 41 sources = [ sequence.reverse $(sources) ] ; 42 } 43 44 for local file in $(sources) 45 { 46 print.text "#include <$(file:G=)> 47" : overwrite ; 48 } 49 50} 51 52make include_all1.cpp : $(headers) : @generate-include-all ; 53make include_all2.cpp : $(headers) : @generate-include-all : <generate-include-all-order>reverse ; 54 55# this ought to catch non-inlined functions and other duplicate definitions 56link include_all1.cpp include_all2.cpp main.cpp : <include>. : include_all_headers ; 57