diff options
| author | Bryan Drewery <bdrewery@FreeBSD.org> | 2017-11-11 01:11:00 +0000 |
|---|---|---|
| committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2017-11-11 01:11:00 +0000 |
| commit | de2b0e031853f6494153a924f8a56c2350af2959 (patch) | |
| tree | 330aa5532dcd0a7c0c2f44abb0811b739c0aec37 | |
| parent | 5edf5dc29f89de1eeecd3f5422f8a7d4a2c9223a (diff) | |
Notes
| -rw-r--r-- | share/mk/src.sys.obj.mk | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/share/mk/src.sys.obj.mk b/share/mk/src.sys.obj.mk index 6c6c00ef8a64..fe15717d4f05 100644 --- a/share/mk/src.sys.obj.mk +++ b/share/mk/src.sys.obj.mk @@ -26,7 +26,7 @@ _default_makeobjdir= $${.CURDIR:S,^$${SRCTOP},$${OBJTOP},} .include <bsd.mkopt.mk> .if ${.MAKE.LEVEL} == 0 || empty(OBJROOT) -.if ${MK_UNIFIED_OBJDIR} == "no" +.if ${MK_UNIFIED_OBJDIR} == "no" && ${MK_DIRDEPS_BUILD} == "no" # Fall back to historical behavior. # We always want to set a default MAKEOBJDIRPREFIX... MAKEOBJDIRPREFIX?= ${_default_makeobjdirprefix} @@ -70,6 +70,7 @@ OBJROOT:= ${OBJROOT:H:tA}/${OBJROOT:T} .export OBJROOT SRCTOP .endif +.if ${MK_DIRDEPS_BUILD} == "no" .if empty(OBJTOP) # SRCTOP == OBJROOT only happens with clever MAKEOBJDIRPREFIX=/. Don't # append TARGET.TARGET_ARCH for that case since the user wants to build @@ -90,12 +91,11 @@ OBJTOP:= ${OBJROOT:H} .endif # ${MK_UNIFIED_OBJDIR} == "yes" .endif # empty(OBJTOP) -# Fixup OBJROOT/OBJTOP if using MAKEOBJDIRPREFIX but leave it alone -# for DIRDEPS_BUILD which really wants to know the absolute top at -# all times. This intenionally comes after adding TARGET.TARGET_ARCH -# so that is truncated away for nested objdirs. This logic also -# will not trigger if the OBJROOT block above unsets MAKEOBJDIRPREFIX. -.if !empty(MAKEOBJDIRPREFIX) && ${MK_DIRDEPS_BUILD} == "no" +# Fixup OBJROOT/OBJTOP if using MAKEOBJDIRPREFIX. +# This intenionally comes after adding TARGET.TARGET_ARCH so that is truncated +# away for nested objdirs. This logic also will not trigger if the OBJROOT +# block above unsets MAKEOBJDIRPREFIX. +.if !empty(MAKEOBJDIRPREFIX) OBJTOP:= ${MAKEOBJDIRPREFIX}${SRCTOP} OBJROOT:= ${OBJTOP}/ .endif @@ -211,3 +211,5 @@ OBJROOT= ${SRCTOP}/ .OBJDIR: ${.CURDIR} .endif .endif # defined(NO_OBJ) + +.endif # ${MK_DIRDEPS_BUILD} == "no" |
