summaryrefslogtreecommitdiff
path: root/t/ext.sh
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-05-09 14:04:31 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-05-10 13:17:51 +0200
commit21423249a97c95023d79536ab570939c507d2df2 (patch)
tree9e6d52f55ebb52180497213d5f6288c4190e5987 /t/ext.sh
parent4b8c7705ccca9e8bf0cef0a6a4cfa0e6dc24bf9a (diff)
downloadautomake-21423249a97c95023d79536ab570939c507d2df2.tar.gz
[ng] am: prefer pattern rules over old-fashioned suffix rules
The use of pattern rules is cleaner, safer, and vouched for in the GNU make manual itself. Moreover, it will allow us to obtain some simplifications in the automake script and the documentation in future changes. * lib/am/texinfos.am: Turn this suffix rules into pattern rules. * lib/am/texibuild.am: Likewise. * lib/am/depend2.am: Likewise. * lib/am/yacc.am: Likewise. * lib/am/lex.am: Likewise. * lib/am/lang-compile.am: Likewise. Also, since we are at it, remove extra blank lines and quote 'like this' rather than `like this'. * t/ext.sh: Adjust. * t/objc-basic.sh: Likewise. * t/objcxx-basic.sh: Likewise. * t/txinfo6.sh: Likewise. * t/suffix.sh: Likewise. * t/suffix2.sh: Likewise. Also, define a dummy LIBTOOL in Makefile.am instead of requiring the libtool macros. * t/cxx.sh: Remove as obsolete. * t/nodep.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/ext.sh')
-rwxr-xr-xt/ext.sh16
1 files changed, 7 insertions, 9 deletions
diff --git a/t/ext.sh b/t/ext.sh
index 08643ac26..02ceab598 100755
--- a/t/ext.sh
+++ b/t/ext.sh
@@ -34,13 +34,11 @@ 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
- grep "^\.$ext\.o:" Makefile.in
+$FGREP '%.o' Makefile.in # For debugging.
+
+for ext in f for f90 f95 F F90 F95 r m mm upc; do
+ grep "%.*: %$ext" Makefile.in && Exit 1
+ grep "^%\.o: %\.$ext$" Makefile.in
done
-Exit 0
+
+: