Handle some .OBJDIR == .CURDIR cases.
- If OBJROOT is SRCTOP then don't add on TARGET.TARGET_ARCH. This only happens at the top-level, and for sub-directories when the user is clever with MAKEOBJDIRPREFIX=/. - Don't bother checking 'test -w' on .CURDIR. - Properly set OBJTOP/OBJROOT to SRCTOP in various needed cases. - Check if the OBJDIR is writable even for *clean* targets since it determines which .OBJDIR the user gets; If they cannot write to an existing eligible .OBJDIR then it needs to clean in .CURDIR instead. - Add guard to cleanworld/cleanuniverse from removing SRCTOP. - Ensure OBJTOP is proper for .OBJDIR=.CURDIR which fixes finding libraries since src.libnames.mk is based on OBJTOP. - Avoid some chdir(2) for modifying .OBJDIR Sponsored by: Dell EMC Isilon
This commit is contained in:
@@ -13,7 +13,7 @@ __<bsd.init.mk>__:
|
||||
|
||||
.if ${MK_AUTO_OBJ} == "yes"
|
||||
# This is also done in bsd.obj.mk
|
||||
.if defined(NO_OBJ)
|
||||
.if defined(NO_OBJ) && ${.OBJDIR} != ${.CURDIR}
|
||||
.OBJDIR: ${.CURDIR}
|
||||
.endif
|
||||
.endif
|
||||
|
||||
Reference in New Issue
Block a user