]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: amopts-variable-expansion.sh: fix post-merge spurious failure
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 12 Jan 2013 14:12:35 +0000 (15:12 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 12 Jan 2013 14:12:35 +0000 (15:12 +0100)
* t/amopts-variable-expansion.sh:: Adjust to reflect the fact that subdir
sources no longer require AM_PROG_CC_C_O in 'configure.ac'.  Instead, use
the fact that 'AM_PROG_AR' is required to be in 'configure.ac' when a
library is to be built and warnings in the 'extra-portability' category
are enabled.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/amopts-variable-expansion.sh

index 64a40a19c35687b2d55a94af86073f4308ca89bc..9ffa8d1214297beeff460c5dfd15631b04c5f17d 100755 (executable)
@@ -27,6 +27,9 @@ AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([-Wall -Werror gnu])
 AC_CONFIG_FILES([Makefile])
 AC_PROG_CC
+AC_PROG_RANLIB
+# The absence of AM_PROG_AR will give a warning with
+# '-Wextra-portability', which we want to elicit.
 END
 
 cat > Makefile.am <<'END'
@@ -39,10 +42,8 @@ foo1 = ${foo2}
 foo2 = no-dist -Wnone
 foo2 += $(foo3)
 foo3 = -Wno-error
-bar = -Wportability
-noinst_PROGRAMS = foo
-# This will give a warning with '-Wportability'.
-foo_SOURCES = sub/foo.c
+bar = -Wextra-portability
+noinst_LIBRARIES = libfoo.a
 # This would give a warning with '-Woverride'.
 install:
 END
@@ -54,8 +55,8 @@ END
 
 $ACLOCAL
 AUTOMAKE_run
-grep '^Makefile\.am:.*sub/foo\.c.*requires.*AM_PROG_CC_C_O' stderr
-grep README stderr && exit 1
+$FGREP 'AM_PROG_AR' stderr
+$FGREP 'README' stderr && exit 1
 $EGREP '(install|override)' stderr && exit 1
 $EGREP 'distdir|\.tar[ .]' Makefile.in && exit 1