From owner-svn-ports-all@FreeBSD.ORG Sat May 3 15:11:02 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B1A3388; Sat, 3 May 2014 15:11:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E8DB1621; Sat, 3 May 2014 15:11:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s43FB251013486; Sat, 3 May 2014 15:11:02 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s43FB2V8013485; Sat, 3 May 2014 15:11:02 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201405031511.s43FB2V8013485@svn.freebsd.org> From: Bryan Drewery Date: Sat, 3 May 2014 15:11:02 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r352918 - head/Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2014 15:11:02 -0000 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 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