aboutsummaryrefslogtreecommitdiff
path: root/extra/ccache/build
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2019-12-09 19:17:24 +0300
committerCem Keylan <cem@ckyln.com>2019-12-09 19:17:24 +0300
commit03423e0583057cbe5a16f8439183e2dbc0e8dd7c (patch)
tree81fe3ba69d94146f83fb5541d1fb2da0ac4eac08 /extra/ccache/build
downloadrepository-03423e0583057cbe5a16f8439183e2dbc0e8dd7c.tar.gz
secondary commit
Diffstat (limited to 'extra/ccache/build')
-rwxr-xr-xextra/ccache/build21
1 files changed, 21 insertions, 0 deletions
diff --git a/extra/ccache/build b/extra/ccache/build
new file mode 100755
index 00000000..1b063cc2
--- /dev/null
+++ b/extra/ccache/build
@@ -0,0 +1,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