From 60c3f10368e753ce20d5716a0684e606bc1b46b4 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Thu, 20 Jan 2005 10:43:43 +0000 Subject: [PATCH] Ignoring MAKEFLAGS in rev. 1.15 was a very bad idea. This causes wrong share/mk files to be used, which can be fatal with upgrades or downgrades, e.g., when building RELENG_5 on HEAD. Reported by: glebius For now, just exclude -P from MAKEFLAGS when running crunchgen(1). (Note that it will still break when run with certain -d options.) The real solution is to fix make(1) to not print stuff on stdout when it's not supposed to, e.g., through the -P and -dX options, and to fix crunchgen(1) to not redirect stderr to stdout when running make(1). Once this is implemented, this hack can go. --- rescue/rescue/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile index a493ef244dcb..636b8072777f 100644 --- a/rescue/rescue/Makefile +++ b/rescue/rescue/Makefile @@ -267,10 +267,11 @@ $(CONF): Makefile .endfor .endfor - +# XXX Make sure we don't pass -P to crunchgen(1). +.MAKEFLAGS:= ${.MAKEFLAGS:N-P} .ORDER: $(OUTPUTS) objs $(OUTPUTS): $(CONF) - MAKEFLAGS= MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) \ + MAKEOBJDIRPREFIX=${CRUNCHOBJS} crunchgen -fq -m $(OUTMK) \ -c $(OUTC) $(CONF) $(PROG): $(OUTPUTS) objs