2 # Copyright (C) 2009 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 <http://www.gnu.org/licenses/>.
17 # Check user extensibility of silent-rules mode.
23 cat >>configure.in <<'EOF'
28 cat > Makefile.am <<'EOF'
29 my_verbose = $(my_verbose_$(V))
30 my_verbose_ = $(my_verbose_$(AM_DEFAULT_VERBOSITY))
31 my_verbose_0 = @echo GEN $@;
36 $(my_verbose)cp $(srcdir)/foo.in $@
44 $AUTOMAKE --add-missing
47 ./configure --enable-silent-rules
48 $MAKE >stdout || { cat stdout; Exit 1; }
51 grep 'cp ' stdout && Exit 1
54 $MAKE V=1 >stdout || { cat stdout; Exit 1; }
56 grep 'GEN foo' stdout && Exit 1
61 ./configure --disable-silent-rules
62 $MAKE >stdout || { cat stdout; Exit 1; }
64 grep 'GEN foo' stdout && Exit 1
70 # Things should also work with -Wall in AM_INIT_AUTOMAKE.
71 cat > configure.in <<'END'
72 AC_INIT([silent6], [1.0])
73 AM_INIT_AUTOMAKE([-Wall])
74 AC_CONFIG_FILES([Makefile])
81 # AM_SILENT_RULES should turn off the warning
83 echo 'AM_SILENT_RULES' >> configure.in
86 grep 'AM_V_GEN' Makefile.in
87 $AUTOMAKE --force -Wno-all -Wportability
88 grep 'AM_V_GEN' Makefile.in
90 # The `silent-rules' option to AM_INIT_AUTOMAKE should work likewise.
92 cat > configure.in <<'END'
93 AC_INIT([silent6], [1.0])
94 AM_INIT_AUTOMAKE([silent-rules])
95 AC_CONFIG_FILES([Makefile])
99 grep 'AM_V_GEN' Makefile.in
100 $AUTOMAKE --force -Wno-all -Wportability
101 grep 'AM_V_GEN' Makefile.in