From owner-svn-src-all@freebsd.org Fri Mar 11 04:09:58 2016 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 19414ACBFB6; Fri, 11 Mar 2016 04:09:58 +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 D69791864; Fri, 11 Mar 2016 04:09:57 +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 u2B49uOH047633; Fri, 11 Mar 2016 04:09:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2B49u5L047630; Fri, 11 Mar 2016 04:09:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201603110409.u2B49u5L047630@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 11 Mar 2016 04:09:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296646 - in head: . share/mk 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.21 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: Fri, 11 Mar 2016 04:09:58 -0000 Author: bdrewery Date: Fri Mar 11 04:09:56 2016 New Revision: 296646 URL: https://svnweb.freebsd.org/changeset/base/296646 Log: FAST_DEPEND: Use .dinclude to enable full .depend logic in bmake. The inclusion of .MAKE.DEPENDFILE (.depend) has special logic in make to ignore stale/missing dependencies. bmake 20160220 added a '.dinclude' directive that uses the special logic for .depend when including the file. This fixes a build error when a file is moved or deleted that exists in a .depend.OBJ file. This happened in r292782 when sha512c.c "moved" and an incremental build of lib/libmd would fail with: make: don't know how to make /usr/src/lib/libcrypt/../libmd/sha512c.c. Stop Now this will just be seen as a stale dependency and cause a rebuild: make: /usr/obj/usr/src/lib/libmd/.depend.sha512c.o, 13: ignoring stale .depend for /usr/src/lib/libcrypt/../libmd/sha512c.c --- sha512c.o --- ... This rebuild will only be done once since the .depend.sha512c.o will be updated on the build with the -MF flags. This also removes -MP being passed for the .depend.OBJ generation (which would create fake targets for system headers) since the logic is no longer needed to protect from missing files. Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile head/share/mk/bsd.dep.mk head/sys/conf/kern.post.mk Modified: head/Makefile ============================================================================== --- head/Makefile Fri Mar 11 04:09:53 2016 (r296645) +++ head/Makefile Fri Mar 11 04:09:56 2016 (r296646) @@ -159,6 +159,8 @@ _MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH # We cannot blindly use a make which may not be the one we want # so be exlicit - until all choice is removed. WANT_MAKE= bmake +# 20160220 - support .dinclude for FAST_DEPEND. +WANT_MAKE_VERSION= 20160220 MYMAKE= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE}/${WANT_MAKE} .if defined(.PARSEDIR) HAVE_MAKE= bmake Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Fri Mar 11 04:09:53 2016 (r296645) +++ head/share/mk/bsd.dep.mk Fri Mar 11 04:09:56 2016 (r296646) @@ -176,7 +176,9 @@ ${_D}.po: ${_DSRC} ${POBJS:S/^${_D}.po$/ _meta_filemon= 1 .endif .if ${MK_FAST_DEPEND} == "yes" +.if ${MAKE_VERSION} < 20160220 DEPEND_MP?= -MP +.endif # Handle OBJS=../somefile.o hacks. Just replace '/' rather than use :T to # avoid collisions. DEPEND_FILTER= C,/,_,g @@ -200,7 +202,11 @@ CFLAGS+= ${DEPEND_CFLAGS} .endif .if !defined(_SKIP_READ_DEPEND) .for __depend_obj in ${DEPENDFILES_OBJS} +.if ${MAKE_VERSION} < 20160220 .sinclude "${.OBJDIR}/${__depend_obj}" +.else +.dinclude "${.OBJDIR}/${__depend_obj}" +.endif .endfor .endif # !defined(_SKIP_READ_DEPEND) .endif # !defined(_meta_filemon) Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Fri Mar 11 04:09:53 2016 (r296645) +++ head/sys/conf/kern.post.mk Fri Mar 11 04:09:56 2016 (r296646) @@ -231,7 +231,10 @@ _meta_filemon= 1 .if ${MK_FAST_DEPEND} == "yes" DEPENDOBJS+= ${SYSTEM_OBJS} genassym.o DEPENDFILES_OBJS= ${DEPENDOBJS:O:u:C/^/.depend./} -DEPEND_CFLAGS+= -MD -MP -MF.depend.${.TARGET} +.if ${MAKE_VERSION} < 20160220 +DEPEND_MP?= -MP +.endif +DEPEND_CFLAGS+= -MD ${DEPEND_MP} -MF.depend.${.TARGET} DEPEND_CFLAGS+= -MT${.TARGET} .if !defined(_meta_filemon) .if defined(.PARSEDIR) @@ -244,7 +247,11 @@ CFLAGS+= ${DEPEND_CFLAGS} .endif .if !defined(_SKIP_READ_DEPEND) .for __depend_obj in ${DEPENDFILES_OBJS} +.if ${MAKE_VERSION} < 20160220 .sinclude "${.OBJDIR}/${__depend_obj}" +.else +.dinclude "${.OBJDIR}/${__depend_obj}" +.endif .endfor .endif # !defined(_SKIP_READ_DEPEND) .endif # !defined(_meta_filemon)