From owner-svn-src-all@freebsd.org Sun Nov 5 00:12:00 2017 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 329B8E5ADEE; Sun, 5 Nov 2017 00:12:00 +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 F3BFC640A6; Sun, 5 Nov 2017 00:11:59 +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 vA50BxFg042853; Sun, 5 Nov 2017 00:11:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA50Bx2j042851; Sun, 5 Nov 2017 00:11:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711050011.vA50Bx2j042851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sun, 5 Nov 2017 00:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325414 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 325414 X-SVN-Commit-Repository: base 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.23 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: Sun, 05 Nov 2017 00:12:00 -0000 Author: bdrewery Date: Sun Nov 5 00:11:58 2017 New Revision: 325414 URL: https://svnweb.freebsd.org/changeset/base/325414 Log: AUTO_OBJ: Set .OBJDIR=.CURDIR earlier for NO_OBJ Makefiles. auto.obj.mk is loaded before the Makefile which may have NO_OBJ set inside of it. In that case we can't avoid creating the OBJDIR but we do need to avoid using it. Fixing .OBJDIR in bsd.init.mk at least fixes all of the build .mk files to have a proper .OBJDIR. It does not fix the Makefile itself but usually if they have NO_OBJ set they are not inspecting ${.OBJDIR} anyhow. It is ideal to only have this in bsd.init.mk and to remove it from bsd.obj.mk, but then bsd.obj.mk would need to include bsd.init.mk. Doing something like that would require more testing. It has been proposed that bsd.obj.mk not be included directly but it has been possible for too long to do so to change it at this point. Note too that it may make sense to fix .OBJDIR even when AUTO_OBJ is not enabled but the historical behavior has always been that NO_OBJ just avoids running 'make obj', so .OBJDIR should already be .CURDIR. Also while NO_OBJ seems like it should be removed at this point, it is not always possible to fix Makefiles to properly use an .OBJDIR. The cost of keeping NO_OBJ support is minimal. Sponsored by: Dell EMC Isilon Modified: head/share/mk/bsd.init.mk head/share/mk/bsd.obj.mk Modified: head/share/mk/bsd.init.mk ============================================================================== --- head/share/mk/bsd.init.mk Sun Nov 5 00:11:55 2017 (r325413) +++ head/share/mk/bsd.init.mk Sun Nov 5 00:11:58 2017 (r325414) @@ -10,6 +10,14 @@ ____: .include .-include "local.init.mk" + +.if ${MK_AUTO_OBJ} == "yes" +# This is also done in bsd.obj.mk +.if defined(NO_OBJ) +.OBJDIR: ${.CURDIR} +.endif +.endif + .if exists(${.CURDIR}/../Makefile.inc) .include "${.CURDIR}/../Makefile.inc" .endif Modified: head/share/mk/bsd.obj.mk ============================================================================== --- head/share/mk/bsd.obj.mk Sun Nov 5 00:11:55 2017 (r325413) +++ head/share/mk/bsd.obj.mk Sun Nov 5 00:11:58 2017 (r325414) @@ -47,6 +47,7 @@ ____: objwarn: obj: CANONICALOBJDIR= ${.OBJDIR} +# This is also done in bsd.init.mk .if defined(NO_OBJ) # but this makefile does not want it! .OBJDIR: ${.CURDIR}