17 lines
607 B
Bash
17 lines
607 B
Bash
|
# Use ccache by default. Users who don't want that can set the CCACHE_DISABLE
|
||
|
# environment variable in their personal profile.
|
||
|
|
||
|
if ! echo "$PATH" | grep -qw @LIBDIR@/ccache ; then
|
||
|
PATH="@LIBDIR@/ccache:$PATH"
|
||
|
fi
|
||
|
|
||
|
# If @CACHEDIR@ is writable, use a shared cache there. Users who don't
|
||
|
# want that even if they have that write permission can set the CCACHE_DIR
|
||
|
# and unset the CCACHE_UMASK environment variables in their personal profile.
|
||
|
|
||
|
if [ -z "$CCACHE_DIR" -a -d @CACHEDIR@ -a -w @CACHEDIR@ ] ; then
|
||
|
export CCACHE_DIR=/var/cache/ccache
|
||
|
export CCACHE_UMASK=002
|
||
|
unset CCACHE_HARDLINK
|
||
|
fi
|