From 55b3afeee9d83e8c520665da60c8197829abb9e3 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 10 May 1997 22:24:42 +0000 Subject: [PATCH] make -k fix from ian --- ChangeLog | 5 +++++ TODO | 2 ++ lib/am/subdirs.am | 10 ++++++---- subdirs.am | 10 ++++++---- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3322edef..ba258ab3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue May 6 15:22:41 1997 Ian Lance Taylor + + * subdirs.am: Fix check for make -k to use $(MAKEFLAGS) and to not + get fooled by command line arguments. + Sat May 10 15:48:46 1997 Tom Tromey * m4/ccstdc.m4: Print "none needed" if compiler accepts ANSI C by diff --git a/TODO b/TODO index 7065445d..951ec33a 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,5 @@ +* in --cygnus, clean-info not generated at top level + * update text in missing avoid passive voice diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am index 0622e8dd..42330d6d 100644 --- a/lib/am/subdirs.am +++ b/lib/am/subdirs.am @@ -27,13 +27,14 @@ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive @INSTALLINFO@ \ check-recursive installcheck-recursive info-recursive dvi-recursive: - @for subdir in $(SUBDIRS); do \ + @set fnord $(MAKEFLAGS); amf=$$2; \ + for subdir in $(SUBDIRS); do \ target=`echo $@ | sed s/-recursive//`; \ echo "Making $$target in $$subdir"; \ (cd $$subdir && $(MAKE) $$target) \ ## This trick allows "-k" to keep its natural meaning when running a ## recursive rule. - || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" ## We run all `clean' targets in reverse order. Why? It's an attempt @@ -44,12 +45,13 @@ check-recursive installcheck-recursive info-recursive dvi-recursive: ## bombs. mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: - @rev=''; for subdir in $(SUBDIRS); do rev="$$rev $$subdir"; done; \ + @set fnord $(MAKEFLAGS); amf=$$2; \ + rev=''; for subdir in $(SUBDIRS); do rev="$$rev $$subdir"; done; \ for subdir in $$rev; do \ target=`echo $@ | sed s/-recursive//`; \ echo "Making $$target in $$subdir"; \ (cd $$subdir && $(MAKE) $$target) \ ## This trick allows "-k" to keep its natural meaning when running a ## recursive rule. - || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" diff --git a/subdirs.am b/subdirs.am index 0622e8dd..42330d6d 100644 --- a/subdirs.am +++ b/subdirs.am @@ -27,13 +27,14 @@ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive @INSTALLINFO@ \ check-recursive installcheck-recursive info-recursive dvi-recursive: - @for subdir in $(SUBDIRS); do \ + @set fnord $(MAKEFLAGS); amf=$$2; \ + for subdir in $(SUBDIRS); do \ target=`echo $@ | sed s/-recursive//`; \ echo "Making $$target in $$subdir"; \ (cd $$subdir && $(MAKE) $$target) \ ## This trick allows "-k" to keep its natural meaning when running a ## recursive rule. - || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" ## We run all `clean' targets in reverse order. Why? It's an attempt @@ -44,12 +45,13 @@ check-recursive installcheck-recursive info-recursive dvi-recursive: ## bombs. mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: - @rev=''; for subdir in $(SUBDIRS); do rev="$$rev $$subdir"; done; \ + @set fnord $(MAKEFLAGS); amf=$$2; \ + rev=''; for subdir in $(SUBDIRS); do rev="$$rev $$subdir"; done; \ for subdir in $$rev; do \ target=`echo $@ | sed s/-recursive//`; \ echo "Making $$target in $$subdir"; \ (cd $$subdir && $(MAKE) $$target) \ ## This trick allows "-k" to keep its natural meaning when running a ## recursive rule. - || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" -- 2.43.5