From cd1acc77e651a48492ed621f8c066198f4329fb5 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 3 Jul 2018 21:29:04 +0000 Subject: [PATCH] Fix .depend.foo.o tracking for sys/conf/files defined compilations. Some example files: ia32_genassym.o acpi_wakecode.o The old mkdep method also lacked tracking these files. Objects defined in sys/conf/files with no-obj and no-implicit-rule get their own targets defined in the kernel Makefile but lack having their objects added to DEPENDOBJS so never get a .depend file generated. Normally if an object is in OBJS it will get a .depend file. Fix this by looking for .o files in CLEAN and ensuring they are part of the -MD filtering and .depend loading. This is a hack. Other solutions could exist involving sys/conf/files or config(8) to auto add these to DEPENDFILES/DEPENDOBJS but this method seems reliable enough without being intrusive or error-prone for new files. Reported by: bde MFC after: 3 weeks Sponsored by: Dell EMC --- sys/conf/kern.post.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 39570f18d613..8b7748e8c06c 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -230,6 +230,7 @@ SRCS= assym.inc offset.inc vnode_if.h ${BEFORE_DEPEND} ${CFILES} \ ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ ${MFILES:T:S/.m$/.h/} DEPENDOBJS+= ${SYSTEM_OBJS} genassym.o genoffset.o genoffset_test.o +DEPENDOBJS+= ${CLEAN:M*.o} DEPENDFILES= ${DEPENDOBJS:O:u:C/^/.depend./} .if ${MAKE_VERSION} < 20160220 DEPEND_MP?= -MP