summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2016-03-11 04:09:56 +0000
committerbdrewery <bdrewery@FreeBSD.org>2016-03-11 04:09:56 +0000
commitf0db244394c49d3031076230e3282062aa6ae429 (patch)
tree70f5e9651e09106bdf68283bad122e33a884a1be /sys/conf
parentef44939f33a0e14b0928cc8f20b6f51151334431 (diff)
downloadFreeBSD-src-f0db244394c49d3031076230e3282062aa6ae429.zip
FreeBSD-src-f0db244394c49d3031076230e3282062aa6ae429.tar.gz
FAST_DEPEND: Use .dinclude to enable full .depend logic in bmake.
The inclusion of .MAKE.DEPENDFILE (.depend) has special logic in make to ignore stale/missing dependencies. bmake 20160220 added a '.dinclude' directive that uses the special logic for .depend when including the file. This fixes a build error when a file is moved or deleted that exists in a .depend.OBJ file. This happened in r292782 when sha512c.c "moved" and an incremental build of lib/libmd would fail with: make: don't know how to make /usr/src/lib/libcrypt/../libmd/sha512c.c. Stop Now this will just be seen as a stale dependency and cause a rebuild: make: /usr/obj/usr/src/lib/libmd/.depend.sha512c.o, 13: ignoring stale .depend for /usr/src/lib/libcrypt/../libmd/sha512c.c --- sha512c.o --- ... This rebuild will only be done once since the .depend.sha512c.o will be updated on the build with the -MF flags. This also removes -MP being passed for the .depend.OBJ generation (which would create fake targets for system headers) since the logic is no longer needed to protect from missing files. Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/kern.post.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
index ba2c792..d5047a8 100644
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -231,7 +231,10 @@ _meta_filemon= 1
.if ${MK_FAST_DEPEND} == "yes"
DEPENDOBJS+= ${SYSTEM_OBJS} genassym.o
DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:C/^/.depend./}
-DEPEND_CFLAGS+= -MD -MP -MF.depend.${.TARGET}
+.if ${MAKE_VERSION} < 20160220
+DEPEND_MP?= -MP
+.endif
+DEPEND_CFLAGS+= -MD ${DEPEND_MP} -MF.depend.${.TARGET}
DEPEND_CFLAGS+= -MT${.TARGET}
.if !defined(_meta_filemon)
.if defined(.PARSEDIR)
@@ -244,7 +247,11 @@ CFLAGS+= ${DEPEND_CFLAGS}
.endif
.if !defined(_SKIP_READ_DEPEND)
.for __depend_obj in ${DEPENDFILES_OBJS}
+.if ${MAKE_VERSION} < 20160220
.sinclude "${.OBJDIR}/${__depend_obj}"
+.else
+.dinclude "${.OBJDIR}/${__depend_obj}"
+.endif
.endfor
.endif # !defined(_SKIP_READ_DEPEND)
.endif # !defined(_meta_filemon)
OpenPOWER on IntegriCloud