summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc15
-rw-r--r--sys/conf/kern.pre.mk5
-rw-r--r--targets/pseudo/kernel/Makefile4
3 files changed, 6 insertions, 8 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 770773d..2a32e36 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -591,11 +591,6 @@ 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.
-KMAKEENV+= META_MODE="${.MAKE.MODE} curdirOk=yes"
-.endif
#
# buildworld
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 591c988..d5781db 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -19,6 +19,11 @@ _srcconf_included_:
.include <bsd.compiler.mk>
.include "kern.opts.mk"
+# The kernel build always occurs in the object directory which is .CURDIR.
+.if ${.MAKE.MODE:Unormal:Mmeta}
+.MAKE.MODE+= curdirOk=yes
+.endif
+
# Can be overridden by makeoptions or /etc/make.conf
KERNEL_KO?= kernel
KERNEL?= kernel
diff --git a/targets/pseudo/kernel/Makefile b/targets/pseudo/kernel/Makefile
index 8783d35..e135b22 100644
--- a/targets/pseudo/kernel/Makefile
+++ b/targets/pseudo/kernel/Makefile
@@ -15,10 +15,8 @@ ${KERNCONF}.config: .MAKE ${META_DEPS}
(cd ${KERN_CONFDIR} && \
${CONFIG} ${CONFIGARGS} -d ${KERN_OBJDIR} ${KERNCONF})
-# we need to pass curdirOk=yes to meta mode, since we want .meta files
-# in ${KERN_OBJDIR}
${KERNCONF}.build: .MAKE ${KERNCONF}.config
- (cd ${KERN_OBJDIR} && META_MODE="${.MAKE.MODE} curdirOk=yes" ${.MAKE})
+ (cd ${KERN_OBJDIR} && ${.MAKE})
.if ${.MAKE.LEVEL} > 0
all: ${KERNCONF}.build
OpenPOWER on IntegriCloud