doc: typos in test file.
[automake.git] / t / warning-groups-win-over-strictness.sh
blob289fa866b9b65fdbb5d5d9e41761e395e8d672b1
1 #! /bin/sh
2 # Copyright (C) 2011-2024 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
17 # Check that explicitly-defined warning levels take precedence over
18 # implicit strictness-implied warnings, even when these explicit warning
19 # levels are "catch-all warnings" (such as '-Wall' and '-Wnone').
20 # Since we are at it, also throw in *.am and *.m4 file inclusions.
22 . test-init.sh
24 # We want complete control over automake options.
25 AUTOMAKE=$am_original_AUTOMAKE
27 # Files required in gnu and/or gnits strictness.
28 touch README INSTALL NEWS AUTHORS ChangeLog COPYING THANKS
30 cat > configure.ac << END
31 AC_INIT([$me], [1.0])
32 m4_include([am-init-automake.m4])
33 AC_PROG_CC
34 AC_CONFIG_FILES([Makefile])
35 # Other similar tests do not use AC_OUTPUT, so we use it here,
36 # for completeness and for better coverage.
37 AC_OUTPUT
38 END
40 cat > Makefile.am <<END
41 include automake-options.am
42 FOO := bar
43 END
45 rm -rf autom4te*.cache
46 : > automake-options.am
47 echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
48 $ACLOCAL
49 AUTOMAKE_fails -Werror -Wall --foreign
50 grep '^Makefile\.am:.*:=.*not portable' stderr
52 rm -rf autom4te*.cache
53 : > automake-options.am
54 echo 'AM_INIT_AUTOMAKE([-Werror -Wnone gnu])' > am-init-automake.m4
55 $ACLOCAL
56 $AUTOMAKE
58 rm -rf autom4te*.cache
59 echo 'AUTOMAKE_OPTIONS = -Werror -Wnone gnits' > automake-options.am
60 echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
61 $ACLOCAL
62 $AUTOMAKE