3 .if ${MK_DIRDEPS_BUILD} == "yes"
4 MAKE_PRINT_VAR_ON_ERROR+= \
19 ${MAKE_PRINT_VAR_ON_ERROR_XTRAS}
21 .if ${.MAKE.LEVEL} > 0
22 MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH
27 OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP}
32 .if ${.MAKE.MODE:Mmeta*} != ""
33 # we can afford to use cookies to prevent some targets
34 # re-running needlessly but only when using filemon.
35 # Targets that should support the meta mode cookie handling should just be
36 # added to META_TARGETS. If bsd.sys.mk cannot be included then ${META_DEPS}
37 # should be added as a target dependency as well. Otherwise the target
38 # is added to in bsd.sys.mk since it comes last.
39 .if ${.MAKE.MODE:Mnofilemon} == ""
40 # Prepend .OBJDIR if not already there.
41 _META_COOKIE_COND= "${.TARGET:M${.OBJDIR}/*}" == ""
42 _META_COOKIE_DEFAULT= ${${_META_COOKIE_COND}:?${.OBJDIR}/${.TARGET}:${.TARGET}}
43 # Use the default if COOKIE.${.TARGET} is not defined.
44 META_COOKIE= ${COOKIE.${.TARGET}:U${_META_COOKIE_DEFAULT}}
45 META_COOKIE_RM= @rm -f ${META_COOKIE}
46 META_COOKIE_TOUCH= @touch ${META_COOKIE}
47 CLEANFILES+= ${META_TARGETS}
48 _meta_dep_before: .USEBEFORE .NOTMAIN
50 _meta_dep_after: .USE .NOTMAIN
52 # Attach this to a target to allow it to benefit from meta mode's
53 # not rerunning a command if it doesn't need to be considering its
54 # metafile/filemon-tracked dependencies.
55 META_DEPS= _meta_dep_before _meta_dep_after .META
58 # some targets need to be .PHONY - but not in meta mode
64 META_DEPS+= ${META_NOPHONY}