mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 03:04:34 +01:00
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
This commit is contained in:
parent
34b8ef3d77
commit
e22224a5c2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326580
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user