diff --git a/Makefile.inc1 b/Makefile.inc1 index 2b49ab808559..2aca77ff3234 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -263,6 +263,13 @@ WMAKEENV= ${CROSSENV} \ VERSION="${VERSION}" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${TMPPATH} + +# make hierarchy +HMAKE= PATH=${TMPPATH} ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} +.if defined(NO_ROOT) +HMAKE+= PATH=${TMPPATH} METALOG=${METALOG} -DNO_ROOT +.endif + .if ${MK_CDDL} == "no" WMAKEENV+= NO_CTF=1 .endif @@ -1367,12 +1374,7 @@ cross-tools: # hierarchy - ensure that all the needed directories are present # hierarchy hier: -.if defined(NO_ROOT) - cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} \ - -DNO_ROOT METALOG=${METALOG} distrib-dirs -.else - cd ${.CURDIR}/etc; ${MAKE} LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs -.endif + cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs # # libraries - build all libraries, and install them under ${DESTDIR}.