aboutsummaryrefslogtreecommitdiff
path: root/share/mk/local.sys.mk
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-03-11 23:45:32 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-03-11 23:45:32 +0000
commit95ae4929293be72b8addfbefa5d1c01b1f4dd500 (patch)
tree3bf670697257638a001fa40f2c0597b2c38ee94e /share/mk/local.sys.mk
parentb7d28aff1009ed31d870976928b60328bf585d07 (diff)
downloadsrc-95ae4929293be72b8addfbefa5d1c01b1f4dd500.tar.gz
src-95ae4929293be72b8addfbefa5d1c01b1f4dd500.zip
META_MODE: We can only use a cookie if filemon is being used.
Sponsored by: EMC / Isilon Storage Divsion
Notes
Notes: svn path=/head/; revision=296701
Diffstat (limited to 'share/mk/local.sys.mk')
-rw-r--r--share/mk/local.sys.mk12
1 files changed, 7 insertions, 5 deletions
diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk
index 2236dfe2f460..59d689933a67 100644
--- a/share/mk/local.sys.mk
+++ b/share/mk/local.sys.mk
@@ -27,12 +27,11 @@ MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH
.if ${.MAKE.MODE:Mmeta*} != ""
# we can afford to use cookies to prevent some targets
-# re-running needlessly
+# re-running needlessly but only when using filemon.
+.if ${.MAKE.MODE:Mnofilemon} == ""
META_COOKIE= ${COOKIE.${.TARGET}:U${.OBJDIR}/${.TARGET}}
META_COOKIE_RM= @rm -f ${META_COOKIE}
META_COOKIE_TOUCH= @touch ${META_COOKIE}
-# some targets need to be .PHONY - but not in meta mode
-META_NOPHONY=
CLEANFILES+= ${META_TARGETS}
_meta_dep_before: .USEBEFORE
${META_COOKIE_RM}
@@ -42,9 +41,12 @@ _meta_dep_after: .USE
# not rerunning a command if it doesn't need to be considering its
# metafile/filemon-tracked dependencies.
META_DEPS= _meta_dep_before _meta_dep_after .META
+.endif
.else
-META_COOKIE_RM=
-META_COOKIE_TOUCH=
+# some targets need to be .PHONY - but not in meta mode
META_NOPHONY= .PHONY
.endif
+META_NOPHONY?=
+META_COOKIE_RM?=
+META_COOKIE_TOUCH?=
META_DEPS+= ${META_NOPHONY}