From c3cb4ce28c47bddef1de9a0c686cc64cf85dac62 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 10 Apr 2002 16:20:57 +0000 Subject: [PATCH] * Makefile.am (maintainer-check): Make sure `$MAKE -e' is always followed by a SHELL setting. * tests/ansi3.test, tests/ansi5.test, tests/subobj3.test: Set SHELL when calling `$MAKE -e'. --- ChangeLog | 7 +++++++ Makefile.am | 9 ++++++++- Makefile.in | 7 ++++++- tests/ansi3.test | 2 +- tests/ansi5.test | 2 +- tests/subobj3.test | 2 +- 6 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index eccc3d11..e2577e7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-04-10 Alexandre Duret-Lutz + + * Makefile.am (maintainer-check): Make sure `$MAKE -e' is + always followed by a SHELL setting. + * tests/ansi3.test, tests/ansi5.test, tests/subobj3.test: Set + SHELL when calling `$MAKE -e'. + 2002-04-10 Alexandre Duret-Lutz * tests/subobj9.test: Use configure.in, not configure.ac, diff --git a/Makefile.am b/Makefile.am index 17765b30..5e214b4e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -179,10 +179,17 @@ maintainer-check: automake aclocal exit 1; \ fi @if grep -v SHELL $(srcdir)/tests/*.test | grep '\$$MAKE .*=' ; then \ - echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above lines,' 1>&2; \ + echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e SHELL=/bin/sh" in the above lines,' 1>&2; \ echo 'it is more portable.' 1>&2; \ exit 1; \ fi +## On NetBSD (1.5) and OSF, the $SHELL variable is still inherited from +## the environment. + @if grep '$$MAKE.*-e' $(srcdir)/tests/*.test | grep -v '-e.*SHELL' ; then \ + echo 'Always overwrite SHELL when using "$$MAKE -e".' 1>&2; \ + echo 'Use "$$MAKE -e SHELL=/bin/sh" in the above lines.' 1>&2; \ + exit 1; \ + fi @if egrep 'SHELL=.*\$$MAKE' $(srcdir)/tests/*.test; then \ echo '$$MAKE ignores the SHELL envvar, use "$$MAKE SHELL=/bin/sh" in' 1>&2; \ echo 'the above lines.' 1>&2; \ diff --git a/Makefile.in b/Makefile.in index 94c4aaee..0f8fadbd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -682,10 +682,15 @@ maintainer-check: automake aclocal exit 1; \ fi @if grep -v SHELL $(srcdir)/tests/*.test | grep '\$$MAKE .*=' ; then \ - echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above lines,' 1>&2; \ + echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e SHELL=/bin/sh" in the above lines,' 1>&2; \ echo 'it is more portable.' 1>&2; \ exit 1; \ fi + @if grep '$$MAKE.*-e' $(srcdir)/tests/*.test | grep -v '-e.*SHELL' ; then \ + echo 'Always overwrite SHELL when using "$$MAKE -e".' 1>&2; \ + echo 'Use "$$MAKE -e SHELL=/bin/sh" in the above lines.' 1>&2; \ + exit 1; \ + fi @if egrep 'SHELL=.*\$$MAKE' $(srcdir)/tests/*.test; then \ echo '$$MAKE ignores the SHELL envvar, use "$$MAKE SHELL=/bin/sh" in' 1>&2; \ echo 'the above lines.' 1>&2; \ diff --git a/tests/ansi3.test b/tests/ansi3.test index ef7e7fb2..0f62ff91 100755 --- a/tests/ansi3.test +++ b/tests/ansi3.test @@ -41,5 +41,5 @@ $ACLOCAL \ && $AUTOCONF \ && $AUTOMAKE -a \ && CC='gcc' ./configure \ - && ANSI2KNR=./ansi2knr U=_ $MAKE -e \ + && ANSI2KNR=./ansi2knr U=_ $MAKE -e SHELL=/bin/sh \ && ./hello diff --git a/tests/ansi5.test b/tests/ansi5.test index f9d56b5b..9659b4af 100755 --- a/tests/ansi5.test +++ b/tests/ansi5.test @@ -73,6 +73,6 @@ done mv one/Makefile one/Makefile.old sed -e 's,ANSI2KNR =,ANSI2KNR = ./ansi2knr,' < one/Makefile.old > one/Makefile -U=_ $MAKE -e +U=_ $MAKE -e SHELL=/bin/sh ./one/joe ./two/maude diff --git a/tests/subobj3.test b/tests/subobj3.test index 9be2fa81..e39ff558 100755 --- a/tests/subobj3.test +++ b/tests/subobj3.test @@ -45,5 +45,5 @@ $ACLOCAL \ && $AUTOCONF \ && $AUTOMAKE -a \ && CC='gcc' ./configure \ - && ANSI2KNR=./ansi2knr U=_ $MAKE -e \ + && ANSI2KNR=./ansi2knr U=_ $MAKE -e SHELL=/bin/sh \ && ./hello -- 2.43.5