From owner-svn-ports-all@FreeBSD.ORG Tue Oct 28 18:01:56 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C27D7C7; Tue, 28 Oct 2014 18:01:56 +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 37A91F52; Tue, 28 Oct 2014 18:01:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9SI1u7J087957; Tue, 28 Oct 2014 18:01:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9SI1ttr087955; Tue, 28 Oct 2014 18:01:55 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201410281801.s9SI1ttr087955@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 28 Oct 2014 18:01:55 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r371640 - 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.18-1 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: Tue, 28 Oct 2014 18:01:56 -0000 Author: bdrewery Date: Tue Oct 28 18:01:55 2014 New Revision: 371640 URL: https://svnweb.freebsd.org/changeset/ports/371640 QAT: https://qat.redports.org/buildarchive/r371640/ Log: Move WITH_CCACHE_BUILD logic to bsd.ccache.mk With hat: portmgr Added: head/Mk/bsd.ccache.mk (contents, props changed) Modified: head/Mk/bsd.port.mk Added: head/Mk/bsd.ccache.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Mk/bsd.ccache.mk Tue Oct 28 18:01:55 2014 (r371640) @@ -0,0 +1,48 @@ +# $FreeBSD$ + +COMMANDS_Include_MAINTAINER= portmgr@FreeBSD.org + +.if !defined(_CCACHEMKINCLUDED) + +_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}) +. 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*} && \ + !defined(NO_BUILD) && !defined(NOCCACHE) +# Avoid depends loops between pkg and ccache +. if !${.CURDIR:M*/devel/ccache} && !${.CURDIR:M*/ports-mgmt/pkg} +BUILD_DEPENDS+= ${LOCALBASE}/bin/ccache:${PORTSDIR}/devel/ccache +. endif + +_CCACHE_PATH= ${LOCALBASE}/libexec/ccache + +# 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 +.endif + +.endif Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Tue Oct 28 17:49:09 2014 (r371639) +++ head/Mk/bsd.port.mk Tue Oct 28 18:01:55 2014 (r371640) @@ -2074,46 +2074,7 @@ _MAKE_JOBS?= -j${MAKE_JOBS_NUMBER} BUILD_FAIL_MESSAGE+= Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. .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*} && \ - !defined(NO_BUILD) && !defined(NOCCACHE) -# Avoid depends loops between pkg and ccache -. if !${.CURDIR:M*/devel/ccache} && !${.CURDIR:M*/ports-mgmt/pkg} -BUILD_DEPENDS+= ${LOCALBASE}/bin/ccache:${PORTSDIR}/devel/ccache -. endif - -_CCACHE_PATH= ${LOCALBASE}/libexec/ccache - -# 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 -.endif +.include "${PORTSDIR}/Mk/bsd.ccache.mk" PTHREAD_CFLAGS?= PTHREAD_LIBS?= -pthread