From 372640be96881bb17ed74dcac05399c5cde4637d Mon Sep 17 00:00:00 2001 From: Caveh Jalali Date: Fri, 2 Apr 2021 19:03:15 -0700 Subject: Makefile.rules: add quiet_cmd... This enhances the quiet function to optionally print a command specific terse representation of the make command being invoked. If no custom command string is specified, the original behavior is preserved: the terse command string is printed followed by the computed target name. Now, if quiet_cmd_ has a non-empty value, its value is printed instead. BRANCH=none BUG=b:181253613 TEST=buildall passes Change-Id: I8ff13678307a3fe4f2ecd1a4cf89ed550e5702bb Signed-off-by: Caveh Jalali Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803973 Reviewed-by: Jack Rosenthal --- Makefile.rules | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile.rules') diff --git a/Makefile.rules b/Makefile.rules index bcddfbbd66..e7d8b5d5a0 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -39,7 +39,10 @@ else ifeq ($(V),) # V= Q := @ echo = echo $(1); -quiet = @echo ' $(2)' $(patsubst $(out)/%,%,$@) ; $(cmd_$(1)) +echo-cmd = $(if $(quiet_cmd_$(1)), \ + $(quiet_cmd_$(1)), \ + $(2) $(patsubst $(out)/%,%,$@)) +quiet = @echo ' $(echo-cmd)' ; $(cmd_$(1)) silent = 1>/dev/null silent_err = 2>/dev/null MAKEFLAGS += --no-print-directory -- cgit v1.2.1