aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/mk/bsd.crunchgen.mk7
-rw-r--r--usr.sbin/crunch/crunchgen/crunchgen.c1
2 files changed, 6 insertions, 2 deletions
diff --git a/share/mk/bsd.crunchgen.mk b/share/mk/bsd.crunchgen.mk
index a548f2cdfcee..d1d829b9be6c 100644
--- a/share/mk/bsd.crunchgen.mk
+++ b/share/mk/bsd.crunchgen.mk
@@ -123,11 +123,13 @@ ${OUTPUTS}: ${CONF}
# These 2 targets cannot use .MAKE since they depend on the generated
# ${OUTMK} above.
-${PROG}: ${OUTPUTS} objs .META
+${PROG}: ${OUTPUTS} objs .NOMETA .PHONY
${CRUNCHENV} \
CC="${CC} ${CFLAGS} ${LDFLAGS}" \
CXX="${CXX} ${CXXFLAGS} ${LDFLAGS}" \
- ${MAKE} .MAKE.MODE=normal -f ${OUTMK} exe
+ ${MAKE} .MAKE.MODE="${.MAKE.MODE} curdirOk=yes" \
+ .MAKE.META.IGNORE_PATHS="${.MAKE.META.IGNORE_PATHS}" \
+ -f ${OUTMK} exe
objs: ${OUTMK} .META
${CRUNCHENV} MAKEOBJDIRPREFIX=${CRUNCHOBJS} \
@@ -167,3 +169,4 @@ clean:
fi
META_XTRAS+= ${find ${CRUNCHOBJS}${SRCTOP} -name '*.meta' 2>/dev/null || true:L:sh}
+META_XTRAS+= ${PROG}.meta
diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c
index 7a63c915e8f2..f328ea44df16 100644
--- a/usr.sbin/crunch/crunchgen/crunchgen.c
+++ b/usr.sbin/crunch/crunchgen/crunchgen.c
@@ -1064,6 +1064,7 @@ prog_makefile_rules(FILE *outmk, prog_t *p)
}
fprintf(outmk, "\n");
}
+ fprintf(outmk, "$(%s_OBJPATHS): .NOMETA\n", p->ident);
if (p->srcdir && p->objs) {
fprintf(outmk, "%s_SRCDIR=%s\n", p->ident, p->srcdir);