summaryrefslogtreecommitdiff
path: root/tests/silent7.test
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2009-03-09 21:57:49 +0100
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2009-03-09 21:57:49 +0100
commitbee1af31a3e62086b4476ad491aacfecb4e149d8 (patch)
tree2c345b118dbf5bffec6387bcbc6651232a88bbf3 /tests/silent7.test
parentb09961790e7e4f5f4f58e5b48464cbc5ad9e624f (diff)
downloadautomake-bee1af31a3e62086b4476ad491aacfecb4e149d8.tar.gz
Provide variables for silencing of user rules.
* automake.in (handle_languages): Always define `AM_V_GEN' and `AM_V_at'. * doc/automake.texi (Options): Document these flags. * tests/silent7.test: New test. * tests/Makefile.am: Update. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'tests/silent7.test')
-rwxr-xr-xtests/silent7.test71
1 files changed, 71 insertions, 0 deletions
diff --git a/tests/silent7.test b/tests/silent7.test
new file mode 100755
index 000000000..4fd52f323
--- /dev/null
+++ b/tests/silent7.test
@@ -0,0 +1,71 @@
+#!/bin/sh
+# Copyright (C) 2009 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 3, 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 user extensibility of silent mode.
+
+. ./defs
+
+set -e
+
+cat >>configure.in <<'EOF'
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+all-local: foo
+
+## And here's how you should do it in your own code:
+foo: foo.in
+ $(AM_V_GEN)cp $(srcdir)/foo.in $@
+ $(AM_V_at)echo more >> $@
+
+EXTRA_DIST = foo.in
+CLEANFILES = foo
+EOF
+
+: >foo.in
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'GEN.*foo' stdout && Exit 1
+grep 'cp ' stdout
+grep 'echo ' stdout
+
+$MAKE distclean
+
+echo 'AUTOMAKE_OPTIONS = silent' >> Makefile.am
+$AUTOMAKE
+
+./configure
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'GEN.*foo' stdout
+grep 'cp ' stdout && Exit 1
+grep 'echo ' stdout && Exit 1
+
+$MAKE clean
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'GEN.*foo' stdout && Exit 1
+grep 'cp ' stdout
+grep 'echo ' stdout
+
+: