svn commit: r297995 - head/share/mk
Bryan Drewery
bdrewery at FreeBSD.org
Thu Apr 14 21:04:47 UTC 2016
Author: bdrewery
Date: Thu Apr 14 21:04:45 2016
New Revision: 297995
URL: https://svnweb.freebsd.org/changeset/base/297995
Log:
Follow-up r297835: Let the intented default cookie work.
This happened to work for not prepending .OBJDIR twice but broke the
other case of prepending it when needed.
Pointyhat to: bdrewery
Sponsored by: EMC / Isilon Storage Division
Modified:
head/share/mk/local.sys.mk
Modified: head/share/mk/local.sys.mk
==============================================================================
--- head/share/mk/local.sys.mk Thu Apr 14 21:04:42 2016 (r297994)
+++ head/share/mk/local.sys.mk Thu Apr 14 21:04:45 2016 (r297995)
@@ -37,8 +37,11 @@ OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCT
# should be added as a target dependency as well. Otherwise the target
# is added to in bsd.sys.mk since it comes last.
.if ${.MAKE.MODE:Mnofilemon} == ""
-META_COOKIE_COND= empty(.TARGET:M${.OBJDIR})
-META_COOKIE= ${COOKIE.${.TARGET}:U${${META_COOKIE_COND}:?${.OBJDIR}/${.TARGET}:${.TARGET}}}
+# Prepend .OBJDIR if not already there.
+_META_COOKIE_COND= "${.TARGET:M${.OBJDIR}/*}" == ""
+_META_COOKIE_DEFAULT= ${${_META_COOKIE_COND}:?${.OBJDIR}/${.TARGET}:${.TARGET}}
+# Use the default if COOKIE.${.TARGET} is not defined.
+META_COOKIE= ${COOKIE.${.TARGET}:U${_META_COOKIE_DEFAULT}}
META_COOKIE_RM= @rm -f ${META_COOKIE}
META_COOKIE_TOUCH= @touch ${META_COOKIE}
CLEANFILES+= ${META_TARGETS}
More information about the svn-src-all
mailing list