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
This commit is contained in:
Bryan Drewery 2018-03-10 02:09:36 +00:00
parent dec5441a32
commit d395e093ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330722
2 changed files with 4 additions and 2 deletions

View File

@ -50,7 +50,8 @@ KERN_OPTS!=cat ${KERNBUILDDIR}/opt*.h | awk '{print $$2;}' | sort -u
.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

View File

@ -214,7 +214,8 @@ SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
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