+2011-11-03 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: various minor tweakings, mostly related to AM_PROG_AR
+ * tests/alloca.test: Adjust to new portability requirements due
+ to the new AM_PROG_AR macro.
+ * tests/discover.test: Likewise.
+ * tests/libobj3.test: Likewise.
+ * tests/pluseq7.test: Likewise. Also, make grepping of automake
+ expected error message stricter.
+ * tests/stdlib.test: Likewise, and extend the test a bit.
+ * tests/parse.test (configure.in): Remove redundant call to
+ AC_PROG_RANLIB.
+ * tests/library2.test: Adjust to new portability requirements
+ due to the new AM_PROG_AR macro. Also ...
+ (configure.in): ... add call to AC_PROG_CC, to ensure automake
+ really fails for the expected reason.
+
2011-11-03 Zack Weinberg <zackw@panix.com> (tiny change)
Stefano Lattarini <stefano.lattarini@gmail.com>
#! /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
set -e
cat >> configure.in <<'END'
+AM_PROG_AR
AC_PROG_CC
END
END
: > alloca.c
+: > ar-lib
$ACLOCAL
AUTOMAKE_fails
#! /bin/sh
-# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2010 Free Software
+# Copyright (C) 1996, 1997, 2000, 2001, 2002, 2010, 2011 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
cat >> configure.in << 'END'
AC_PROG_RANLIB
+AM_PROG_AR
AC_PROG_CC
AC_LIBOBJ([fsusage])
AC_OUTPUT
END
: > fsusage.c
+: > ar-lib
$ACLOCAL
AUTOMAKE_fails
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 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
cat >> configure.in << 'END'
AC_PROG_RANLIB
+AM_PROG_AR
END
cat > Makefile.am << 'END'
libtu_a_LIBADD = @LIBOBJS@
END
+: > ar-lib
+
$ACLOCAL
AUTOMAKE_fails
grep 'Makefile.am:3:.*LIBOBJS' stderr
#! /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
set -e
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
+
cat > Makefile.am << 'END'
EXTRA_LIBRARIES = libfoo.a
END
$ACLOCAL
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-portability
grep AC_PROG_RANLIB stderr
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 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
AC_INIT
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
AC_PROG_CC
-AC_PROG_RANLIB
AC_OUTPUT(Makefile)
END
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2010 Free Software Foundation,
-# Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 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
END
$ACLOCAL
-AUTOMAKE_fails
-grep 'Makefile.am:3:.*AR' stderr
+AUTOMAKE_fails -Wno-portability
+q="[\`'\"]"
+grep "^Makefile\.am:3:.* AR .* with $q=$q before .*$q+=$q" stderr
:
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2004, 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
cat >> configure.in << 'END'
AC_PROG_CC
+AM_PROG_AR
AC_PROG_RANLIB
END
cat > Makefile.am << 'END'
noinst_LIBRARIES = sub/foo
+include $(srcdir)/foo.mk
END
+cat > foo.mk << 'END'
+## A dummy automake comment.
+a = x \
+ y
+# A dummy make comment.
+lib_LIBRARIES = zardoz.a
+END
+
+: > ar-lib
+
$ACLOCAL
AUTOMAKE_fails
+q="[\`'\"]"
+badname='not a standard library name'
# We're specifically testing for line-number information.
-grep 'Makefile.am:1:.*sub/foo.*standard library name' stderr
-grep 'Makefile.am:1:.*sub/libfoo.a.*' stderr
+grep "^Makefile\\.am:1:.*${q}sub/foo${q}.*$badname" stderr
+grep "^Makefile\\.am:1:.*sub/libfoo\\.a" stderr
+grep "^foo\\.mk:5:.*${q}zardoz\\.a${q}.*$badname" stderr
+grep "^foo\\.mk:5:.*libzardoz\\.a" stderr
+
+: