From owner-svn-src-stable-11@freebsd.org Tue Jan 3 18:05:24 2017 Return-Path: Delivered-To: svn-src-stable-11@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 E2980C9D1D9; Tue, 3 Jan 2017 18:05:24 +0000 (UTC) (envelope-from bdrewery@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 978D91A0D; Tue, 3 Jan 2017 18:05:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v03I5Nrn017892; Tue, 3 Jan 2017 18:05:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v03I5NYM017891; Tue, 3 Jan 2017 18:05:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201701031805.v03I5NYM017891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 3 Jan 2017 18:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r311161 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 18:05:25 -0000 Author: bdrewery Date: Tue Jan 3 18:05:23 2017 New Revision: 311161 URL: https://svnweb.freebsd.org/changeset/base/311161 Log: MFC r305216: FAST_DEPEND/META_MODE: Fix several issues with SRCS containing '/'. Modified: stable/11/share/mk/bsd.dep.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.dep.mk ============================================================================== --- stable/11/share/mk/bsd.dep.mk Tue Jan 3 17:35:16 2017 (r311160) +++ stable/11/share/mk/bsd.dep.mk Tue Jan 3 18:05:23 2017 (r311161) @@ -181,7 +181,7 @@ DEPEND_CFLAGS+= -MT${.TARGET} .if defined(.PARSEDIR) # Only add in DEPEND_CFLAGS for CFLAGS on files we expect from DEPENDOBJS # as those are the only ones we will include. -DEPEND_CFLAGS_CONDITION= "${DEPENDOBJS:M${.TARGET:${DEPEND_FILTER}}}" != "" +DEPEND_CFLAGS_CONDITION= "${DEPENDOBJS:${DEPEND_FILTER}:M${.TARGET:${DEPEND_FILTER}}}" != "" CFLAGS+= ${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS}:} .else CFLAGS+= ${DEPEND_CFLAGS} @@ -216,8 +216,17 @@ afterdepend: beforedepend # For meta+filemon the .meta file is checked for since it is the dependency # file used. .for __obj in ${DEPENDOBJS:O:u} -.if (defined(_meta_filemon) && !exists(${.OBJDIR}/${__obj}.meta)) || \ - (!defined(_meta_filemon) && !exists(${.OBJDIR}/${DEPENDFILE}.${__obj})) +# If the obj has any '/', then replace with '_'. For meta files, this is +# mimicing what bmake's meta_name() does and adding in the full path +# as well to ensure that the expected meta file is read. +.if ${__obj:M*/*} +_meta_obj= ${.OBJDIR:C,/,_,g}_${__obj:C,/,_,g}.meta +.else +_meta_obj= ${__obj}.meta +.endif +_dep_obj= ${DEPENDFILE}.${__obj:${DEPEND_FILTER}} +.if (defined(_meta_filemon) && !exists(${.OBJDIR}/${_meta_obj})) || \ + (!defined(_meta_filemon) && !exists(${.OBJDIR}/${_dep_obj})) ${__obj}: ${OBJS_DEPEND_GUESS} ${__obj}: ${OBJS_DEPEND_GUESS.${__obj}} .elif defined(_meta_filemon)