Date: Thu, 30 May 2013 01:14:42 +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: r319400 - head/Mk Message-ID: <201305300114.r4U1Egfv038046@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Thu May 30 01:14:42 2013 New Revision: 319400 URL: http://svnweb.freebsd.org/changeset/ports/319400 Log: Fix build with WITH_CCACHE_BUILD with ports that override PATH via MAKE_ENV or CONFIGURE_ENV. I.e., don't set PATH in MAKE_ENV twice as env(1) only takes one, in which case some ports fail to build. One example is any USES=ada port (such as textproc/xmlada). Instead, add the ccache path into PATH via := and let it fall into there via the sourcing port's MAKE_ENV=PATH=...:${PATH} line. A more comprehensive solution to this could be to add a MACRO/feature to modify the PATH for all ports without using MAKE_ENV via something like ADDPATH=... With hat: portmgr Tested by: several exp-runs Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Thu May 30 01:06:51 2013 (r319399) +++ head/Mk/bsd.port.mk Thu May 30 01:14:42 2013 (r319400) @@ -2193,9 +2193,15 @@ MAKE_JOBS_NUMBER= 1 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 -MAKE_ENV+= PATH=${LOCALBASE}/libexec/ccache:${PATH} -CONFIGURE_ENV+= PATH=${LOCALBASE}/libexec/ccache:${PATH} +PATH:= ${_CCACHE_PATH}:${PATH} +.if !${MAKE_ENV:M*PATH=*} && !${CONFIGURE_ENV:M*PATH=*} +MAKE_ENV+= PATH=${PATH} +CONFIGURE_ENV+= PATH=${PATH} +.endif + . if defined(CCACHE_DIR) MAKE_ENV+= CCACHE_DIR="${CCACHE_DIR}" CONFIGURE_ENV+= CCACHE_DIR="${CCACHE_DIR}"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305300114.r4U1Egfv038046>