diff --git a/Makefile b/Makefile index bc191e15c9c2..49fe0ab6dfa7 100644 --- a/Makefile +++ b/Makefile @@ -159,6 +159,8 @@ _MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} MK_AUTO_OBJ=no ${MAKE} \ # We cannot blindly use a make which may not be the one we want # so be exlicit - until all choice is removed. WANT_MAKE= bmake +# 20160220 - support .dinclude for FAST_DEPEND. +WANT_MAKE_VERSION= 20160220 MYMAKE= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}/${WANT_MAKE} .if defined(.PARSEDIR) HAVE_MAKE= bmake diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index 19ab9e558aa1..92c10a4a90b4 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -176,7 +176,9 @@ ${_D}.po: ${_DSRC} ${POBJS:S/^${_D}.po$//} _meta_filemon= 1 .endif .if ${MK_FAST_DEPEND} == "yes" +.if ${MAKE_VERSION} < 20160220 DEPEND_MP?= -MP +.endif # Handle OBJS=../somefile.o hacks. Just replace '/' rather than use :T to # avoid collisions. DEPEND_FILTER= C,/,_,g @@ -200,7 +202,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) diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index ba2c7928fbe3..d5047a840344 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)