svn commit: r330722 - head/sys/conf

Bryan Drewery bdrewery at FreeBSD.org
Sat Mar 10 02:09:37 UTC 2018


Author: bdrewery
Date: Sat Mar 10 02:09:36 2018
New Revision: 330722
URL: https://svnweb.freebsd.org/changeset/base/330722

Log:
  Reduce overhead for simple 'make -V' lookups by avoiding 'find sys/'.
  
  Setting -DNO_SKIP_MPATH can be used for debugging.
  
  Reported by:	bde
  MFC after:	2 weeks
  Sponsored by:	Dell EMC

Modified:
  head/sys/conf/config.mk
  head/sys/conf/kern.pre.mk

Modified: head/sys/conf/config.mk
==============================================================================
--- head/sys/conf/config.mk	Sat Mar 10 01:53:42 2018	(r330721)
+++ head/sys/conf/config.mk	Sat Mar 10 02:09:36 2018	(r330722)
@@ -50,7 +50,8 @@ KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | awk '{print $$
 .export KERN_OPTS
 .endif
 
-.if !defined(NO_MODULES) && !defined(__MPATH)
+.if !defined(NO_MODULES) && !defined(__MPATH) && !make(install) && \
+    (empty(.MAKEFLAGS:M-V) || defined(NO_SKIP_MPATH))
 __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m
 .export __MPATH
 .endif

Modified: head/sys/conf/kern.pre.mk
==============================================================================
--- head/sys/conf/kern.pre.mk	Sat Mar 10 01:53:42 2018	(r330721)
+++ head/sys/conf/kern.pre.mk	Sat Mar 10 02:09:36 2018	(r330722)
@@ -214,7 +214,8 @@ SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compil
 SYSTEM_DEP+= ${LDSCRIPT}
 
 # Calculate path for .m files early, if needed.
-.if !defined(NO_MODULES) && !defined(__MPATH) && !make(install)
+.if !defined(NO_MODULES) && !defined(__MPATH) && !make(install) && \
+    (empty(.MAKEFLAGS:M-V) || defined(NO_SKIP_MPATH))
 __MPATH!=find ${S:tA}/ -name \*_if.m
 .endif
 


More information about the svn-src-head mailing list