Date: Sat, 3 May 2014 15:11:02 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r352918 - head/Mk Message-ID: <201405031511.s43FB2V8013485@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Sat May 3 15:11:01 2014 New Revision: 352918 URL: http://svnweb.freebsd.org/changeset/ports/352918 QAT: https://qat.redports.org/buildarchive/r352918/ Log: - Fix WITH_CCACHE_BUILD support (fix build) with ports that use HOME=/dev/null to avoid staging violations. This will force CCACHE_DIR=/root/.ccache when running as root, and otherwise will force CCACHE_DIR to be manually set. With hat: portmgr PR: ports/186410 [textproc/xmlto build] Reported by: mandree, Rainer Duffner <rainer@ultra-secure.de> MFH: 2014Q2 Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Sat May 3 14:55:30 2014 (r352917) +++ head/Mk/bsd.port.mk Sat May 3 15:11:01 2014 (r352918) @@ -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*} && \ @@ -2138,12 +2151,15 @@ _CCACHE_PATH= ${LOCALBASE}/libexec/ccach # Prepend the ccache dir into the PATH and setup ccache env PATH:= ${_CCACHE_PATH}:${PATH} +#.MAKEFLAGS: PATH=${PATH} .if !${MAKE_ENV:MPATH=*} && !${CONFIGURE_ENV:MPATH=*} MAKE_ENV+= PATH=${PATH} CONFIGURE_ENV+= PATH=${PATH} .endif +# Ensure this is always in subchild environments . if defined(CCACHE_DIR) +#.MAKEFLAGS: CCACHE_DIR=${CCACHE_DIR} MAKE_ENV+= CCACHE_DIR="${CCACHE_DIR}" CONFIGURE_ENV+= CCACHE_DIR="${CCACHE_DIR}" . endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405031511.s43FB2V8013485>