From e2fd8d2a3f54a96a32c2ff8c5ba33bbad069e5eb Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 12 Jan 2013 15:12:35 +0100 Subject: [PATCH] tests: amopts-variable-expansion.sh: fix post-merge spurious failure * 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 --- t/amopts-variable-expansion.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/t/amopts-variable-expansion.sh b/t/amopts-variable-expansion.sh index 64a40a19c..9ffa8d121 100755 --- a/t/amopts-variable-expansion.sh +++ b/t/amopts-variable-expansion.sh @@ -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 -- 2.47.2