From d957ea7dc5ce2dcc9a38eaab66095d0350cc47ca Mon Sep 17 00:00:00 2001 From: bdrewery Date: Fri, 10 Nov 2017 19:52:31 +0000 Subject: [PATCH] Don't append TARGET.TARGET_ARCH if OBJTOP is already set. This avoids flipping the expected TARGET.TARGET_ARCH suffix / OBJTOP when it is already set by a parent make which wants to control it more such as in something like 'make native-xtools'. Sponsored by: Dell EMC Isilon --- share/mk/src.sys.obj.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/mk/src.sys.obj.mk b/share/mk/src.sys.obj.mk index fc545a0e4a76..988ec7624405 100644 --- a/share/mk/src.sys.obj.mk +++ b/share/mk/src.sys.obj.mk @@ -70,6 +70,7 @@ OBJROOT:= ${OBJROOT:H:tA}/${OBJROOT:T} .export OBJROOT SRCTOP .endif +.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 # in the source tree. @@ -79,6 +80,7 @@ OBJTOP:= ${OBJROOT}${TARGET:D${TARGET}.${TARGET_ARCH}:U${MACHINE}.${MACHINE_ARCH # TARGET.TARGET_ARCH handled in OBJROOT already. OBJTOP:= ${OBJROOT:H} .endif # ${MK_UNIFIED_OBJDIR} == "yes" +.endif # Fixup OBJROOT/OBJTOP if using MAKEOBJDIRPREFIX but leave it alone # for DIRDEPS_BUILD which really wants to know the absolute top at