aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2013-04-23 08:26:55 +0800
committerbdrewery <bdrewery@FreeBSD.org>2013-04-23 08:26:55 +0800
commit6ef6319f7322229fc70f7d997a7d0a5343b5cc17 (patch)
tree37200c28a2f8bdaea8f26db51a713593b4d4d844 /Mk
parent4af0aea28fa7586f4cdcb059f3523545dd8683f0 (diff)
downloadfreebsd-ports-gnome-6ef6319f7322229fc70f7d997a7d0a5343b5cc17.tar.gz
freebsd-ports-gnome-6ef6319f7322229fc70f7d997a7d0a5343b5cc17.tar.zst
freebsd-ports-gnome-6ef6319f7322229fc70f7d997a7d0a5343b5cc17.zip
- Add WITH_CCACHE_BUILD support during 'configure' phase
- Add CCACHE_DIR The MAKE_ENV/CONFIGURE_ENV+= method of adding CCACHE_DIR in /etc/make.conf does not work for many ports since they overwrite using = instead of appending with +=. By adding CCACHE_DIR into the ENV variables after reading in the port the directory is properly set in the environment. Without this, the ccache support would sometimes work but incorrectly not respect the set CCACHE_DIR, potentially using 2 caches. With hat: portmgr
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 523290045460..e315b1e1231a 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -940,6 +940,8 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
#
# WITH_CCACHE_BUILD
# - Enable CCACHE support (devel/ccache). User settable.
+# CCACHE_DIR
+# - Which directory to use for ccache (default: $HOME/.ccache)
# NO_CCACHE
# - Disable CCACHE support for example for certain ports if
# CCACHE is enabled. User settable.
@@ -2245,7 +2247,12 @@ BUILD_DEPENDS+= ${LOCALBASE}/bin/ccache:${PORTSDIR}/devel/ccache
. endif
# Prepend the ccache dir into the PATH and setup ccache env
-MAKE_ENV+= PATH=${LOCALBASE}/libexec/ccache:${PATH}
+MAKE_ENV+= PATH=${LOCALBASE}/libexec/ccache:${PATH}
+CONFIGURE_ENV+= PATH=${LOCALBASE}/libexec/ccache:${PATH}
+. if defined(CCACHE_DIR)
+MAKE_ENV+= CCACHE_DIR="${CCACHE_DIR}"
+CONFIGURE_ENV+= CCACHE_DIR="${CCACHE_DIR}"
+. endif
.endif
PTHREAD_CFLAGS?=