Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / headers / build / Jamfile
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
5 import package ;
6 import path ;
7 import sequence ;
8 import set ;
9 import ../../../tools/boost_install/boost-install ;
10 import ../../../tools/boost_install/boost-install-dirs ;
11
12 # install-header-subdir
13
14 local header-subdir = [ boost-install-dirs.header-subdir ] ;
15
16 local install-header-subdir ;
17
18 if $(header-subdir)
19 {
20     install-header-subdir = $(header-subdir)/boost ;
21 }
22 else
23 {
24     install-header-subdir = boost ;
25 }
26
27 # install-headers
28
29 # first, the 'modular' headers
30
31 local modular-headers = $(BOOST_MODULARLAYOUT) ;
32
33 local skip-headers ;
34
35 for local lib in $(modular-headers)
36 {
37     local header-root = $(BOOST_ROOT)/libs/$(lib)/include/boost ;
38
39     local headers =
40         [ path.glob-tree $(header-root) : *.hpp *.ipp *.h *.inc ]
41         [ path.glob-tree $(header-root)/compatibility/cpp_c_headers : c* ] ;
42
43     skip-headers += [ sequence.transform path.relative-to [ path.make $(header-root) ] : $(headers) ] ;
44
45     package.install install-$(lib)-headers Boost
46         : <install-header-subdir>$(install-header-subdir)
47           <install-source-root>$(header-root)
48           <install-no-version-symlinks>on
49         : # No binaries
50         : # No libraries
51         : $(headers)
52     ;
53
54     explicit install-$(lib)-headers ;
55 }
56
57 # then, the non-modular headers in boost/, minus the modular ones
58
59 local header-root = [ path.make $(BOOST_ROOT)/boost ] ;
60
61 local headers =
62     [ path.glob-tree $(BOOST_ROOT)/boost : *.hpp *.ipp *.h *.inc ]
63     [ path.glob-tree $(BOOST_ROOT)/boost/compatibility/cpp_c_headers : c* ] ;
64
65 headers = [ set.difference $(headers) : $(header-root)/$(skip-headers) ] ;
66
67 package.install install-boost-headers Boost
68     : <install-header-subdir>$(install-header-subdir)
69       <install-source-root>$(header-root)
70       <install-no-version-symlinks>on
71     : # No binaries
72     : # No libraries
73     : $(headers)
74 ;
75
76 explicit install-boost-headers ;
77
78 #
79
80 alias install-headers : install-$(modular-headers)-headers install-boost-headers ;
81 explicit install-headers ;
82
83 # install
84
85 alias boost_headers ;
86
87 boost-install.install-cmake-config boost_headers ;
88 explicit install-cmake-config ;
89
90 alias install : install-headers install-cmake-config ;
91 explicit install ;
92
93 # stage
94
95 boost-install.stage-cmake-config boost_headers ;
96 explicit stage-cmake-config ;
97
98 alias stage : stage-cmake-config ;
99 explicit stage ;