From b4d68e99ba6ead8f9a7e44675ae32bab2b9a8c89 Mon Sep 17 00:00:00 2001 From: tb <> Date: Mon, 23 Jan 2017 23:54:01 +0000 Subject: [PATCH] Interpolate a 'make cleandir' if KEEPKERNELS is set to a non-empty string, right before building kernels. This should unbreak 'make release' for people having this setting. ok deraadt --- src/etc/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/etc/Makefile b/src/etc/Makefile index 63d4cfe9..a948ac26 100644 --- a/src/etc/Makefile +++ b/src/etc/Makefile @@ -1,4 +1,6 @@ -# $OpenBSD: Makefile,v 1.446 2016/11/20 11:00:19 tb Exp $ +# $OpenBSD: Makefile,v 1.447 2017/01/23 23:54:01 tb Exp $ + +.include TZDIR= /usr/share/zoneinfo LOCALTIME= Canada/Mountain @@ -15,8 +17,9 @@ KERNELS = GENERIC bsd .for CONF K in ${KERNELS} . if !target($K) $K: - cd ../sys/arch/${MACHINE}/compile/${CONF} && ${MAKE} config && \ - ${MAKE} clean && exec ${MAKE} + cd ../sys/arch/${MACHINE}/compile/${CONF} && \ + { [[ -n "${KEEPKERNELS}" ]] || ${MAKE} cleandir; } && \ + ${MAKE} config && ${MAKE} clean && exec ${MAKE}; . endif ALL_KERNELS += $K .endfor @@ -238,7 +241,6 @@ release: @echo setenv RELEASEDIR before building a release. @false .else - release: umask ${WOBJUMASK}; exec ${MAKE} do-release