2011-04-02 09:55:00 +00:00
|
|
|
# Use ccache by default. Users who don't want that can setenv the
|
|
|
|
# CCACHE_DISABLE environment variable in their personal profile.
|
2007-07-29 22:38:31 +00:00
|
|
|
|
|
|
|
if ( "$path" !~ *@LIBDIR@/ccache* ) then
|
|
|
|
set path = ( @LIBDIR@/ccache $path )
|
|
|
|
endif
|
|
|
|
|
2011-04-02 09:55:00 +00:00
|
|
|
# If @CACHEDIR@ is writable, use a shared cache there, except for root.
|
|
|
|
# Users who don't want that even if they have the write permission can setenv
|
|
|
|
# the CCACHE_DIR environment variable to another location and possibly unsetenv
|
|
|
|
# the CCACHE_UMASK environment variable in their personal profile.
|
2007-07-29 22:38:31 +00:00
|
|
|
|
2011-04-02 09:55:00 +00:00
|
|
|
if ( $?CCACHE_DIR ) then
|
|
|
|
if ( ! -w "$CCACHE_DIR" ) then
|
|
|
|
# Reset broken settings maybe inherited when switching users (#651023).
|
|
|
|
unsetenv CCACHE_DIR
|
|
|
|
unsetenv CCACHE_UMASK
|
|
|
|
endif
|
|
|
|
else if ( $uid != 0 ) then
|
|
|
|
if ( -w @CACHEDIR@ && -d @CACHEDIR@ ) then
|
|
|
|
# Set up the shared cache.
|
|
|
|
setenv CCACHE_DIR @CACHEDIR@
|
|
|
|
setenv CCACHE_UMASK 002
|
|
|
|
unsetenv CCACHE_HARDLINK
|
|
|
|
endif
|
2007-07-29 22:38:31 +00:00
|
|
|
endif
|
2011-12-17 21:58:28 +00:00
|
|
|
|
2016-07-26 14:38:26 +00:00
|
|
|
# CCACHE_HASHDIR: https://bugzilla.redhat.com/show_bug.cgi?id=759592
|
2011-12-17 21:58:28 +00:00
|
|
|
setenv CCACHE_HASHDIR
|
2016-07-26 14:38:26 +00:00
|
|
|
# CCACHE_CPP2: https://bugzilla.redhat.com/show_bug.cgi?id=1350086
|
|
|
|
setenv CCACHE_CPP2
|