summaryrefslogtreecommitdiff
path: root/tests/suffix.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/suffix.test')
-rwxr-xr-xtests/suffix.test37
1 files changed, 28 insertions, 9 deletions
diff --git a/tests/suffix.test b/tests/suffix.test
index c790c66a4..3701b0c38 100755
--- a/tests/suffix.test
+++ b/tests/suffix.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010, 2011 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,26 +15,44 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure a suffix rule for C compilation is produced.
+# Make sure proper suffix rules for C compilation are produced, and
+# only once.
+# See also related test `suffix2.test'.
. ./defs || Exit 1
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
+AC_PROG_RANLIB
END
cat > Makefile.am << 'END'
noinst_PROGRAMS = foo
+noinst_LIBRARIES = libbar.a
END
-$ACLOCAL
+for use_arlib in false :; do
+
+ if $use_arlib; then
+ am_warns=
+ echo AM_PROG_AR >> configure.in
+ : > ar-lib
+ else
+ am_warns=-Wno-extra-portability
+ fi
+
+ $ACLOCAL --force
+
+ $AUTOMAKE $am_warns -i
+ grep '^ *\.c' Makefile.in # for debugging
+ test `grep -c '^\.c\.o:' Makefile.in` -eq 1
+ test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
-$AUTOMAKE -i
-grep '^\.c\.o' Makefile.in
+ $AUTOMAKE $am_warns
+ grep '^ *\.c' Makefile.in # for debugging
+ test `grep -c '^\.c\.o:' Makefile.in` -eq 1
+ test `grep -c '^\.c\.obj:' Makefile.in` -eq 1
-$AUTOMAKE
-grep '^\.c\.o' Makefile.in
+done
: