Merge branch 'maint'
[platform/upstream/automake.git] / t / ext.sh
index 08643ac..a69fe8b 100755 (executable)
--- a/t/ext.sh
+++ b/t/ext.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure extensions are set correctly for various languages.
 
-. ./defs || Exit 1
+. ./defs || exit 1
 
 cat >> configure.ac << 'END'
 AC_PROG_F77
@@ -34,13 +34,10 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-for ext in f for f90 f95 F F90 F95 r m mm upc
-do
-   # Some versions of the BSD shell wrongly exit when 'set -e' is active
-   # if the last command within a compound statement fails and is guarded
-   # by an && only.  So we play safe and use the following idiom, instead
-   # of the apparently simpler 'grep ... && Exit 1'.
-   if grep "^$ext\.o:" Makefile.in; then Exit 1; else :; fi
+for ext in f for f90 f95 F F90 F95 r m mm upc; do
    grep "^\.$ext\.o:" Makefile.in
+   grep "^$ext\.o:" Makefile.in && exit 1
+   : For shells with busted 'set -e'.
 done
-Exit 0
+
+: