summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-10-14 08:59:08 +0000
committerrillig <rillig@pkgsrc.org>2006-10-14 08:59:08 +0000
commitf56279e0b2c0ffda0365af488f3359e9698342e3 (patch)
tree3e04ccad7a5c9e624c0c4e55bd265df838e9b907 /mk
parent8908fb6de50bb7d94e20103042a2f25fd7814aeb (diff)
downloadpkgsrc-f56279e0b2c0ffda0365af488f3359e9698342e3.tar.gz
Added the user-settable variable CCACHE_DIR, so that the cache can be
outside of WRKDIR. I don't see a reason for having the cache inside a directory that will go away on "make clean", but I left the default value as is.
Diffstat (limited to 'mk')
-rw-r--r--mk/compiler/ccache.mk15
1 files changed, 13 insertions, 2 deletions
diff --git a/mk/compiler/ccache.mk b/mk/compiler/ccache.mk
index 1487f60fee3..fe52bfbbeaf 100644
--- a/mk/compiler/ccache.mk
+++ b/mk/compiler/ccache.mk
@@ -1,4 +1,4 @@
-# $NetBSD: ccache.mk,v 1.27 2006/07/21 14:27:56 jlam Exp $
+# $NetBSD: ccache.mk,v 1.28 2006/10/14 08:59:08 rillig Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -35,11 +35,22 @@
# POSSIBILITY OF SUCH DAMAGE.
#
+# User-settable variables:
+#
+# CCACHE_DIR
+# The directory where the cached compiler results are stored. By
+# default, they are stored inside WRKDIR, so they are lost after
+# a "make clean".
+#
+
.if !defined(COMPILER_CCACHE_MK)
COMPILER_CCACHE_MK= defined
.include "../../mk/bsd.prefs.mk"
+# User-settable variables
+CCACHE_DIR?= ${WRKDIR}/.ccache
+
.if !empty(PKGPATH:Mdevel/ccache) || !empty(PKGPATH:Mdevel/patch)
IGNORE_CCACHE= yes
MAKEFLAGS+= IGNORE_CCACHE=yes
@@ -70,7 +81,7 @@ _USE_CCACHE= YES
EVAL_PREFIX+= _CCACHEBASE=ccache
_CCACHEBASE_DEFAULT= ${LOCALBASE}
-_CCACHE_DIR= ${WRKDIR}/.ccache
+_CCACHE_DIR= ${CCACHE_DIR}
_CCACHE_VARS= # empty
. if !empty(_LANGUAGES.ccache:Mc)
PKG_CC?= ${CC}