diff --git a/Makefile b/Makefile index 6334f635927c..d70f89b65935 100644 --- a/Makefile +++ b/Makefile @@ -81,9 +81,10 @@ BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/} PATH= /sbin:/bin:/usr/sbin:/usr/bin MAKEOBJDIRPREFIX?= /usr/obj MAKEPATH= ${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE} -_MAKE= PATH=${PATH} \ +BINMAKE= PATH=${PATH} \ `if [ -x ${MAKEPATH}/make ]; then echo ${MAKEPATH}/make; else echo ${MAKE}; fi` \ - -m ${.CURDIR}/share/mk -f Makefile.inc1 + -m ${.CURDIR}/share/mk +_MAKE= ${BINMAKE} -f Makefile.inc1 # # Handle the user-driven targets, using the source relative mk files. diff --git a/Makefile.inc1 b/Makefile.inc1 index 7f29afe03168..97d24861bb12 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -652,18 +652,18 @@ _groff= gnu/usr.bin/groff/tmac .endif .endif -.if ( ${BOOTSTRAPPING} < 450005 || \ - ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500034 )) +.if ${BOOTSTRAPPING} < 450005 || \ + ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500034 _uudecode= usr.bin/uudecode .endif -.if ( ${BOOTSTRAPPING} < 430002 || \ - ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500019 )) +.if ${BOOTSTRAPPING} < 430002 || \ + ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500019 _xargs= usr.bin/xargs .endif -.if ( ${BOOTSTRAPPING} < 430002 || \ - ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500018 )) +.if ${BOOTSTRAPPING} < 430002 || \ + ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500018 _yacc= usr.bin/yacc .endif @@ -754,7 +754,7 @@ _btxld= usr.sbin/btxld .if (exists(${.CURDIR}/rescue) && defined(RESCUE) || \ defined(RELEASEDIR)) && \ - ( ${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 501101 ) + (${TARGET_ARCH} != ${MACHINE_ARCH} || ${BOOTSTRAPPING} < 501101) _crunchide= usr.sbin/crunch/crunchide .endif diff --git a/release/Makefile b/release/Makefile index e52704f1f6a7..d19cfb90b029 100644 --- a/release/Makefile +++ b/release/Makefile @@ -65,7 +65,8 @@ TARGET?= ${MACHINE} .else TARGET?= ${TARGET_ARCH} .endif -CROSSMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} +CROSSENV= TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET} +CROSSMAKE= ${MAKE} ${CROSSENV} NATIVEMAKE= ${MAKE} TARGET_ARCH=${MACHINE_ARCH} TARGET=${MACHINE} # If you are using a local CVS repository with components stored in @@ -297,8 +298,10 @@ BOOTABLE="-b" DOCREL= doc.1 doc.2 .endif -WMAKEENV!= cd ${.CURDIR}/..; ${CROSSMAKE} -f Makefile.inc1 -V WMAKEENV -WMAKE= ${WMAKEENV} ${MAKE} -m ${.CURDIR}/../share/mk +BINMAKE!= cd ${.CURDIR}/..; ${MAKE} -V BINMAKE +WMAKEENV!= cd ${.CURDIR}/..; \ + ${BINMAKE} ${CROSSENV} -f Makefile.inc1 -V WMAKEENV +WMAKE= ${WMAKEENV} ${BINMAKE} CVS_SRCARGS= -P .if defined(RELEASETAG) @@ -564,8 +567,7 @@ release.5: cd ${j}_crunch; ${WMAKEENV} crunchgen -o ${.CURDIR}/${j}_crunch.conf .endif cd ${j}_crunch; ${WMAKE} -f ${j}_crunch.mk subclean - cd ${.CURDIR}/..; ${MAKE} -m ${.CURDIR}/../share/mk -f Makefile.inc1 \ - _build-tools + cd ${.CURDIR}/..; ${BINMAKE} _build-tools cd ${j}_crunch; ${WMAKE} -f ${j}_crunch.mk \ CFLAGS="-Os -pipe" -DNO_CPU_CFLAGS all ${WMAKEENV} strip -R .comment ${j}_crunch/${j}_crunch