Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Mar 2018 02:09:36 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330722 - head/sys/conf
Message-ID:  <201803100209.w2A29aZ6068978@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803100209.w2A29aZ6068978>