Browse files

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
  • Loading branch information...
bdrewery committed Dec 5, 2017
1 parent ac75444 commit 86244dbc419f0dd54b6bde295209fafbd9a4bf08
Showing with 5 additions and 1 deletion.
  1. +4 −0
  2. +1 −1 share/mk/
@@ -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.
# For top-level we always assume the MAKEOBJDIRPREFIX is writable rather than
# falling back to .CURDIR.
__objdir_writable= yes

@@ -172,7 +172,7 @@ CheckAutoObj() { \
.if !empty(__objdir)
.if ${.CURDIR} == ${__objdir}
__objdir_writable?= yes
.elif empty(__objdir_writable)
__objdir_writable!= \
${CheckAutoObj}; CheckAutoObj "${__objdir}" || echo no

0 comments on commit 86244db

Please sign in to comment.