1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-13 14:40:22 +00:00

FAST_DEPEND: Rework optimization for r290524.

The .MAKEFLAGS check inside of the .for loop is extremely slow for some
reason.  Just moving it out of the loop trimmed -V lookup time from 11
seconds to 1 second in the kernel obj directory.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-01-15 22:08:51 +00:00
parent 0e47853e87
commit 9f286e8295
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=294104
2 changed files with 8 additions and 8 deletions

View File

@ -170,12 +170,12 @@ DEPENDSRCS= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc}
.if !empty(DEPENDSRCS)
DEPENDOBJS+= ${DEPENDSRCS:R:S,$,.o,}
.endif
.for __obj in ${DEPENDOBJS:O:u}
DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:${DEPEND_FILTER}:C/^/${DEPENDFILE}./}
.if ${.MAKEFLAGS:M-V} == ""
.sinclude "${DEPENDFILE}.${__obj:${DEPEND_FILTER}}"
.endif
DEPENDFILES_OBJS+= ${DEPENDFILE}.${__obj:${DEPEND_FILTER}}
.for __depend_obj in ${DEPENDFILES_OBJS}
.sinclude "${__depend_obj}"
.endfor
.endif
.endif # ${MK_FAST_DEPEND} == "yes"
.endif # defined(SRCS)

View File

@ -206,12 +206,12 @@ DEPEND_CFLAGS+= -MD -MP -MF.depend.${.TARGET}
DEPEND_CFLAGS+= -MT${.TARGET}
CFLAGS+= ${DEPEND_CFLAGS}
DEPENDOBJS+= ${SYSTEM_OBJS}
.for __obj in ${DEPENDOBJS:O:u}
DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:C/^/.depend./}
.if ${.MAKEFLAGS:M-V} == ""
.sinclude ".depend.${__obj}"
.endif
DEPENDFILES_OBJS+= .depend.${__obj}
.for __depend_obj in ${DEPENDFILES_OBJS}
.sinclude "${__depend_obj}"
.endfor
.endif
.endif # ${MK_FAST_DEPEND} == "yes"
.NOPATH: .depend ${DEPENDFILES_OBJS}