# Scripts/check_leftovers.sh | 2 +- # bsd.port.mk | 13 +++++++++++++ # 2 files changed, 14 insertions(+), 1 deletion(-) # svn status M Mk/Scripts/check_leftovers.sh M Mk/bsd.port.mk Index: Mk/Scripts/check_leftovers.sh =================================================================== --- Mk/Scripts/check_leftovers.sh (revision 352643) +++ Mk/Scripts/check_leftovers.sh (working copy) @@ -47,7 +47,7 @@ tmpplist=$(make -C ${portdir} -VTMPPLIST while read modtype path extra; do # Ignore everything from these files/directories case "${path}" in - ${HOME:-/root}/.ccache/*|\ + ${HOME:-/root}/.ccache/*|/root/.ccache/*|\ /compat/linux/proc/*|\ /dev/*|\ /etc/make.conf.bak|\ Index: Mk/bsd.port.mk =================================================================== --- Mk/bsd.port.mk (revision 352643) +++ Mk/bsd.port.mk (working copy) @@ -2125,6 +2125,19 @@ BUILD_FAIL_MESSAGE+= Try to set MAKE_JOB .endif # ccache support + +# Try to set a default CCACHE_DIR to workaround HOME=/dev/null and +# HOME=${WRKDIR}/* staging fixes +.if defined(WITH_CCACHE_BUILD) && !defined(CCACHE_DIR) && \ + (!defined(HOME) || ${HOME} == /dev/null || ${HOME:S/^${WRKDIR}//} != ${HOME}) +. if defined(USER) && ${USER} == root +CCACHE_DIR= /root/.ccache +. else +NO_CCACHE= yes +WARNING+= WITH_CCACHE_BUILD support disabled, please set CCACHE_DIR. +. endif +.endif + # Support NO_CCACHE for common setups, require WITH_CCACHE_BUILD, and # don't use if ccache already set in CC .if !defined(NO_CCACHE) && defined(WITH_CCACHE_BUILD) && !${CC:M*ccache*} && \