@@ -101,6 +101,8 @@ ifndef VERBOSE
VERBOSE = 0
endif
+SILENT := $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),1)
+
SWIG_DEFINED := $(shell if command -v swig; then echo 1; else echo 0; fi)
ifeq ($(SWIG_DEFINED), 0)
BUILD_PYTHON := report_noswig
@@ -188,7 +190,7 @@ export LIBTRACEEVENT_DIR LIBTRACECMD_DIR
export LIBTRACECMD_STATIC LIBTRACECMD_SHARED
export LIBTRACEEVENT_STATIC LIBTRACEEVENT_SHARED
-export Q VERBOSE EXT
+export Q SILENT VERBOSE EXT
# Include the utils
include scripts/utils.mk
@@ -15,6 +15,13 @@ endif
ifeq ($(VERBOSE),1)
Q =
S =
+else
+ Q = @
+ S = -s
+endif
+
+# Use empty print_* macros if either SILENT or VERBOSE.
+ifeq ($(findstring 1,$(SILENT)$(VERBOSE)),1)
print_compile =
print_app_build =
print_fpic_compile =
@@ -24,8 +31,6 @@ ifeq ($(VERBOSE),1)
print_install =
print_update =
else
- Q = @
- S = -s
print_compile = echo ' $(GUI)COMPILE '$(GOBJ);
print_app_build = echo ' $(GUI)BUILD '$(GOBJ);
print_fpic_compile = echo ' $(GUI)COMPILE FPIC '$(GOBJ);
Keep make -s,--silent from printing any progress messages. Only show warnings and errors. By default (without -s), there's no change. Signed-off-by: Greg Thelen <gthelen@google.com> --- Makefile | 4 +++- scripts/utils.mk | 9 +++++++-- 2 files changed, 10 insertions(+), 3 deletions(-)