Jamfile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # Copyright 2018 Peter Dimov
  2. # Distributed under the Boost Software License, Version 1.0.
  3. # (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
  4. import package ;
  5. import path ;
  6. import sequence ;
  7. import set ;
  8. import ../../../tools/boost_install/boost-install ;
  9. import ../../../tools/boost_install/boost-install-dirs ;
  10. # install-header-subdir
  11. local header-subdir = [ boost-install-dirs.header-subdir ] ;
  12. local install-header-subdir ;
  13. if $(header-subdir)
  14. {
  15. install-header-subdir = $(header-subdir)/boost ;
  16. }
  17. else
  18. {
  19. install-header-subdir = boost ;
  20. }
  21. # install-headers
  22. # first, the 'modular' headers
  23. local modular-headers = $(BOOST_MODULARLAYOUT) ;
  24. local skip-headers ;
  25. for local lib in $(modular-headers)
  26. {
  27. local header-root = $(BOOST_ROOT)/libs/$(lib)/include/boost ;
  28. local headers =
  29. [ path.glob-tree $(header-root) : *.hpp *.ipp *.h *.inc ]
  30. [ path.glob-tree $(header-root)/compatibility/cpp_c_headers : c* ] ;
  31. skip-headers += [ sequence.transform path.relative-to [ path.make $(header-root) ] : $(headers) ] ;
  32. package.install install-$(lib)-headers Boost
  33. : <install-header-subdir>$(install-header-subdir)
  34. <install-source-root>$(header-root)
  35. <install-no-version-symlinks>on
  36. : # No binaries
  37. : # No libraries
  38. : $(headers)
  39. ;
  40. explicit install-$(lib)-headers ;
  41. }
  42. # then, the non-modular headers in boost/, minus the modular ones
  43. local header-root = [ path.make $(BOOST_ROOT)/boost ] ;
  44. local headers =
  45. [ path.glob-tree $(BOOST_ROOT)/boost : *.hpp *.ipp *.h *.inc ]
  46. [ path.glob-tree $(BOOST_ROOT)/boost/compatibility/cpp_c_headers : c* ] ;
  47. headers = [ set.difference $(headers) : $(header-root)/$(skip-headers) ] ;
  48. package.install install-boost-headers Boost
  49. : <install-header-subdir>$(install-header-subdir)
  50. <install-source-root>$(header-root)
  51. <install-no-version-symlinks>on
  52. : # No binaries
  53. : # No libraries
  54. : $(headers)
  55. ;
  56. explicit install-boost-headers ;
  57. #
  58. alias install-headers : install-$(modular-headers)-headers install-boost-headers ;
  59. explicit install-headers ;
  60. # install
  61. alias boost_headers ;
  62. boost-install.install-cmake-config boost_headers ;
  63. explicit install-cmake-config ;
  64. alias install : install-headers install-cmake-config ;
  65. explicit install ;
  66. # stage
  67. boost-install.stage-cmake-config boost_headers ;
  68. explicit stage-cmake-config ;
  69. alias stage : stage-cmake-config ;
  70. explicit stage ;