svn commit: r294104 - in head: share/mk sys/conf
Bryan Drewery
bdrewery at FreeBSD.org
Fri Jan 15 22:08:52 UTC 2016
Author: bdrewery
Date: Fri Jan 15 22:08:51 2016
New Revision: 294104
URL: https://svnweb.freebsd.org/changeset/base/294104
Log:
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
Modified:
head/share/mk/bsd.dep.mk
head/sys/conf/kern.post.mk
Modified: head/share/mk/bsd.dep.mk
==============================================================================
--- head/share/mk/bsd.dep.mk Fri Jan 15 21:59:18 2016 (r294103)
+++ head/share/mk/bsd.dep.mk Fri Jan 15 22:08:51 2016 (r294104)
@@ -170,12 +170,12 @@ DEPENDSRCS= ${SRCS:M*.[cSC]} ${SRCS:M*.c
.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)
Modified: head/sys/conf/kern.post.mk
==============================================================================
--- head/sys/conf/kern.post.mk Fri Jan 15 21:59:18 2016 (r294103)
+++ head/sys/conf/kern.post.mk Fri Jan 15 22:08:51 2016 (r294104)
@@ -206,12 +206,12 @@ DEPEND_CFLAGS+= -MD -MP -MF.depend.${.TA
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}
More information about the svn-src-head
mailing list