aboutsummaryrefslogtreecommitdiff
path: root/extra/ccache/build
blob: 1b063cc280e255563c65121b4155c4612de12992 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -e

./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --mandir=/usr/share/man \
    --localstatedir=/var

make

install -Dm 755 ccache       "$1/usr/bin/ccache"
install -Dm 644 doc/ccache.1 "$1/usr/share/man/man1/ccache.1"

mkdir -p "$1/usr/lib/ccache/bin"

triplet=$(cc -dumpmachine)

for link in cc gcc g++ cpp c++ "$triplet-cc" "$triplet-gcc" \
            "$triplet-g++" "$triplet-cpp" "$triplet-c++"; do
    ln -sf /usr/bin/ccache "$1/usr/lib/ccache/bin/$link"
done