[PATCH 2/3] configure: Allow configure-time enabling of silent build
Jeff Smith
whydoubt at gmail.com
Sun Sep 15 14:42:33 CDT 2019
Add the configure option --enable-silent-rules, which turns on silent
build output for subsequent make, except when over-ridden with make V=1.
Signed-off-by: Jeff Smith <whydoubt at gmail.com>
---
Makefile.in | 1 +
configure | 14 ++++++++++++++
configure.ac | 6 ++++++
tools/makedep.c | 7 ++++++-
4 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 193ecc59a4..5b453a8858 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -71,6 +71,7 @@ SUBDIRS = @SUBDIRS@
RUNTESTFLAGS = -q -P wine
MAKEDEP = $(TOOLSDIR)/tools/makedep$(TOOLSEXT)
PACKAGE_VERSION = @PACKAGE_VERSION@
+DEFAULT_V = @DEFAULT_V@
SED_CMD = LC_ALL=C sed -e 's, at bindir\@,${bindir},g' -e 's, at dlldir\@,${dlldir},g' -e 's, at srcdir\@,${srcdir},g' -e 's, at PACKAGE_STRING\@, at PACKAGE_STRING@,g' -e 's, at PACKAGE_VERSION\@, at PACKAGE_VERSION@,g'
LDRPATH_INSTALL = @LDRPATH_INSTALL@
LDRPATH_LOCAL = @LDRPATH_LOCAL@
diff --git a/configure b/configure
index 83d8591c1d..5b6b1c892b 100755
--- a/configure
+++ b/configure
@@ -770,6 +770,7 @@ AR
BISON
FLEX
TOOLSDIR
+DEFAULT_V
TARGETFLAGS
LD
CPPBIN
@@ -838,6 +839,7 @@ enable_win16
enable_win64
enable_tests
enable_maintainer_mode
+enable_silent_rules
with_alsa
with_capi
with_cms
@@ -2522,6 +2524,7 @@ Optional Features:
--disable-tests do not build the regression tests
--enable-maintainer-mode
enable maintainer-specific build rules
+ --enable-silent-rules quiet build output (override: 'make V=1')
--disable-largefile omit support for large files
Optional Packages:
@@ -3846,6 +3849,11 @@ if test "${enable_maintainer_mode+set}" = set; then :
enableval=$enable_maintainer_mode;
fi
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
# Check whether --with-alsa was given.
@@ -5772,6 +5780,12 @@ then
test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib64"
fi
+if test "x$enable_silent_rules" = "xyes"
+then
+ DEFAULT_V=0
+
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the directory containing the Wine tools" >&5
$as_echo_n "checking for the directory containing the Wine tools... " >&6; }
if ${wine_cv_toolsdir+:} false; then :
diff --git a/configure.ac b/configure.ac
index b39b6b2c90..58e50e2d70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,7 @@ AC_ARG_ENABLE(win16, AS_HELP_STRING([--disable-win16],[do not include Win16 supp
AC_ARG_ENABLE(win64, AS_HELP_STRING([--enable-win64],[build a Win64 emulator on AMD64 (won't run Win32 binaries)]))
AC_ARG_ENABLE(tests, AS_HELP_STRING([--disable-tests],[do not build the regression tests]))
AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode],[enable maintainer-specific build rules]))
+AC_ARG_ENABLE(silent-rules, AS_HELP_STRING([--enable-silent-rules],[quiet build output (override: 'make V=1')]))
AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa sound support]))
AC_ARG_WITH(capi, AS_HELP_STRING([--without-capi],[do not use CAPI (ISDN support)]))
@@ -235,6 +236,11 @@ then
test "x$libdir" != "x\${exec_prefix}/lib" || libdir="\${exec_prefix}/lib64"
fi
+if test "x$enable_silent_rules" = "xyes"
+then
+ AC_SUBST(DEFAULT_V,0)
+fi
+
AC_CACHE_CHECK([for the directory containing the Wine tools], wine_cv_toolsdir,
[wine_cv_toolsdir="$with_wine_tools"
if test -z "$with_wine_tools"; then
diff --git a/tools/makedep.c b/tools/makedep.c
index 4bdef79a78..a042470345 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -3773,7 +3773,12 @@ static void output_sources( struct makefile *make )
strarray_add( &make->phony_targets, "all" );
- output("ifeq ($(V),0)\n");
+ output("ifdef V\n");
+ output(" verbose = $(V)\n");
+ output("else\n");
+ output(" verbose = $(DEFAULT_V)\n");
+ output("endif\n");
+ output("ifeq ($(verbose),0)\n");
output(" QUIET = @\n");
output(" QUIET_AR = @echo ' ' AR $@;\n");
output(" QUIET_BISON = @echo ' ' BISON $@;\n");
--
2.21.0
More information about the wine-devel
mailing list