From owner-svn-src-head@freebsd.org Sat Nov 18 20:01:19 2017 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 955B1DDA779; Sat, 18 Nov 2017 20:01:19 +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 567037A783; Sat, 18 Nov 2017 20:01:17 +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 vAIK1GM1002174; Sat, 18 Nov 2017 20:01:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vAIK1FHh002172; Sat, 18 Nov 2017 20:01:15 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201711182001.vAIK1FHh002172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 18 Nov 2017 20:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325974 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 325974 X-SVN-Commit-Repository: base 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.25 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: Sat, 18 Nov 2017 20:01:20 -0000 Author: bdrewery Date: Sat Nov 18 20:01:15 2017 New Revision: 325974 URL: https://svnweb.freebsd.org/changeset/base/325974 Log: Fix top-level targets with read-only OBJDIR. This also makes it so that top-level build targets do not immediately create the OBJDIR. Only sub-make targets will do so. This avoids creating object directories for targets like 'make check-old' or creating unneeded MACHINE.MACHINE_ARCH directories during 'make tinderbox'. Reported by: npn, lifanov Tested by: npn, Mark Millard Sponsored by: Dell Modified: head/Makefile.sys.inc head/share/mk/src.sys.obj.mk Modified: head/Makefile.sys.inc ============================================================================== --- head/Makefile.sys.inc Sat Nov 18 20:01:12 2017 (r325973) +++ head/Makefile.sys.inc Sat Nov 18 20:01:15 2017 (r325974) @@ -33,6 +33,11 @@ _CAN_USE_AUTO_OBJ?= yes .if !defined(_CAN_USE_AUTO_OBJ) _MAKEARGS+= MK_AUTO_OBJ=no MK_AUTO_OBJ= no +# This will prevent src.sys.obj.mk from opportunistically enabling AUTO_OBJ +# in this make execution and for sub-makes. For all of these targets we +# just want to read any existing OBJDIR but we don't care if we can create +# or write to them. +.MAKEOVERRIDES+= MK_AUTO_OBJ .endif .endif # empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) Modified: head/share/mk/src.sys.obj.mk ============================================================================== --- head/share/mk/src.sys.obj.mk Sat Nov 18 20:01:12 2017 (r325973) +++ head/share/mk/src.sys.obj.mk Sat Nov 18 20:01:15 2017 (r325974) @@ -19,6 +19,12 @@ # TARGET.TARGET_ARCH added in as it assumes that MAKEOBJDIRPREFIX is # nested in the existing OBJTOP with TARGET.TARGET_ARCH in it. # +# The expected OBJDIR is stored in __objdir for auto.obj.mk to use. +# +# AUTO_OBJ is opportunistically enabled if the computed .OBJDIR is writable +# by the current user. Some top-level targets disable this behavior in +# Makefile.sys.inc. +# _default_makeobjdirprefix?= /usr/obj _default_makeobjdir= $${.CURDIR:S,^$${SRCTOP},$${OBJTOP},}