DIRDEPS_BUILD: Remove the cookie when target is out-of-date.
The meta file may decide the target is out of date but nothing ensures that the *next* build will build this target if it fails this time for some reason; it is still out-of-date until it succeeds. Convert the include/ cookie usage to the global versions. Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
959824daba
commit
588f5cb86d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296690
@ -131,6 +131,7 @@ _MARCHS+= x86
|
|||||||
.if ${MK_STAGING} == "yes"
|
.if ${MK_STAGING} == "yes"
|
||||||
# tell bsd.incs.mk that we have it covered
|
# tell bsd.incs.mk that we have it covered
|
||||||
NO_STAGE_INCLUDES=
|
NO_STAGE_INCLUDES=
|
||||||
|
META_COOKIES+= stage_prep stage_include compat copies symlinks
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
@ -157,6 +158,7 @@ ${SHARED}: compat
|
|||||||
|
|
||||||
# Take care of stale directory-level symlinks.
|
# Take care of stale directory-level symlinks.
|
||||||
compat:
|
compat:
|
||||||
|
${META_COOKIE_RM}
|
||||||
.for i in ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} crypto
|
.for i in ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} crypto
|
||||||
if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \
|
if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \
|
||||||
rm -f ${DESTDIR}${INCLUDEDIR}/$i; \
|
rm -f ${DESTDIR}${INCLUDEDIR}/$i; \
|
||||||
@ -165,11 +167,10 @@ compat:
|
|||||||
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
|
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
|
||||||
-f ${.CURDIR}/../etc/mtree/BSD.include.dist \
|
-f ${.CURDIR}/../etc/mtree/BSD.include.dist \
|
||||||
-p ${DESTDIR}${INCLUDEDIR} > /dev/null
|
-p ${DESTDIR}${INCLUDEDIR} > /dev/null
|
||||||
.if ${MK_DIRDEPS_BUILD} == "yes"
|
${META_COOKIE_TOUCH}
|
||||||
@touch ${.TARGET}
|
|
||||||
.endif
|
|
||||||
|
|
||||||
copies:
|
copies:
|
||||||
|
${META_COOKIE_RM}
|
||||||
.for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto machine machine/pc \
|
.for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto machine machine/pc \
|
||||||
${_MARCHS}
|
${_MARCHS}
|
||||||
if [ -d ${DESTDIR}${INCLUDEDIR}/$i ]; then \
|
if [ -d ${DESTDIR}${INCLUDEDIR}/$i ]; then \
|
||||||
@ -254,11 +255,10 @@ copies:
|
|||||||
cd ${.CURDIR}/../sys/teken; \
|
cd ${.CURDIR}/../sys/teken; \
|
||||||
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \
|
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 teken.h \
|
||||||
${DESTDIR}${INCLUDEDIR}/teken
|
${DESTDIR}${INCLUDEDIR}/teken
|
||||||
.if ${MK_DIRDEPS_BUILD} == "yes"
|
${META_COOKIE_TOUCH}
|
||||||
@touch ${.OBJDIR}/${.TARGET}
|
|
||||||
.endif
|
|
||||||
|
|
||||||
symlinks:
|
symlinks:
|
||||||
|
${META_COOKIE_RM}
|
||||||
@${ECHO} "Setting up symlinks to kernel source tree..."
|
@${ECHO} "Setting up symlinks to kernel source tree..."
|
||||||
.for i in ${LDIRS}
|
.for i in ${LDIRS}
|
||||||
cd ${.CURDIR}/../sys/$i; \
|
cd ${.CURDIR}/../sys/$i; \
|
||||||
@ -371,9 +371,7 @@ symlinks:
|
|||||||
${INSTALL_SYMLINK} ../../../sys/rpc/$$h \
|
${INSTALL_SYMLINK} ../../../sys/rpc/$$h \
|
||||||
${DESTDIR}${INCLUDEDIR}/rpc; \
|
${DESTDIR}${INCLUDEDIR}/rpc; \
|
||||||
done
|
done
|
||||||
.if ${MK_DIRDEPS_BUILD} == "yes"
|
${META_COOKIE_TOUCH}
|
||||||
@touch ${.OBJDIR}/${.TARGET}
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if ${MACHINE} == "host" && !defined(_SKIP_BUILD)
|
.if ${MACHINE} == "host" && !defined(_SKIP_BUILD)
|
||||||
# we're here because we are building a sysroot...
|
# we're here because we are building a sysroot...
|
||||||
|
@ -28,10 +28,14 @@ MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH
|
|||||||
.if ${.MAKE.MODE:Mmeta*} != ""
|
.if ${.MAKE.MODE:Mmeta*} != ""
|
||||||
# we can afford to use cookies to prevent some targets
|
# we can afford to use cookies to prevent some targets
|
||||||
# re-running needlessly
|
# re-running needlessly
|
||||||
META_COOKIE_TOUCH= touch ${COOKIE.${.TARGET}:U${.OBJDIR}/${.TARGET}}
|
META_COOKIE= ${COOKIE.${.TARGET}:U${.OBJDIR}/${.TARGET}}
|
||||||
|
META_COOKIE_RM= @rm -f ${META_COOKIE}
|
||||||
|
META_COOKIE_TOUCH= @touch ${META_COOKIE}
|
||||||
# some targets need to be .PHONY - but not in meta mode
|
# some targets need to be .PHONY - but not in meta mode
|
||||||
META_NOPHONY=
|
META_NOPHONY=
|
||||||
|
CLEANFILES+= ${META_COOKIES}
|
||||||
.else
|
.else
|
||||||
|
META_COOKIE_RM=
|
||||||
META_COOKIE_TOUCH=
|
META_COOKIE_TOUCH=
|
||||||
META_NOPHONY= .PHONY
|
META_NOPHONY= .PHONY
|
||||||
.endif
|
.endif
|
||||||
|
Loading…
Reference in New Issue
Block a user