]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: various minor tweakings, mostly related to AM_PROG_AR
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 10 Nov 2011 09:50:35 +0000 (10:50 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 10 Nov 2011 09:50:35 +0000 (10:50 +0100)
* 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.

ChangeLog
tests/alloca2.test
tests/ldadd.test
tests/libtool4.test
tests/pr211.test
tests/reqd2.test
tests/syntax.test

index 6a861137ad1cd8bdb76cb652426376e1daa6a06d..2451f89f32f2561185fb68e48ba4cdab879c5d38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2011-11-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       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  <stefano.lattarini@gmail.com>
 
        ar-lib: fix configure output for "unrecognized archiver interface"
index caf11a34d3f126aa0dddd34361dd6f7c4900519e..a459338f5c7bbc8e18b7c2affc60b1b4767f2a0b 100755 (executable)
@@ -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
index 7f4fce89a7e9c580bd20c2482b952984f98b72a7..3515a4e743013408d996f4731f45aeba4d023add 100755 (executable)
@@ -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
index 9f6a7301ecd09a2dd288e4f7182e845ae5cdaefe..814b537d6d282ffc7d4422e046fd8603a44d7fc1 100755 (executable)
@@ -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
index 6778f7a06f2cd2aa073070463017ad45cbf40091..798e4f670ac39447f109b95f3f8721bc56b51f75 100755 (executable)
@@ -47,7 +47,7 @@ END
 
 libtoolize
 $ACLOCAL
-AUTOMAKE_fails -a
+AUTOMAKE_fails -Wnone -a
 $FGREP 'foo.$(OBJEXT)' stderr
 
 :
index b47ef156dd043dbc5c37ff0722c74f4c5798922f..1bf81236e303932fe2ec96103e96a662f019fc7c 100755 (executable)
@@ -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
+
+:
index 505486f0dff5c16b3f81709514585d4ac719c448..23fa7925597508a3d369d998bdce8b3e3ffc85c4 100755 (executable)
@@ -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
+
+: