From 6faf9b65ab0e0621394262181c71c5db839b61e6 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sun, 22 Mar 2015 19:41:44 +0000 Subject: [PATCH] Unbreak ccache after r359201 set HOME in MAKE_ENV/CONFIGURE_ENV rather than in the global scope as bsd.ccache.mk expected. This was causing ccache to use WKRDIR/.ccache for obj caching. 'make clean' would then lose all cached files. This worked in in Poudriere though as CCACHE_DIR is explicitly defined. With hat: portmgr --- Mk/bsd.ccache.mk | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Mk/bsd.ccache.mk b/Mk/bsd.ccache.mk index 44ab12e347d3..b785c52d66e3 100644 --- a/Mk/bsd.ccache.mk +++ b/Mk/bsd.ccache.mk @@ -6,10 +6,8 @@ COMMANDS_Include_MAINTAINER= portmgr@FreeBSD.org _CCACHEMKINCLUDED= yes -# 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}) +# HOME is always set to ${WRKDIR} now. Try to use /root/.ccache as default. +.if defined(WITH_CCACHE_BUILD) && !defined(CCACHE_DIR) . if defined(USER) && ${USER} == root CCACHE_DIR= /root/.ccache . else