diff --git a/Makefile.inc1 b/Makefile.inc1 index ad30854bc7c4..cebe4c446fbf 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2093,7 +2093,7 @@ cross-tools: .MAKE .PHONY # already built. It then installs the static tools to NXBDESTDIR for Poudriere # to pickup. # -NXBOBJROOT= ${OBJROOT}nxb/ +NXBOBJROOT= ${OBJROOT}${MACHINE}.${MACHINE_ARCH}/nxb/ NXBOBJTOP= ${NXBOBJROOT}${TARGET}.${TARGET_ARCH} NXTP?= /nxb-bin .if ${NXTP:N/*} @@ -2790,10 +2790,16 @@ XDTP?=/usr/${XDDIR} .error XDTP variable should be an absolute path .endif -CDBENV=MAKEOBJDIRPREFIX=${OBJTOP}/${XDDIR} \ +CDBOBJROOT= ${OBJROOT}${MACHINE}.${MACHINE_ARCH}/xdev/ +CDBOBJTOP= ${CDBOBJROOT}${XDDIR} +CDBENV= \ INSTALL="sh ${.CURDIR}/tools/install.sh" CDENV= ${CDBENV} \ TOOLS_PREFIX=${XDTP} +CDMAKEARGS= \ + OBJTOP=${CDBOBJTOP:Q} \ + OBJROOT=${CDBOBJROOT:Q} +CD2MAKEARGS= ${CDMAKEARGS} .if ${WANT_COMPILER_TYPE} == gcc || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) @@ -2816,8 +2822,9 @@ CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" CXX="${CXX} ${CD2CXXFLAGS} ${CD2CFLAGS}" MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} CDTMP= ${OBJTOP}/${XDDIR}/tmp -CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${NOFUN} -CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} ${MAKE} ${NOFUN} +CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${CDMAKEARGS} ${NOFUN} +CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} \ + ${MAKE} ${CD2MAKEARGS} ${NOFUN} .if ${MK_META_MODE} != "no" # Don't rebuild build-tools targets during normal build. CD2MAKE+= BUILD_TOOLS_META=.NOMETA @@ -2849,7 +2856,7 @@ _xb-bootstrap-tools: .PHONY _xb-build-tools: .PHONY ${_+_}@cd ${.CURDIR}; \ - ${CDBENV} ${MAKE} -f Makefile.inc1 ${NOFUN} build-tools + ${CDBENV} ${MAKE} ${CDMAKEARGS} -f Makefile.inc1 ${NOFUN} build-tools XDEVDIRS= \ ${_clang_libs} \