diff --git a/Makefile.inc1 b/Makefile.inc1 index 73bbba7fef54..43cd3c3344c8 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -964,12 +964,16 @@ WORLDTMP_MTREEFLAGS= -deUW # that are created by mtree to be owned by root/wheel. DESTDIR_MTREEFLAGS+= -W .endif -DISTR_MTREE= ${MTREE_CMD} -.if ${BUILD_WITH_STRICT_TMPPATH} != 0 -DISTR_MTREE= ${WORLDTMP}/legacy/usr/sbin/mtree +.if defined(DB_FROM_SRC) +DISTR_MTREEFLAGS= -N ${.CURDIR}/etc .endif -WORLDTMP_MTREE= ${DISTR_MTREE} ${WORLDTMP_MTREEFLAGS} -DESTDIR_MTREE= ${DISTR_MTREE} ${DESTDIR_MTREEFLAGS} +DISTR_MTREECMD= ${MTREE_CMD} +.if ${BUILD_WITH_STRICT_TMPPATH} != 0 +DISTR_MTREECMD= ${WORLDTMP}/legacy/usr/sbin/mtree +.endif +DISTR_MTREE= ${DISTR_MTREECMD} ${DISTR_MTREEFLAGS} +WORLDTMP_MTREE= ${DISTR_MTREECMD} ${WORLDTMP_MTREEFLAGS} +DESTDIR_MTREE= ${DISTR_MTREECMD} ${DESTDIR_MTREEFLAGS} # kernel stage KMAKEENV= ${WMAKEENV:NSYSROOT=*}