Patchwork [v2,2/4] Makefile: support -s switch

login
register
mail settings
Submitter Andre Przywara
Date Feb. 1, 2019, 12:37 p.m.
Message ID <20190201123716.92901-3-andre.przywara@arm.com>
Download mbox | patch
Permalink /patch/715745/
State New
Headers show

Comments

Andre Przywara - Feb. 1, 2019, 12:37 p.m.
"make -s" suppresses normal output, just shows warnings and errors.
But since we explicitly override the make output with our fancy concise
version, we miss out on this feature.

Do as the kernel does and explicitly suppress every normal output when -s
is given. This helps to spot warnings that scroll out of the terminal
window too quickly.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/Makefile b/Makefile
index c4faff66..ec75cd99 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,11 @@ 
 #
 
 ifeq ($(strip $(V)),)
-	E = @echo
+	ifeq ($(findstring s,$(filter-out --%,$(MAKEFLAGS))),)
+		E = @echo
+	else
+		E = @\#
+	endif
 	Q = @
 else
 	E = @\#