From 9e0a1e78e5492d22cd9cdcb24882bf4212e46f85 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Sat, 15 Jun 2019 17:08:28 +0000 Subject: [PATCH] META_MODE: Delete build targets that fail. If a meta mode change is triggered but then the build fails then the next build will not retrigger meta mode. This only prevented by removing the target on rebuild or on the failure to rebuild. Sponsored by: DellEMC --- share/mk/local.sys.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk index e3bfd572f411..a4b7b0561f15 100644 --- a/share/mk/local.sys.mk +++ b/share/mk/local.sys.mk @@ -33,6 +33,11 @@ MAKE_PRINT_VAR_ON_ERROR+= \ OBJTOP \ ${MAKE_PRINT_VAR_ON_ERROR_XTRAS} +# Meta mode may rebuild targets that then fail. The next build won't detect +# the meta mode change. Not all targets have a 'rm ${.TARGET}' in them +# so force it. +.DELETE_ON_ERROR: + .if ${.MAKE.LEVEL} > 0 MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH .endif