[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: $MAKE -e needs SHELL=/bin/sh
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: $MAKE -e needs SHELL=/bin/sh |
Date: |
Wed, 10 Apr 2002 18:20:52 +0200 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu) |
On NetBSD 1.5 and OSF1 V4.0, `$MAKE -e' override $(SHELL) with
the SHELL environment variable (this is against POSIX).
This causes failures when running the testsuite from tcsh (for
instance).
The following make sure we always override $(SHELL) when we run
$MAKE -e.
(There is already a few tests that override SHELL=/bin/sh.)
Another solution would be to set SHELL from defs, but I prefer
not to, so we can detect any other place that implicitely use
$SHELL.
Index: ChangeLog
===================================================================
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.1810
diff -u -r1.1810 ChangeLog
--- ChangeLog 10 Apr 2002 15:35:39 -0000 1.1810
+++ ChangeLog 10 Apr 2002 16:09:09 -0000
@@ -1,5 +1,12 @@
2002-04-10 Alexandre Duret-Lutz <address@hidden>
+ * 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 <address@hidden>
+
* tests/subobj9.test: Use configure.in, not configure.ac,
otherwise this fails with old libtool versions.
Index: Makefile.am
===================================================================
RCS file: /cvs/automake/automake/Makefile.am,v
retrieving revision 1.189
diff -u -r1.189 Makefile.am
--- Makefile.am 10 Apr 2002 07:54:31 -0000 1.189
+++ Makefile.am 10 Apr 2002 16:09:09 -0000
@@ -179,8 +179,15 @@
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 \
Index: Makefile.in
===================================================================
RCS file: /cvs/automake/automake/Makefile.in,v
retrieving revision 1.365
diff -u -r1.365 Makefile.in
--- Makefile.in 10 Apr 2002 07:54:31 -0000 1.365
+++ Makefile.in 10 Apr 2002 16:09:09 -0000
@@ -682,8 +682,13 @@
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 \
Index: tests/ansi3.test
===================================================================
RCS file: /cvs/automake/automake/tests/ansi3.test,v
retrieving revision 1.8
diff -u -r1.8 ansi3.test
--- tests/ansi3.test 26 Mar 2002 09:38:47 -0000 1.8
+++ tests/ansi3.test 10 Apr 2002 16:09:09 -0000
@@ -41,5 +41,5 @@
&& $AUTOCONF \
&& $AUTOMAKE -a \
&& CC='gcc' ./configure \
- && ANSI2KNR=./ansi2knr U=_ $MAKE -e \
+ && ANSI2KNR=./ansi2knr U=_ $MAKE -e SHELL=/bin/sh \
&& ./hello
Index: tests/ansi5.test
===================================================================
RCS file: /cvs/automake/automake/tests/ansi5.test,v
retrieving revision 1.4
diff -u -r1.4 ansi5.test
--- tests/ansi5.test 26 Mar 2002 09:38:47 -0000 1.4
+++ tests/ansi5.test 10 Apr 2002 16:09:09 -0000
@@ -73,6 +73,6 @@
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
Index: tests/subobj3.test
===================================================================
RCS file: /cvs/automake/automake/tests/subobj3.test,v
retrieving revision 1.10
diff -u -r1.10 subobj3.test
--- tests/subobj3.test 26 Mar 2002 09:38:47 -0000 1.10
+++ tests/subobj3.test 10 Apr 2002 16:09:09 -0000
@@ -45,5 +45,5 @@
&& $AUTOCONF \
&& $AUTOMAKE -a \
&& CC='gcc' ./configure \
- && ANSI2KNR=./ansi2knr U=_ $MAKE -e \
+ && ANSI2KNR=./ansi2knr U=_ $MAKE -e SHELL=/bin/sh \
&& ./hello
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: $MAKE -e needs SHELL=/bin/sh,
Alexandre Duret-Lutz <=