diff --git a/Makefile.inc1 b/Makefile.inc1 index dda14b50e5e5..1a17db02724b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -531,6 +531,11 @@ IMAKE_MTREE= MTREE_CMD="mtree ${MTREEFLAGS}" # kernel stage KMAKEENV= ${WMAKEENV} KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME} +.if ${MK_META_MODE} == "yes" +# meta mode normally is disallowed when building from curdir==objdir, but we +# want to allow it for the kernel build. +KMAKE+= .MAKE.MODE="${.MAKE.MODE} curdirOk=yes" +.endif # # buildworld