++2011-11-05 Stefano Lattarini <stefano.lattarini@gmail.com>
++
++ Merge branch 'msvc' into master
++ * tests/extra-portability3.test: Use `$original_AUTOMAKE' instead
++ of hackishly extracting the first component of `$AUTOMAKE'.
++ * tests/extra-portability.test: Likewise. Also, since we are at
++ it, throw in a couple of small extensions and tweakings (suggested
++ by the minor merge conflicts).
++
+ 2011-11-04 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ warnings: fix buglets for portability warnings
+ * lib/Automake/ChannelDefs.pm (switch_warning): Ensure the
+ correct implications and inter-dependencies between warnings
+ in the categories `portability', `extra-portability' and
+ `recursive-portability' are respected. Also add detailed
+ explicative comments, and references to the relevant tests.
+ * tests/dollarvar2.test: Update and extend. Also, remove
+ some unnecessary uses of `--force' option in automake calls.
+ * tests/extra-portability3.test: New test.
+ * tests/Makefile.am (TESTS): Add it.
+
+ 2011-11-04 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: extend tests on 'extra-portability' warning category
+ * tests/extra-portability.test: Redefine `$AUTOMAKE' to ensure we
+ have complete control over the automake options. Extend by using
+ also a setup where no `portability' warning is present (only an
+ `extra-portability' warning is). Other minor extensions. Remove
+ some redundant, verbose comments about the expected diagnostic.
+
+2011-11-04 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ test defs: new functions to analyze configure help screen
+ * tests/defs (extract_configure_help, grep_configure_help): New
+ functions.
+ * tests/maintmode-configure-msg.test: Use them, reducing code
+ duplication and test brittleness.
+ * tests/help-depend.test: Likewise.
+ * tests/help-depend2.test: Likewise.
+ * tests/help-dmalloc.test: Likewise.
+ * tests/help-lispdir.test: Likewise.
+ * tests/help-multilib.test: Likewise.
+ * tests/help-python.test: Likewise.
+ * tests/help-regex.test: Likewise.
+ * tests/help-silent.test: Likewise.
+ * tests/help-upc.test: Likewise.
+ * tests/help-init.test: Make grepping of configure help screen
+ slightly stricter.
+ * tests/self-check-configure-help.test: New self test.
+ * tests/Makefile.am (TESTS): Add it.
+ From a report by Jim Meyering.
+
2011-11-03 Stefano Lattarini <stefano.lattarini@gmail.com>
tests: various minor tweakings, mostly related to AM_PROG_AR
extra10.test \
extra11.test \
extra12.test \
+extradep.test \
+extradep2.test \
extra-portability.test \
extra-portability2.test \
+ extra-portability3.test \
f90only.test \
flavor.test \
flibs.test \
extra10.test \
extra11.test \
extra12.test \
+extradep.test \
+extradep2.test \
extra-portability.test \
extra-portability2.test \
+ extra-portability3.test \
f90only.test \
flavor.test \
flibs.test \
. ./defs || Exit 1
-set -e
-
+ #
+ # First, try a setup where we have a `portability-recursive' warning,
+ # but no "simple" `portability' warning.
+ #
+
cat >Makefile.am <<'EOF'
x = 1
bla = $(foo$(x))
set -e
-# FIXME: use $original_AUTOMAKE here once we are merged into master.
-AUTOMAKE="`(set $AUTOMAKE && echo $1)` --foreign -Werror"
+ # We want (almost) complete control over automake options.
++AUTOMAKE="$original_AUTOMAKE --foreign -Werror"
+
cat >>configure.in <<END
AC_PROG_CC
AC_PROG_RANLIB
grep 'requires.*AM_PROG_CC_C_O' stderr
grep 'requires.*AM_PROG_AR' stderr
--# Disabling extra-portability leaves portability intact.
++# Disabling extra-portability leaves portability intact (1).
+ AUTOMAKE_fails -Wportability -Wno-extra-portability
+ grep 'requires.*AM_PROG_CC_C_O' stderr
+ grep 'requires.*AM_PROG_AR' stderr && Exit 1
++# Disabling extra-portability leaves portability intact (2).
+AUTOMAKE_fails -Wall -Wno-extra-portability
- # The expected diagnostic is
- # Makefile.am:2: compiling `foo.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.in'
- # Makefile.am:1: while processing library `libfoo.a'
+grep 'requires.*AM_PROG_CC_C_O' stderr
+grep 'requires.*AM_PROG_AR' stderr && Exit 1
# Enabling portability does not enable extra-portability.
--AUTOMAKE_fails -Wnone -Wportability
- # The expected diagnostic is
- # Makefile.am:2: compiling `foo.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.in'
- # Makefile.am:1: while processing library `libfoo.a'
++AUTOMAKE_fails -Wportability
grep 'requires.*AM_PROG_CC_C_O' stderr
grep 'requires.*AM_PROG_AR' stderr && Exit 1
--- /dev/null
-# FIXME: use $original_AUTOMAKE here once we are merged into master.
-AUTOMAKE="`(set $AUTOMAKE && echo $1)` --foreign -Werror"
+ #! /bin/sh
+ # Copyright (C) 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
+ # the Free Software Foundation; either version 2, or (at your option)
+ # any later version.
+ #
+ # This program is distributed in the hope that it will be useful,
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ # GNU General Public License for more details.
+ #
+ # You should have received a copy of the GNU General Public License
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ # Check interactions between the `portability-recursive' and
+ # `extra-portability' warning categories.
+
+ . ./defs || Exit 1
+
+ set -e
+
+ # We want (almost) complete control over automake options.
++AUTOMAKE="$original_AUTOMAKE --foreign -Werror"
+
+ cat >>configure.in <<END
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ AC_OUTPUT
+ END
+
+ $ACLOCAL
+
+ cat >Makefile.am <<'END'
+ baz = $(foo$(bar))
+ lib_LIBRARIES = libfoo.a
+ libfoo_a_SOURCES = foo.c
+ END
+
+ # 'extra-portability' implies 'portability-recursive'.
+ AUTOMAKE_fails -Wextra-portability
+ grep 'requires.*AM_PROG_AR' stderr
+ grep 'recursive variable expansion' stderr
+
+ # We can disable 'extra-portability' while leaving
+ # 'portability-recursive' intact.
+ AUTOMAKE_fails -Wportability-recursive -Wno-extra-portability
+ grep 'requires.*AM_PROG_AR' stderr && Exit 1
+ grep 'recursive variable expansion' stderr
+
+ # We can disable 'portability-recursive' while leaving
+ # 'extra-portability' intact.
+ AUTOMAKE_fails -Wextra-portability -Wno-portability-recursive
+ grep 'requires.*AM_PROG_AR' stderr
+ grep 'recursive variable expansion' stderr && Exit 1
+
+ # Disabling 'portability' disables 'portability-recursive' and
+ # 'extra-portability'.
+ $AUTOMAKE -Wextra-portability -Wno-portability
+
+ :