diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2016-03-11 23:45:28 +0000 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2016-03-11 23:45:28 +0000 |
commit | 88db8d87c1a2bf378fc44e1368317e5e9abc4103 (patch) | |
tree | 37e447dacda2e5ea234551343f02afffa679865c /share/mk/local.sys.mk | |
parent | d586594a01badd7a3134b7081cb2b07ecc8cea6a (diff) | |
download | FreeBSD-src-88db8d87c1a2bf378fc44e1368317e5e9abc4103.zip FreeBSD-src-88db8d87c1a2bf378fc44e1368317e5e9abc4103.tar.gz |
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
Diffstat (limited to 'share/mk/local.sys.mk')
-rw-r--r-- | share/mk/local.sys.mk | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk index 269e253..2236dfe 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} |