From owner-svn-src-head@freebsd.org Mon Dec 7 16:08: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 69FD29A061F; Mon, 7 Dec 2015 16:08:18 +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 2FC921C67; Mon, 7 Dec 2015 16:08:18 +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 tB7G8HM7095473; Mon, 7 Dec 2015 16:08:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB7G8H6v095472; Mon, 7 Dec 2015 16:08:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512071608.tB7G8H6v095472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 7 Dec 2015 16:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291943 - head/share/mk 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: Mon, 07 Dec 2015 16:08:18 -0000 Author: bdrewery Date: Mon Dec 7 16:08:16 2015 New Revision: 291943 URL: https://svnweb.freebsd.org/changeset/base/291943 Log: FAST_DEPEND: Only try to use dependencies from C/C++ SRCS as mkdep did. Rather than try to guess at all of the OBJS variables just use SRCS using the same patterns that mkdep does. This also fixes a mistake where dependencies were being generated with FAST_DEPEND when they were not for mkdep. This happens when OBJS!=SRCS as is the case in gnu/lib/csu where SRCS has 1 file and OBJS has several other files that does not even contain the 1 SRCS file. Generally in these cases the OBJS have custom dependencies defined in their Makefile. If we generate dependencies for those and then load a .depend file, then .IMPSRC may contain duplicate sources and lead to errors such as: cc: error: cannot specify -o when generating multiple output files MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Mon Dec 7 16:08:13 2015 (r291942) +++ head/share/mk/bsd.dep.mk Mon Dec 7 16:08:16 2015 (r291943) @@ -66,7 +66,10 @@ DEPEND_FILTER= C,/,_,g DEPEND_CFLAGS+= -MD ${DEPEND_MP} -MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}} DEPEND_CFLAGS+= -MT${.TARGET} CFLAGS+= ${DEPEND_CFLAGS} -DEPENDOBJS+= ${OBJS} ${POBJS} ${SOBJS} +DEPENDSRCS= ${SRCS:M*.[cSC]} ${SRCS:M*.cxx} ${SRCS:M*.cpp} ${SRCS:M*.cc} +.if !empty(DEPENDSRCS) +DEPENDOBJS+= ${DEPENDSRCS:R:S,$,.o,} +.endif .for __obj in ${DEPENDOBJS:O:u} .if ${.MAKEFLAGS:M-V} == "" .sinclude "${DEPENDFILE}.${__obj:${DEPEND_FILTER}}"