From: espie Date: Wed, 5 Jul 2017 13:30:01 +0000 (+0000) Subject: based on florian@'s observation and guenther@'s work in kernel makefiles. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8c219cff3819d53af9bf66050ad7a651e07dfaad;p=openbsd based on florian@'s observation and guenther@'s work in kernel makefiles. don't include .d files during obj and cleanup, because those files might be utterly bogus following an untimely reboot. This allows cleaning stuff up without needing to manually remove those files. okay millert@, kettenis@ --- diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index 14ab062d025..60d70e479ed 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.dep.mk,v 1.19 2017/07/04 00:59:11 espie Exp $ +# $OpenBSD: bsd.dep.mk,v 1.20 2017/07/05 13:30:01 espie Exp $ # $NetBSD: bsd.dep.mk,v 1.12 1995/09/27 01:15:09 christos Exp $ .if !target(depend) @@ -8,9 +8,12 @@ depend: # relies on DEPS defined by bsd.lib.mk and bsd.prog.mk .if defined(DEPS) && !empty(DEPS) -. for o in ${DEPS} - sinclude $o -. endfor +# catch22: don't include potentially bogus files we are going to clean +. if !(make(clean) || make(cleandir) || make(obj)) +. for o in ${DEPS} + sinclude $o +. endfor +. endif .endif CFLAGS += -MD -MP