aboutsummaryrefslogtreecommitdiff
path: root/share/mk
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-03-11 23:45:28 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-03-11 23:45:28 +0000
commitb7d28aff1009ed31d870976928b60328bf585d07 (patch)
tree37e447dacda2e5ea234551343f02afffa679865c /share/mk
parentbd08afe1c93546441a7b2a7a366579959f098940 (diff)
downloadsrc-b7d28aff1009ed31d870976928b60328bf585d07.tar.gz
src-b7d28aff1009ed31d870976928b60328bf585d07.zip
META_MODE: Simplify the META_COOKIE handling to use .USE/.USEBEFORE.
Extend it to other cases of meta mode cookies so they get the proper rm cookie behavior when a .meta file detects it needs to rebuild and fails. Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=296700
Diffstat (limited to 'share/mk')
-rw-r--r--share/mk/local.sys.mk14
1 files changed, 11 insertions, 3 deletions
diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk
index 269e25380802..2236dfe2f460 100644
--- a/share/mk/local.sys.mk
+++ b/share/mk/local.sys.mk
@@ -33,10 +33,18 @@ 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_COOKIES}
+CLEANFILES+= ${META_TARGETS}
+_meta_dep_before: .USEBEFORE
+ ${META_COOKIE_RM}
+_meta_dep_after: .USE
+ ${META_COOKIE_TOUCH}
+# Attach this to a target to allow it to benefit from meta mode's
+# 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
.else
META_COOKIE_RM=
META_COOKIE_TOUCH=
-META_NOPHONY= .PHONY
+META_NOPHONY= .PHONY
.endif
-
+META_DEPS+= ${META_NOPHONY}