FAST_DEPEND: Still need to remove DEPENDFILE when rebuilding.

This avoids _EXTRADEPEND adding duplicate entries.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-02-24 20:28:45 +00:00
parent 4b515c03a6
commit 80f9a973ef

View File

@ -268,8 +268,10 @@ DPSRCS+= ${SRCS}
# FAST_DEPEND will only generate a .depend if _EXTRADEPEND is used but
# the target is created to allow 'make depend' to generate files.
${DEPENDFILE}: ${DPSRCS}
.if ${MK_FAST_DEPEND} == "no"
.if exists(${.OBJDIR}/${DEPENDFILE})
rm -f ${DEPENDFILE}
.endif
.if ${MK_FAST_DEPEND} == "no"
.if !empty(DPSRCS:M*.[cS])
${MKDEPCMD} -f ${DEPENDFILE} -a ${MKDEP} \
${MKDEP_CFLAGS} ${.ALLSRC:M*.[cS]}