automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 9/9] More checks on warnings/strictness precedence.


From: Stefano Lattarini
Subject: [PATCH 9/9] More checks on warnings/strictness precedence.
Date: Tue, 4 Jan 2011 19:23:35 +0100
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

And finally, this is [PATCH 12/10] of the older series, which has
already been reviewed and ACK'd "with nits addressed" (so that a
new review shouldn't be required).

The amended patch is attached, for completeness.

Regards,
   Stefano
From dadebf78442e002ed12952e91f40a9464c0385c3 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Fri, 24 Dec 2010 21:10:26 +0100
Subject: [PATCH 9/9] More checks on warnings/strictness precedence.

* tests/warning-groups-win-over-strictness.test: New test, similar
to `warnings-win-over-strictness.test', but checking the explicit
catch-all warning flags (like `-Wall' and `-Wnone').
* tests/Makefile.am (TESTS): Update.
---
 ChangeLog                                     |    8 +++
 tests/Makefile.am                             |    1 +
 tests/Makefile.in                             |    1 +
 tests/warning-groups-win-over-strictness.test |   66 +++++++++++++++++++++++++
 4 files changed, 76 insertions(+), 0 deletions(-)
 create mode 100755 tests/warning-groups-win-over-strictness.test

diff --git a/ChangeLog b/ChangeLog
index 11c128f..4d60998 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-01-02  Stefano Lattarini  <address@hidden>
 
+       More checks on warnings/strictness precedence.
+       * tests/warning-groups-win-over-strictness.test: New test, similar
+       to `warnings-win-over-strictness.test', but checking the explicit
+       catch-all warning flags (like `-Wall' and `-Wnone').
+       * tests/Makefile.am (TESTS): Update.
+
+2011-01-02  Stefano Lattarini  <address@hidden>
+
        Update NEWS about the warnings-over-strictness precedence.
        * NEWS: Automake explicit warning levels always take precedence
        over the implicit warning levels implied by Automake strictness.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 04a175c..d0a447d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -938,6 +938,7 @@ warnings-override.test \
 warnings-precedence.test \
 warnopts.test \
 warnings-win-over-strictness.test \
+warning-groups-win-over-strictness.test \
 werror.test \
 werror2.test \
 werror3.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index dde685d..fd36069 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1201,6 +1201,7 @@ warnings-override.test \
 warnings-precedence.test \
 warnopts.test \
 warnings-win-over-strictness.test \
+warning-groups-win-over-strictness.test \
 werror.test \
 werror2.test \
 werror3.test \
diff --git a/tests/warning-groups-win-over-strictness.test 
b/tests/warning-groups-win-over-strictness.test
new file mode 100755
index 0000000..d761b5d
--- /dev/null
+++ b/tests/warning-groups-win-over-strictness.test
@@ -0,0 +1,66 @@
+#! /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 that explicitly-defined warning levels take precedence over
+# implicit strictness-implied warnings, even when these explicit warning
+# levels are "catch-all warnings" (such as `-Wall' and `-Wnone').
+# Since we are at it, also throw in *.am and *.m4 file inclusions.
+
+. ./defs || Exit 1
+
+set -e
+
+# We want complete control over automake options.
+AUTOMAKE=$original_AUTOMAKE
+
+# Files required in gnu and/or gnits strictness.
+touch README INSTALL NEWS AUTHORS ChangeLog COPYING THANKS
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+m4_include([am-init-automake.m4])
+AC_PROG_CC
+AC_CONFIG_FILES([Makefile])
+# Other similar tests do not use AC_OUTPUT, so we use it here,
+# for completeness and for better coverage.
+AC_OUTPUT
+END
+
+cat > Makefile.am <<END
+include automake-options.am
+FOO := bar
+END
+
+rm -rf autom4te*.cache
+: > automake-options.am
+echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
+$ACLOCAL
+AUTOMAKE_fails -Werror -Wall --foreign
+grep '^Makefile\.am:.*:=.*not portable' stderr
+
+rm -rf autom4te*.cache
+: > automake-options.am
+echo 'AM_INIT_AUTOMAKE([-Werror -Wnone gnu])' > am-init-automake.m4
+$ACLOCAL
+$AUTOMAKE
+
+rm -rf autom4te*.cache
+echo 'AUTOMAKE_OPTIONS = -Werror -Wnone gnits' > automake-options.am
+echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
+$ACLOCAL
+$AUTOMAKE
+
+:
-- 
1.7.2.3


reply via email to

[Prev in Thread] Current Thread [Next in Thread]