[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PATCH] Makefile: suppress command echoing in silent mode
From: |
Jerome Forissier |
Subject: |
[Qemu-trivial] [PATCH] Makefile: suppress command echoing in silent mode (make -s) |
Date: |
Wed, 2 Sep 2015 11:14:26 +0200 |
Signed-off-by: Jerome Forissier <address@hidden>
---
rules.mak | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/rules.mak b/rules.mak
index 4551b9e..a44ba29 100644
--- a/rules.mak
+++ b/rules.mak
@@ -125,7 +125,18 @@ modules:
%.a:
$(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR
$(TARGET_DIR)$@")
-quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
+# Suppress command echoing in silent mode (make -s)
+ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4
+ifneq ($(filter %s ,$(firstword x$(MAKEFLAGS))),)
+SILENT := 1
+endif
+else # make-3.8x
+ifneq ($(findstring s, $(MAKEFLAGS)),)
+SILENT := 1
+endif
+endif
+
+quiet-command = $(if $(V),$1,$(if $(2),$(if $(SILENT),@$1,@echo $2 && $1),@$1))
# cc-option
# Usage: CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
--
2.1.4
- [Qemu-trivial] [PATCH] Makefile: suppress command echoing in silent mode (make -s),
Jerome Forissier <=