From: Stefano Lattarini Date: Sat, 5 Nov 2011 09:43:27 +0000 (+0100) Subject: Merge branch 'msvc' into master X-Git-Tag: ng-0.5a~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97cbf15b81c6276cb76eefce4cb15c88e12f9a47;p=thirdparty%2Fautomake.git Merge branch 'msvc' into master Commits merged from msvc: - warnings: fix buglets for portability warnings - tests: extend tests on 'extra-portability' warning category Extra testsuite edits: * 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). --- 97cbf15b81c6276cb76eefce4cb15c88e12f9a47 diff --cc ChangeLog index f22fa84cc,d3e350252..2b837244c --- a/ChangeLog +++ b/ChangeLog @@@ -1,25 -1,25 +1,56 @@@ ++2011-11-05 Stefano Lattarini ++ ++ 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 + + 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 + + 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 + + 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 tests: various minor tweakings, mostly related to AM_PROG_AR diff --cc tests/Makefile.am index 00af436e1,a27cdaf77..471b340a5 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@@ -476,10 -396,9 +476,11 @@@ extra9.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 \ diff --cc tests/Makefile.in index 1179ed22a,cdd8de216..1fe51cd05 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@@ -752,10 -680,9 +752,11 @@@ extra9.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 \ diff --cc tests/dollarvar2.test index e1ac766c8,7a6db3794..cda960571 --- a/tests/dollarvar2.test +++ b/tests/dollarvar2.test @@@ -19,6 -19,13 +19,11 @@@ . ./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)) diff --cc tests/extra-portability.test index 353141faa,51a9b4f3c..edfbf6913 --- a/tests/extra-portability.test +++ b/tests/extra-portability.test @@@ -23,6 -24,10 +24,9 @@@ set -e + # We want (almost) complete control over automake options. -# FIXME: use $original_AUTOMAKE here once we are merged into master. -AUTOMAKE="`(set $AUTOMAKE && echo $1)` --foreign -Werror" ++AUTOMAKE="$original_AUTOMAKE --foreign -Werror" + cat >>configure.in <. + + # Check interactions between the `portability-recursive' and + # `extra-portability' warning categories. + + . ./defs || Exit 1 + + set -e + + # We want (almost) complete control over automake options. -# FIXME: use $original_AUTOMAKE here once we are merged into master. -AUTOMAKE="`(set $AUTOMAKE && echo $1)` --foreign -Werror" ++AUTOMAKE="$original_AUTOMAKE --foreign -Werror" + + cat >>configure.in <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 + + :