From owner-svn-src-stable-10@freebsd.org Mon Jan 25 17:38:22 2016 Return-Path: Delivered-To: svn-src-stable-10@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 207B1A454F9; Mon, 25 Jan 2016 17:38:22 +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 E1950A2C; Mon, 25 Jan 2016 17:38:21 +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 u0PHcKMv076709; Mon, 25 Jan 2016 17:38:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0PHcKlH076708; Mon, 25 Jan 2016 17:38:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201601251738.u0PHcKlH076708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 25 Jan 2016 17:38:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r294737 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2016 17:38:22 -0000 Author: bdrewery Date: Mon Jan 25 17:38:20 2016 New Revision: 294737 URL: https://svnweb.freebsd.org/changeset/base/294737 Log: MFC r294370: mkdep: Fix -include not being added for .depend tracking. Modified: stable/10/share/mk/bsd.dep.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.dep.mk ============================================================================== --- stable/10/share/mk/bsd.dep.mk Mon Jan 25 16:49:39 2016 (r294736) +++ stable/10/share/mk/bsd.dep.mk Mon Jan 25 17:38:20 2016 (r294737) @@ -160,12 +160,25 @@ depend: beforedepend ${DEPENDFILE} after # Tell bmake not to look for generated files via .PATH .NOPATH: ${DEPENDFILE} +# Capture -include from CFLAGS. +# This could be simpler with bmake :tW but needs to support fmake for MFC. +_CFLAGS_INCLUDES= ${CFLAGS:Q:S/\\ /,/g:C/-include,/-include%/g:C/,/ /g:M-include*:C/%/ /g} +_CXXFLAGS_INCLUDES= ${CXXFLAGS:Q:S/\\ /,/g:C/-include,/-include%/g:C/,/ /g:M-include*:C/%/ /g} +# XXX: Temporary hack to workaround .depend files not tracking -include +.if !empty(_CFLAGS_INCLUDES) +${OBJS} ${POBJS} ${SOBJS}: ${_CFLAGS_INCLUDES:M*.h} +.endif +.if !empty(_CXXFLAGS_INCLUDES) +${OBJS} ${POBJS} ${SOBJS}: ${_CXXFLAGS_INCLUDES:M*.h} +.endif + # Different types of sources are compiled with slightly different flags. # Split up the sources, and filter out headers and non-applicable flags. MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} \ - ${CFLAGS:M-ansi} + ${CFLAGS:M-ansi} ${_CFLAGS_INCLUDES} MKDEP_CXXFLAGS= ${CXXFLAGS:M-nostdinc*} ${CXXFLAGS:M-[BIDU]*} \ - ${CXXFLAGS:M-std=*} ${CXXFLAGS:M-ansi} ${CXXFLAGS:M-stdlib=*} + ${CXXFLAGS:M-std=*} ${CXXFLAGS:M-ansi} ${CXXFLAGS:M-stdlib=*} \ + ${_CXXFLAGS_INCLUDES} DPSRCS+= ${SRCS} ${DEPENDFILE}: ${DPSRCS}