FAST_DEPEND: Allow not using -MP by setting DEPEND_MP blank.

-MP creates empty targets for all dependency files, which can be useful when a
dependency is deleted from the file system.  This would otherwise cause an
error for "don't know how to build FOO" since the .depend file is included
with the dependency registered.

This is mostly a workaround for the misc/dahdi-kmod port using '::' for one of
its dependencies, while -MP uses just ':'.  This results in an 'Inconsistent
operator for' error.

X-MFC-With:	r290433
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2015-12-01 03:00:10 +00:00
parent d6767a972c
commit 593e465913
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291554

View File

@ -59,7 +59,8 @@ DEPENDFILE?= .depend
DEPENDFILES= ${DEPENDFILE}
.if ${MK_FAST_DEPEND} == "yes" && ${.MAKE.MODE:Unormal:Mmeta*} == ""
DEPENDFILES+= ${DEPENDFILE}.*
DEPEND_CFLAGS+= -MD -MP -MF${DEPENDFILE}.${.TARGET}
DEPEND_MP?= -MP
DEPEND_CFLAGS+= -MD -MF${DEPENDFILE}.${.TARGET}
DEPEND_CFLAGS+= -MT${.TARGET}
CFLAGS+= ${DEPEND_CFLAGS}
DEPENDOBJS+= ${OBJS} ${POBJS} ${SOBJS}