svn commit: r316289 - in head: . Mk

Bryan Drewery bdrewery at FreeBSD.org
Tue Apr 23 00:26:56 UTC 2013


Author: bdrewery
Date: Tue Apr 23 00:26:55 2013
New Revision: 316289
URL: http://svnweb.freebsd.org/changeset/ports/316289

Log:
  - 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

Modified:
  head/CHANGES
  head/Mk/bsd.port.mk

Modified: head/CHANGES
==============================================================================
--- head/CHANGES	Mon Apr 22 23:22:42 2013	(r316288)
+++ head/CHANGES	Tue Apr 23 00:26:55 2013	(r316289)
@@ -10,6 +10,15 @@ in the release notes and/or placed into 
 
 All ports committers are allowed to commit to this file.
 
+20130422:
+AUTHOR: bdrewery at FreeBSD.org
+
+  * The entry for 20120830 to change CCACHE_DIR was not fully supported
+    by all ports. There is now a CCACHE_DIR variable that can be used
+    in /etc/make.conf for more complete coverage:
+
+    CCACHE_DIR=/var/cache/ccache
+
 20130323:
 AUTHOR: bapt at FreeBSD.org
 

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Mon Apr 22 23:22:42 2013	(r316288)
+++ head/Mk/bsd.port.mk	Tue Apr 23 00:26:55 2013	(r316289)
@@ -940,6 +940,8 @@ FreeBSD_MAINTAINER=	portmgr at 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
 .	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?=


More information about the svn-ports-all mailing list