2 # Copyright (C) 2022-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)
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 verbose mode defaults and behavior. See bug#32868.
18 # Because we have to rerun the autotools for every configuration,
19 # this test can take 30 seconds or so to run.
26 echo "Default behavior is currently verbose."
27 cat <<EOF >configure.ac
28 AC_INIT([silent-defaults-default-verbose], [1.0])
30 AC_CONFIG_FILES([Makefile])
39 grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
41 .
/configure
-C --enable-silent-rules
42 grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
44 .
/configure
-C --disable-silent-rules
45 grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
48 echo "User doesn't pick a silent mode default before AM_INIT_AUTOMAKE."
49 cat <<EOF >configure.ac
50 AC_INIT([silent-defaults-use-am_silent_rules], [1.0])
53 AC_CONFIG_FILES([Makefile])
62 grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
64 .
/configure
-C --enable-silent-rules
65 grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
67 .
/configure
-C --disable-silent-rules
68 grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
71 echo "User disables silent mode default before AM_INIT_AUTOMAKE."
72 cat <<EOF >configure.ac
73 AC_INIT([silent-defaults-user-disable-before-am_init], [1.0])
76 AC_CONFIG_FILES([Makefile])
85 grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
87 .
/configure
-C --enable-silent-rules
88 grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
90 .
/configure
-C --disable-silent-rules
91 grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
94 echo "User enables silent mode default before AM_INIT_AUTOMAKE."
95 cat <<EOF >configure.ac
96 AC_INIT([silent-defaults-user-enable-before-am_init], [1.0])
97 AM_SILENT_RULES([yes])
99 AC_CONFIG_FILES([Makefile])
108 grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
110 .
/configure
-C --enable-silent-rules
111 grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
113 .
/configure
-C --disable-silent-rules
114 grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
117 echo "User doesn't pick a silent mode default after AM_INIT_AUTOMAKE."
118 cat <<EOF >configure.ac
119 AC_INIT([silent-defaults-user-no-default-after-am_init], [1.0])
122 AC_CONFIG_FILES([Makefile])
131 grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
133 .
/configure
-C --enable-silent-rules
134 grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
136 .
/configure
-C --disable-silent-rules
137 grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
140 echo "User disables silent mode default after AM_INIT_AUTOMAKE."
141 cat <<EOF >configure.ac
142 AC_INIT([silent-defaults-user-disable-after-am_init], [1.0])
144 AM_SILENT_RULES([no])
145 AC_CONFIG_FILES([Makefile])
154 grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
156 .
/configure
-C --enable-silent-rules
157 grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
159 .
/configure
-C --disable-silent-rules
160 grep '^AM_DEFAULT_VERBOSITY = 1' Makefile
163 echo "User enables silent mode default after AM_INIT_AUTOMAKE."
164 cat <<EOF >configure.ac
165 AC_INIT([silent-defaults-user-enable-after-am_init], [1.0])
167 AM_SILENT_RULES([yes])
168 AC_CONFIG_FILES([Makefile])
177 grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
179 .
/configure
-C --enable-silent-rules
180 grep '^AM_DEFAULT_VERBOSITY = 0' Makefile
182 .
/configure
-C --disable-silent-rules
183 grep '^AM_DEFAULT_VERBOSITY = 1' Makefile