summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-01-11 17:24:14 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-01-13 15:22:28 -0800
commit70ea50153fa8c47e5eb8175108d9c45668dad2ce (patch)
tree0edb25ce2bc9e0289c95a16bfa21531eb2344f0f
parent7d40fb380d1dd7a0720ef8f7e2f1bf052f826b4f (diff)
downloadchrome-ec-70ea50153fa8c47e5eb8175108d9c45668dad2ce.tar.gz
Makefile: Suppress unwanted 'echo' output
Add a 'echo' command which can be called to generate output. If V=0 then it is suppressed. This drops the unwanted 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 BUILD lines are gone Change-Id: Ie4474024c84345d427f4d95a9ff194dc740f860f Reviewed-on: https://chromium-review.googlesource.com/427364 Commit-Ready: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--Makefile.rules6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile.rules b/Makefile.rules
index a5e79f9f25..ec7e379616 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -33,10 +33,12 @@ _dir_y_create := $(foreach d,$(dirs-y),$(shell [ -d $(out)/$(BLD)/$(d) ] || \
# (warnings/errors only). Use echo thus: $(call echo,"stuff to echo")
ifeq ($(V),0)
Q := @
+echo = echo -n;
quiet = echo -n; $(cmd_$(1))
silent = 1>/dev/null
silent_err = 2>/dev/null
else
+echo = echo $(1);
ifeq ($(V),)
Q := @
quiet = @echo ' $(2)' $(subst $(out)/,,$@) ; $(cmd_$(1))
@@ -176,7 +178,7 @@ test-targets=$(foreach t,$(test-list-y),test-$(t))
ifeq "$(CONFIG_COMMON_RUNTIME)" "y"
$(test-targets): test-%:
@set -e ; \
- echo " BUILD $(out)/$*" ; \
+ $(call echo," BUILD $(out)/$*") \
$(MAKE) --no-print-directory BOARD=$(BOARD) PROJECT=$* \
V=$(V) out=$(out)/$* TEST_BUILD=y; \
cp $(out)/$*/$*.bin $(out)/test-$*.bin
@@ -192,7 +194,7 @@ run-test-targets=$(foreach t,$(test-list-host),run-$(t))
$(host-test-targets): host-%:
@set -e ; \
- echo " BUILD host - build/host/$*" ; \
+ $(call echo," BUILD host - build/host/$*") \
$(MAKE) --no-print-directory BOARD=host PROJECT=$* \
V=$(V) out=build/host/$* TEST_BUILD=y EMU_BUILD=y $(TEST_FLAG) \
CROSS_COMPILE= build/host/$*/$*.exe