Jamfile 1.7 KB

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