summaryrefslogtreecommitdiffstats
path: root/src/boost/tools/boost_install/boost-install-dirs.jam
blob: 5c9f3d46911dd16f93b0706f3db6d5f762ac5c93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Copyright 2018-2020 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)

import modules ;
import boostcpp ;
import package ;
import path ;

# includedir

rule includedir
{
    if ! $(.includedir)
    {
        local paths = [ package.paths Boost ] ;
        .includedir = [ $(paths).includedir ] ;
    }

    return $(.includedir) ;
}

# bindir

rule bindir
{
    if ! $(.bindir)
    {
        local paths = [ package.paths Boost ] ;
        .bindir = [ $(paths).bindir ] ;
    }

    return $(.bindir) ;
}

# libdir

rule libdir
{
    if ! $(.libdir)
    {
        local paths = [ package.paths Boost ] ;
        .libdir = [ $(paths).libdir ] ;
    }

    return $(.libdir) ;
}

# cmakedir

rule cmakedir
{
    if ! $(.cmakedir)
    {
        package.add-path-option cmakedir : cmake : libdir ;

        local paths = [ package.paths Boost ] ;
        .cmakedir = [ $(paths).get cmakedir ] ;
    }

    return $(.cmakedir) ;
}

# header-subdir

rule header-subdir
{
    local r ;

    local layout = [ modules.peek boostcpp : layout ] ;

    if $(layout) = versioned
    {
        local BOOST_VERSION_TAG = [ modules.peek boostcpp : BOOST_VERSION_TAG ] ;
        r = "boost-$(BOOST_VERSION_TAG)" ;
    }

    return $(r) ;
}

# stagedir

rule stagedir
{
    return [ path.make [ modules.peek boostcpp : BOOST_STAGE_LOCATE ] ] ;
}

# stage-libdir

rule stage-libdir
{
    local ld = [ MATCH --stage-libdir=(.*) : [ modules.peek : ARGV ] ] ;

    if $(ld)
    {
        ld = [ path.root [ path.make $(ld) ] [ path.pwd ] ] ;
        return $(ld) ;
    }
    else
    {
        local stagedir = [ stagedir ] ;
        return $(stagedir)/lib ;
    }
}