Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Dec 2017 21:29:47 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326580 - in head: . share/mk
Message-ID:  <201712052129.vB5LTlro019275@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Tue Dec  5 21:29:47 2017
New Revision: 326580
URL: https://svnweb.freebsd.org/changeset/base/326580

Log:
  AUTO_OBJ: For all top-level targets enforce using an OBJDIR.
  
  This will cause an error if the wanted OBJDIR is not writable.  Previously it
  would cause the files to generate to the source tree.  This was too obscure and
  things like buildworld really expect a proper OBJDIR layout.
  
  Sponsored by:	Dell EMC

Modified:
  head/Makefile.sys.inc
  head/share/mk/src.sys.obj.mk

Modified: head/Makefile.sys.inc
==============================================================================
--- head/Makefile.sys.inc	Tue Dec  5 21:21:23 2017	(r326579)
+++ head/Makefile.sys.inc	Tue Dec  5 21:29:47 2017	(r326580)
@@ -38,6 +38,10 @@ MK_AUTO_OBJ=		no
 # just want to read any existing OBJDIR but we don't care if we can create
 # or write to them.
 .MAKEOVERRIDES+=	MK_AUTO_OBJ
+.else
+# For top-level we always assume the MAKEOBJDIRPREFIX is writable rather than
+# falling back to .CURDIR.
+__objdir_writable= yes
 .endif
 .endif	# empty(.MAKEOVERRIDES:MMK_AUTO_OBJ)
 

Modified: head/share/mk/src.sys.obj.mk
==============================================================================
--- head/share/mk/src.sys.obj.mk	Tue Dec  5 21:21:23 2017	(r326579)
+++ head/share/mk/src.sys.obj.mk	Tue Dec  5 21:29:47 2017	(r326580)
@@ -172,7 +172,7 @@ CheckAutoObj() { \
 .if !empty(__objdir)
 .if ${.CURDIR} == ${__objdir}
 __objdir_writable?= yes
-.else
+.elif empty(__objdir_writable)
 __objdir_writable!= \
 	${CheckAutoObj}; CheckAutoObj "${__objdir}" || echo no
 .endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712052129.vB5LTlro019275>