From owner-svn-src-head@freebsd.org Tue Dec 1 21:19:18 2015 Return-Path: Delivered-To: svn-src-head@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 51E16A3EA86; Tue, 1 Dec 2015 21:19:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 F3F6C19F3; Tue, 1 Dec 2015 21:19:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1LJHUt095487; Tue, 1 Dec 2015 21:19:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1LJHu8095485; Tue, 1 Dec 2015 21:19:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201512012119.tB1LJHu8095485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 1 Dec 2015 21:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291614 - 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 21:19:18 -0000 Author: jhb Date: Tue Dec 1 21:19:16 2015 New Revision: 291614 URL: https://svnweb.freebsd.org/changeset/base/291614 Log: Restore cleaning of auto-generated kobj files after the recent MFILES changes. Use the list of MFILES found by find to identify the set of possible auto-generated files and add the intersection of this set and SRCS to CLEANFILES. Submitted by: imp (previous version), sbruno Differential Revision: https://reviews.freebsd.org/D4336 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 Tue Dec 1 20:56:16 2015 (r291613) +++ head/sys/conf/kern.pre.mk Tue Dec 1 21:19:16 2015 (r291614) @@ -206,9 +206,8 @@ SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symb SYSTEM_DEP+= ${LDSCRIPT} # Calculate path for .m files early, if needed. -.if !defined(_MPATH) +.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 @@ -227,7 +226,7 @@ MKMODULESENV+= MODULES_OVERRIDE="${MODUL .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif -MKMODULESENV+= _MPATH="${_MPATH}" +MKMODULESENV+= __MPATH="${__MPATH}" # Architecture and output format arguments for objdump to convert image to # object file Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Dec 1 20:56:16 2015 (r291613) +++ head/sys/conf/kmod.mk Tue Dec 1 21:19:16 2015 (r291614) @@ -370,14 +370,18 @@ vnode_if_typedef.h: .endif # Build _if.[ch] from _if.m, and clean them when we're done. -.if !defined(_MPATH) +.if !defined(__MPATH) __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m -_MPATH=${__MPATH:H:O:u} .endif +_MFILES=${__MPATH:T:O} +_MPATH=${__MPATH:H:O:u} .PATH.m: ${_MPATH} .for _i in ${SRCS:M*_if.[ch]} -#removes too much, comment out until it's more constrained. -#CLEANFILES+= ${_i} +_MATCH=M${_i:R:S/$/.m/} +_MATCHES=${_MFILES:${_MATCH}} +.if !empty(_MATCHES) +CLEANFILES+= ${_i} +.endif .endfor # _i .m.c: ${SYSDIR}/tools/makeobjops.awk ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -c