From: Stefano Lattarini Date: Thu, 10 Nov 2011 09:50:35 +0000 (+0100) Subject: tests: various minor tweakings, mostly related to AM_PROG_AR X-Git-Tag: v1.11.1b~11^2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=620ba14f54a994d3b695001546a4734282902bba;p=thirdparty%2Fautomake.git tests: various minor tweakings, mostly related to AM_PROG_AR * tests/alloca2.test: Ensure we don't experience a spurious failure due to a missing `AM_PROG_AR' macro or a missing `ar-lib' auxiliary script. * tests/libtool4.test: Likewise. * tests/ldadd.test: Likewise. Since we are at it, make grepping of automake stderr stricter. * tests/reqd2.test: Likewise. * tests/pr211.test: Ensure automake fails also with `-Wnone', since the error we are testing for is an hard error, not a mere warning. * tests/syntax.test: Likewise, and ensure we don't fail to other errors by removing use of `lib_LTLIBRARIES' in Makefile.am. Since we are at it, make grepping of automake stderr stricter. --- diff --git a/ChangeLog b/ChangeLog index 6a861137a..2451f89f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2011-11-10 Stefano Lattarini + + tests: various minor tweakings, mostly related to AM_PROG_AR + * tests/alloca2.test: Ensure we don't experience a spurious failure + due to a missing `AM_PROG_AR' macro or a missing `ar-lib' auxiliary + script. + * tests/libtool4.test: Likewise. + * tests/ldadd.test: Likewise. Since we are at it, make grepping of + automake stderr stricter. + * tests/reqd2.test: Likewise. + * tests/pr211.test: Ensure automake fails also with `-Wnone', since + the error we are testing for is an hard error, not a mere warning. + * tests/syntax.test: Likewise, and ensure we don't fail to other + errors by removing use of `lib_LTLIBRARIES' in Makefile.am. Since + we are at it, make grepping of automake stderr stricter. + 2011-11-05 Stefano Lattarini ar-lib: fix configure output for "unrecognized archiver interface" diff --git a/tests/alloca2.test b/tests/alloca2.test index caf11a34d..a459338f5 100755 --- a/tests/alloca2.test +++ b/tests/alloca2.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 2003, 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 @@ -22,6 +22,7 @@ set -e cat >> configure.in <<'END' AC_PROG_CC +AM_PROG_AR END cat > Makefile.am << 'END' @@ -31,6 +32,7 @@ libtu_la_LIBADD = @LTALLOCA@ END : > alloca.c +: > ar-lib $ACLOCAL AUTOMAKE_fails diff --git a/tests/ldadd.test b/tests/ldadd.test index 7f4fce89a..3515a4e74 100755 --- a/tests/ldadd.test +++ b/tests/ldadd.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2010 Free Software +# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2010, 2011 Free Software # Foundation, Inc. # # This program is free software; you can redistribute it and/or modify @@ -42,6 +42,7 @@ END : > q.c $ACLOCAL || Exit 1 -AUTOMAKE_fails -grep LDADD stderr || Exit 1 +AUTOMAKE_fails -Wno-extra-portability +grep "libtu_la_LDADD" stderr +grep " use [\`"']libtu_la_LIBADD' stderr Exit 0 diff --git a/tests/libtool4.test b/tests/libtool4.test index 9f6a7301e..814b537d6 100755 --- a/tests/libtool4.test +++ b/tests/libtool4.test @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 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 @@ -22,12 +22,15 @@ set -e cat >> configure.in <<'END' AC_PROG_CC +AM_PROG_AR END cat > Makefile.am << 'END' EXTRA_LTLIBRARIES = liblib.la END +: > ar-lib + $ACLOCAL AUTOMAKE_fails grep '[Ll]ibtool library .*LIBTOOL.* undefined' stderr diff --git a/tests/pr211.test b/tests/pr211.test index 6778f7a06..798e4f670 100755 --- a/tests/pr211.test +++ b/tests/pr211.test @@ -47,7 +47,7 @@ END libtoolize $ACLOCAL -AUTOMAKE_fails -a +AUTOMAKE_fails -Wnone -a $FGREP 'foo.$(OBJEXT)' stderr : diff --git a/tests/reqd2.test b/tests/reqd2.test index b47ef156d..1bf81236e 100755 --- a/tests/reqd2.test +++ b/tests/reqd2.test @@ -29,6 +29,7 @@ AC_CONFIG_AUX_DIR([autoconf]) AM_INIT_AUTOMAKE AC_CONFIG_FILES([Makefile]) AC_PROG_CC +AM_PROG_AR AM_PROG_LIBTOOL AC_CONFIG_FILES([autoconf/Makefile main/Makefile]) AC_OUTPUT @@ -45,6 +46,7 @@ lib_LTLIBRARIES = lib0.la lib0_la_SOURCES = 0.c END +: > ar-lib libtoolize --force --copy $ACLOCAL $AUTOCONF @@ -52,4 +54,6 @@ $AUTOCONF test -f autoconf/ltmain.sh # Sanity check. rm -f autoconf/ltmain.sh AUTOMAKE_fails --add-missing --copy -grep 'autoconf/ltmain.sh' stderr +grep '^configure\.in:7:.* required file.*autoconf/ltmain\.sh' stderr + +: diff --git a/tests/syntax.test b/tests/syntax.test index 505486f0d..23fa79255 100755 --- a/tests/syntax.test +++ b/tests/syntax.test @@ -1,5 +1,6 @@ #! /bin/sh -# Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 1998, 2001, 2002, 2003, 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 @@ -23,9 +24,11 @@ set -e cat > Makefile.am << 'END' foo = q \ -lib_LTLIBRARIES = foo.la +bin_SCRIPTS = foo.sh END $ACLOCAL -AUTOMAKE_fails -grep 'Makefile.am:2:.*blank line' stderr +AUTOMAKE_fails -Wnone +grep '^Makefile\.am:2:.*blank line following trailing backslash' stderr + +: