summaryrefslogtreecommitdiff
path: root/m4/silent.m4
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2009-04-13 23:17:39 +0200
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2009-04-13 23:17:39 +0200
commit2c74a34058ecf5f0c07c3f0908a13613d465f956 (patch)
tree8c949db72ceb2b286928b8999e1213e5c1c61c85 /m4/silent.m4
parent2e959a815c6f144441a59761a2b4dc51d28ec776 (diff)
downloadautomake-2c74a34058ecf5f0c07c3f0908a13613d465f956.tar.gz
silent-rules reorganization, --enable-silent-rules switch.
This patch introduces a configure-time option to set the default verbosity. Since configure now needs to know whether the `silent-rules' automake option was set, the latter can only be set within AM_INIT_AUTOMAKE, or with a new AM_SILENT_RULES macro but not any more through AUTOMAKE_OPTIONS or the automake command line option `--silent-rules'. * automake.in (define_verbose_var): Define the default verbose variable in terms of `$(AM_DEFAULT_VERBOSITY)'. (handle_configure): Do not pass `--silent-rules' to automake. (scan_autoconf_traces): Trace `AM_SILENT_RULES'. If seen, enable global `silent-rules' option. (usage): Do not document `--silent-rules'. (parse_arguments): Do not accept `--silent-rules'. * doc/automake.texi (Options): Overhaul. Document AM_SILENT_RULES, --enable-silent-rules, --disable-silent-rules, AM_DEFAULT_VERBOSITY. Show an example for user-added variables for less verbose output. (Invoking Automake): Remove documentation for `--silent-rules'. (Public Macros): Document `AM_SILENT_RULES'. * NEWS: Update. * lib/Automake/Options.pm (_process_option_list): Accept `silent-rules' only as option in configure.ac. * m4/init.m4 (AM_INIT_AUTOMAKE): If the `silent-rules' option was enabled, require `AM_SILENT_RULES'; move AM_BACKSLASH initialization to ... * m4/silent.m4 (AM_SILENT_RULES): ... this new file, new macro. Deal with `--enable-silent-rules' switch; define AM_DEFAULT_VERBOSITY. * m4/Makefile.am (dist_m4data_DATA): Add silent.m4. * tests/dollarvar.test: Remove tests for `--silent-rules', use `AM_SILENT_RULES'. * tests/flavor.test: Remove test for `--silent-rules'. * tests/silent.test: Use `AM_SILENT_RULES' instead of `AUTOMAKE_OPTIONS = silent-rules'; use `--enable-silent-rules'. * tests/silent2.test: Likewise. * tests/silent3.test: Likewise. * tests/silent4.test: Likewise. * tests/silent5.test: Likewise. * tests/silent6.test: Likewise. Test `AM_SILENT_RULES' as well as `AM_INIT_AUTOMAKE([silent-rules])' instead of `--silent-rules'. * tests/silent7.test: Use `AM_SILENT_RULES' instead of `AUTOMAKE_OPTIONS = silent-rules'; ensure the latter is rejected. Test combinations of --enable-silent-rules and --disable-silent-rules with `make V=0' and `make V=1'. Suggestion for configure-time switch by Bob Friesenhahn. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Diffstat (limited to 'm4/silent.m4')
-rw-r--r--m4/silent.m427
1 files changed, 27 insertions, 0 deletions
diff --git a/m4/silent.m4 b/m4/silent.m4
new file mode 100644
index 000000000..6d2a1a276
--- /dev/null
+++ b/m4/silent.m4
@@ -0,0 +1,27 @@
+## -*- Autoconf -*-
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])