All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] Makefile: suppress command echoing in silent mode (make -s)
@ 2015-09-02  9:14 Jerome Forissier
  2015-09-11  7:15   ` [Qemu-devel] " Michael Tokarev
  0 siblings, 1 reply; 5+ messages in thread
From: Jerome Forissier @ 2015-09-02  9:14 UTC (permalink / raw)
  To: qemu-trivial; +Cc: Jerome Forissier

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
---
 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



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-11  7:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-02  9:14 [Qemu-trivial] [PATCH] Makefile: suppress command echoing in silent mode (make -s) Jerome Forissier
2015-09-11  7:15 ` Michael Tokarev
2015-09-11  7:15   ` [Qemu-devel] " Michael Tokarev
2015-09-11  7:38   ` [Qemu-trivial] " Jérôme Forissier
2015-09-11  7:38     ` [Qemu-devel] " Jérôme Forissier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.