FAST_DEPEND: Don't waste time generating an empty .depend file.

The .depend file will still be generated if _EXTRADEPEND is used.  The target
is kept with a dependency on DPSRCS though so that 'make depend' will generate
all files.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
bdrewery 2016-02-24 17:19:09 +00:00
parent 99c769b1d7
commit 7171d0bbd8
2 changed files with 2 additions and 4 deletions

View File

@ -246,6 +246,8 @@ MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} \
.endif # ${MK_FAST_DEPEND} == "no"
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"
rm -f ${DEPENDFILE}
@ -260,8 +262,6 @@ ${DEPENDFILE}: ${DPSRCS}
${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cpp} ${.ALLSRC:M*.cxx}
.else
.endif
.else
: > ${.TARGET}
.endif # ${MK_FAST_DEPEND} == "no"
.if target(_EXTRADEPEND)
_EXTRADEPEND: .USE

View File

@ -278,8 +278,6 @@ ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
${MAKE} -V SFILES_CDDL | \
CC="${_MKDEPCC}" xargs mkdep -a -f ${.TARGET}.tmp ${ZFS_ASM_CFLAGS}
mv ${.TARGET}.tmp ${.TARGET}
.else
: > ${.TARGET}
.endif
_ILINKS= machine