summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-01-11 12:50:36 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-01-13 15:22:30 -0800
commit9fd2736d90c598b335d689d8db5ad727194a1991 (patch)
tree8639dc83580f5380f4ac61bc0d423685afe7cc9e
parent70ea50153fa8c47e5eb8175108d9c45668dad2ce (diff)
downloadchrome-ec-9fd2736d90c598b335d689d8db5ad727194a1991.tar.gz
Makefile: Suppress unwanted tpm output
Use the 'echo' command to suppress unwanted build output when V=0. Signed-off-by: Simon Glass <sjg@chromium.org> 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 <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/427365 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--test/tpm_test/Makefile20
1 files 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)