svn commit: r291744 - in head/sys: conf modules
Bryan Drewery
bdrewery at FreeBSD.org
Fri Dec 4 04:27:22 UTC 2015
Author: bdrewery
Date: Fri Dec 4 04:27:21 2015
New Revision: 291744
URL: https://svnweb.freebsd.org/changeset/base/291744
Log:
Calculate MPATH for sys/modules to save 92% time in a basic 'obj' tree-walk.
Sponsored by: EMC / Isilon Storage Division
Modified:
head/sys/conf/kmod.mk
head/sys/modules/Makefile
Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk Fri Dec 4 03:54:18 2015 (r291743)
+++ head/sys/conf/kmod.mk Fri Dec 4 04:27:21 2015 (r291744)
@@ -370,8 +370,10 @@ vnode_if_typedef.h:
.endif
# Build _if.[ch] from _if.m, and clean them when we're done.
+# This is duplicated in sys/modules/Makefile.
.if !defined(__MPATH)
__MPATH!=find ${SYSDIR:tA}/ -name \*_if.m
+.export __MPATH
.endif
_MFILES=${__MPATH:T:O}
_MPATH=${__MPATH:H:O:u}
Modified: head/sys/modules/Makefile
==============================================================================
--- head/sys/modules/Makefile Fri Dec 4 03:54:18 2015 (r291743)
+++ head/sys/modules/Makefile Fri Dec 4 04:27:21 2015 (r291744)
@@ -771,6 +771,12 @@ afterinstall:
.include "${SYSDIR}/conf/config.mk"
+# Use sys/conf/kmod.mk's MPATH to avoid redundantly running in every subdir.
+.if !defined(__MPATH)
+__MPATH!=find ${SYSDIR:tA}/ -name \*_if.m
+.export __MPATH
+.endif
+
SUBDIR:= ${SUBDIR:u:O}
.include <bsd.subdir.mk>
More information about the svn-src-head
mailing list