WITH_META_MODE: Avoid "building" .depend if there is nothing to do.

This avoids 'Building /path/.depend' when it will not actually produce a
file.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-06-03 21:35:19 +00:00
parent 9051825205
commit 987c375f87

View File

@ -246,7 +246,9 @@ DPSRCS+= ${SRCS}
# beforedepend/_EXTRADEPEND/afterdepend. The target is kept
# to allow 'make depend' to generate files.
${DEPENDFILE}: ${DPSRCS}
.if !empty(.MAKE.MODE:Mmeta) || exists(${.OBJDIR}/${DEPENDFILE})
.if exists(${.OBJDIR}/${DEPENDFILE}) || \
((commands(beforedepend) || commands(_EXTRADEPEND) || \
commands(afterdepend)) && !empty(.MAKE.MODE:Mmeta))
rm -f ${DEPENDFILE}
.endif
.if target(_EXTRADEPEND)