]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/example/named-install-dirs/build.jam
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / example / named-install-dirs / build.jam
1 # showcasing several default install directories
2 install a1 : a : <location>(bindir) ;
3 install a2 : a : <location>(libdir)/a2 ;
4 install (sbindir)/a3 : a ;
5
6 # using a custom prefix; the file will be installed into foo/bar/bin/a4
7 install (bindir)/a4 : a : <install-prefix>foo/bar ;
8
9 # this one deduces installed package name to be the basename of the project
10 # directory, so e.g. on Linux the file will be installed installed into
11 # /usr/local/share/doc/<name of project's directory>/a5
12 install (docdir)/a5 : a : <install-prefix>bar/baz ;
13
14 # use a custom named directory; its default on Linux is /usr/local/share/xyz/
15 import stage ;
16 stage.add-install-dir foodir : xyz : datadir ;
17 install (foodir)/a6 : a ;
18
19
20 # another custom named directory, this one appends package name like docdir;
21 # so, e.g. on Linux it defaults to /usr/local/lib/named-install-dirs
22 stage.add-install-dir privatedir : "" : libdir : package-suffix ;
23 install (privatedir)/a7 : a ;
24
25 # using stage.get-package-name
26 make a8 : a : @write-dirs : <staging-prefix>p/q/r <install-bindir>/bin ;
27
28 rule write-dirs ( target : sources * : properties * )
29 {
30 import property-set ;
31 import print ;
32 local ps = [ property-set.create $(properties) ] ;
33 local pn = [ stage.get-package-name $(ps) ] ;
34 print.output $(target) ;
35 print.text
36 [ stage.get-dir docdir : $(ps) : $(pn) ]
37 [ stage.get-dir docdir : $(ps) : $(pn) : staged ]
38 [ stage.get-dir docdir : $(ps) : $(pn) : relative ]
39 [ stage.get-dir docdir : $(ps) : $(pn) : relative staged ]
40 [ stage.get-dir bindir : $(ps) : $(pn) : relative ]
41 : overwrite
42 ;
43 }
44
45 # using staging prefix; on Linux installs into q/r/s/share/a9
46 install (datarootdir)/a9 : a : <staging-prefix>q/r/s ;
47
48
49 build-project x ;
50
51 # Copyright 2020 Dmitry Arkhipov
52 # Distributed under the Boost Software License, Version 1.0.
53 # (See accompanying file LICENSE.txt or copy at
54 # https://www.bfgroup.xyz/b2/LICENSE.txt)