freebsd-skq/share/mk/local.sys.mk
sjg 206f180a1a Rename META_MODE option to DIRDEPS_BUILD
This allows META_FILES option to be renamed META_MODE.
Also add META_COOKIE_TOUCH for use in targets that can benefit
from a cookie when in meta mode.

Differential Revision:	https://reviews.freebsd.org/D4153
Reviewed by:	bdrewery
2015-11-14 03:24:48 +00:00

38 lines
700 B
Makefile

# $FreeBSD$
.if ${MK_DIRDEPS_BUILD} == "yes"
MAKE_PRINT_VAR_ON_ERROR+= \
.CURDIR \
.MAKE \
.OBJDIR \
.TARGETS \
DESTDIR \
LD_LIBRARY_PATH \
MACHINE \
MACHINE_ARCH \
MAKEOBJDIRPREFIX \
MAKESYSPATH \
MAKE_VERSION\
SRCTOP \
OBJTOP \
${MAKE_PRINT_VAR_ON_ERROR_XTRAS}
.if ${.MAKE.LEVEL} > 0
MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH
.endif
.endif
.include "src.sys.mk"
.if ${.MAKE.MODE:Unormal:Mmeta*} != ""
# we can afford to use cookies to prevent some targets
# re-running needlessly
META_COOKIE_TOUCH= touch ${COOKIE.${.TARGET}:U${.OBJDIR}/${.TARGET}}
# some targets need to be .PHONY - but not in meta mode
META_NOPHONY=
.else
META_COOKIE_TOUCH=
META_NOPHONY= .PHONY
.endif