From 9fd2736d90c598b335d689d8db5ad727194a1991 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 11 Jan 2017 12:50:36 -0700 Subject: Makefile: Suppress unwanted tpm output Use the 'echo' command to suppress unwanted build output when V=0. Signed-off-by: Simon Glass BUG=chromium:680243 BRANCH=none TEST=V=0 emerge-reef chromeos-ec; See that the tpm output is gone Change-Id: Ia742b0b5270b969ec4f51967810e616348e39dbd Signed-off-by: Simon Glass Reviewed-on: https://chromium-review.googlesource.com/427365 Reviewed-by: Randall Spangler --- test/tpm_test/Makefile | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/test/tpm_test/Makefile b/test/tpm_test/Makefile index 164b77e083..9963fcfe01 100644 --- a/test/tpm_test/Makefile +++ b/test/tpm_test/Makefile @@ -2,11 +2,19 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +# V unset for normal output, V=1 for verbose output, V=0 for silent build +# (warnings/errors only). Use echo thus: $(call echo,"stuff to echo") +ifeq ($(V),0) +Q := @ +echo = echo -n; +else +echo = echo $(1); ifeq ($(V),) Q := @ else Q := endif +endif obj = ../../build/tpm_test src = . @@ -39,31 +47,31 @@ DEPS := $(OBJS:.o=.o.d) $(BN_OBJS:.o=.o.d) $(OBJS) $(BN_OBJS): | $(obj) $(obj)/%.o: $(obj)/%.c - @echo " CC $(notdir $@)" + $(call echo," CC $(notdir $@)") $(Q)gcc $(CFLAGS) -o $@ $< $(obj)/%.o: %.c - @echo " CC $(notdir $@)" + $(call echo," CC $(notdir $@)") $(Q)gcc $(CFLAGS) -Wall -Werror -MMD -MF $@.d -o $@ $< $(obj)/_$(TARGET).so: $(OBJS) $(obj)/$(TARGET).py - @echo " LD $(notdir $@)" + $(call echo," LD $(notdir $@)") $(Q)rm -f $@ $(Q)gcc -shared $(OBJS) -lftdi1 -o $@ $(obj)/%_wrap.c: $(src)/%.i - @echo " SWIG $(notdir $@)" + $(call echo," SWIG $(notdir $@)") $(Q)swig -python -outdir $(obj) -o $@ $< clean: @rm -rf $(obj)/ $(obj): - @echo " MKDIR $(obj)" + $(call echo," MKDIR $(obj)") $(Q)mkdir -p $(obj) $(obj)/bn_test: $(BN_OBJS) - @echo " LD $(notdir $@)" + $(call echo," LD $(notdir $@)") $(Q)$(CC) -o $@ $^ -lcrypto -include $(DEPS) -- cgit v1.2.1