From owner-svn-src-all@freebsd.org Sat Jul 4 05:43:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 990C2995D80; Sat, 4 Jul 2015 05:43:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 843B21ED0; Sat, 4 Jul 2015 05:43:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t645hkcv010203; Sat, 4 Jul 2015 05:43:46 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t645hkAF010201; Sat, 4 Jul 2015 05:43:46 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201507040543.t645hkAF010201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 4 Jul 2015 05:43:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285124 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2015 05:43:46 -0000 Author: imp Date: Sat Jul 4 05:43:45 2015 New Revision: 285124 URL: https://svnweb.freebsd.org/changeset/base/285124 Log: Cache _MPATH and pass it down into the modules build. Some NFS setups make the find it does extremely expensive, so compute it only once. Also make sure the 'traditional' module building method works at the expense of a bit of duplicated code. Modified: head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Sat Jul 4 03:15:42 2015 (r285123) +++ head/sys/conf/kern.pre.mk Sat Jul 4 05:43:45 2015 (r285124) @@ -198,6 +198,12 @@ SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symb ${SIZE} ${.TARGET} ; chmod 755 ${.TARGET} SYSTEM_DEP+= ${LDSCRIPT} +# Calculate path for .m files early, if needed. +.if !defined(_MPATH) +__MPATH!=find ${S:tA}/ -name \*_if.m +_MPATH=${__MPATH:H:O:u} +.endif + # MKMODULESENV is set here so that port makefiles can augment # them. @@ -214,6 +220,7 @@ MKMODULESENV+= MODULES_OVERRIDE="${MODUL .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif +MKMODULESENV+= _MPATH="${_MPATH}" # Detect kernel config options that force stack frames to be turned on. DDB_ENABLED!= grep DDB opt_ddb.h || true ; echo Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Sat Jul 4 03:15:42 2015 (r285123) +++ head/sys/conf/kmod.mk Sat Jul 4 05:43:45 2015 (r285124) @@ -355,8 +355,10 @@ vnode_if_typedef.h: .endif # Build _if.[ch] from _if.m, and clean them when we're done. +.if !defined(_MPATH) __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m _MPATH=${__MPATH:H:O:u} +.endif .PATH.m: ${_MPATH} .for _s in ${SRCS:M*_if.[ch]} .if eixsts(${_s:R}.m})