aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-03-01 22:25:54 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-03-01 22:25:54 +0000
commit2eed38a0703d257b27c17b877c9aa189f7afbabf (patch)
tree7fb89b36685198743b53d11ffa1a0edfc815921a /share
parente03766c6a9463ebccfa0d10a884f601d07ba1422 (diff)
downloadsrc-2eed38a0703d257b27c17b877c9aa189f7afbabf.tar.gz
src-2eed38a0703d257b27c17b877c9aa189f7afbabf.zip
CCACHE_BUILD+META_MODE: Lookup and canonicalize the default CCACHE_DIR.
This is done to prevent not having CCACHE_DIR causing meta mode with filemon to see stat changes in the ccache dir and cause rebuilds. Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=296282
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.compiler.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk
index dee6a1d8a288..a697526ab339 100644
--- a/share/mk/bsd.compiler.mk
+++ b/share/mk/bsd.compiler.mk
@@ -83,7 +83,11 @@ CCACHE_NOCPP2= 1
.export CCACHE_NOCPP2
.endif
# Canonicalize CCACHE_DIR for meta mode usage.
-.if defined(CCACHE_DIR) && empty(.MAKE.META.IGNORE_PATHS:M${CCACHE_DIR})
+.if !defined(CCACHE_DIR)
+CCACHE_DIR!= ${CCACHE_BIN} -p | awk '$$2 == "cache_dir" {print $$4}'
+.export CCACHE_DIR
+.endif
+.if !empty(CCACHE_DIR) && empty(.MAKE.META.IGNORE_PATHS:M${CCACHE_DIR})
CCACHE_DIR:= ${CCACHE_DIR:tA}
.MAKE.META.IGNORE_PATHS+= ${CCACHE_DIR}
.export CCACHE_DIR