diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2017-02-09 11:20:12 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2017-02-09 11:28:20 +0100 |
commit | b78eb052d569dd25d4963124bf800429b695616c (patch) | |
tree | fb9ba4d85484cd09f82b6f429ba82624b65a42ff /Cmds | |
parent | cea206c94f02e69c3148c6b2267370c36e530852 (diff) |
build: Don't show echo commands in verbose mode
When building with 'make Q=' the echo commands used for the quiet mode
are still output, making it hard to read for humans.
Instead, disable the echo command completely if the $(Q) build variable
is not set.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'Cmds')
-rw-r--r-- | Cmds | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -5,9 +5,14 @@ Q = @ SHELL := $(shell if [ -x /bin/bash ]; then echo /bin/bash; else echo /bin/sh; fi) # Compiler related stuff -LDQ = $(Q)echo -e " LD\t$@" && $(CCACHE) $(CC) CCNQ = $(CCACHE) $(CC) -CCQ = $(Q)echo -e " CC\t$<" && $(CCNQ) +ifeq ($(Q),) + LDQ = $(CCACHE) $(CC) + CCQ = $(CCNQ) +else + LDQ = $(Q)echo -e " LD\t$@" && $(CCACHE) $(CC) + CCQ = $(Q)echo -e " CC\t$<" && $(CCNQ) +endif # sparse related C = @@ -18,8 +23,15 @@ else endif # Flex/bison related -LEX = $(Q)echo -e " LEX\t$<" && flex -YACC = $(Q)echo -e " YACC\t$<" && bison +LEX = flex +YACC = bison +ifeq ($(Q),) + LEXQ = $(LEX) + YACCQ = $(YACC) +else + LEXQ = $(Q)echo -e " LEX\t$<" && $(LEX) + YACCQ = $(Q)echo -e " YAAC\t$<" && $(YACC) +endif # Installation related INST = echo -e " INST\t$(1)" && install -d $(2) && \ |