index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> | 2015-09-15 22:17:03 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2015-10-19 14:33:17 +1000 |
commit | 2627b423ff786edd60123a2670a69841fe4cb5a4 (patch) | |
tree | 2b0da7a4f8b45dbae4bf2e15599750532d6d63cb /scripts | |
parent | 70e6875ad9afd6ee0e26c7fbe283466f7a6767e5 (diff) |
-rw-r--r-- | scripts/makepkg.sh.in | 19 |
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 7d8669b7..a8b409fa 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -851,17 +851,24 @@ run_prepare() { } run_build() { + local ccache=0 + + # use ccache if it is requested (check buildenv and PKGBUILD opts) + if check_buildoption "ccache" "y" && [[ -d /usr/lib/ccache/bin ]]; then + export PATH="/usr/lib/ccache/bin:$PATH" + ccache=1 + fi + # use distcc if it is requested (check buildenv and PKGBUILD opts) if check_buildoption "distcc" "y"; then - [[ -d /usr/lib/distcc/bin ]] && export PATH="/usr/lib/distcc/bin:$PATH" + if (( ccache )); then + export CCACHE_PREFIX="${CCACHE_PREFIX:+$CCACHE_PREFIX }distcc" + elif [[ -d /usr/lib/distcc/bin ]]; then + export PATH="/usr/lib/distcc/bin:$PATH" + fi export DISTCC_HOSTS fi - # use ccache if it is requested (check buildenv and PKGBUILD opts) - if check_buildoption "ccache" "y"; then - [[ -d /usr/lib/ccache/bin ]] && export PATH="/usr/lib/ccache/bin:$PATH" - fi - run_function_safe "build" } |