diff options
author | Caveh Jalali <caveh@chromium.org> | 2021-04-02 19:03:15 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-14 04:09:22 +0000 |
commit | 372640be96881bb17ed74dcac05399c5cde4637d (patch) | |
tree | e988ca44b8ad6a55a804f5e39662805b179bfbdd /Makefile.rules | |
parent | 860785ae57ded46a3adb81ec608df4b470fecb18 (diff) | |
download | chrome-ec-372640be96881bb17ed74dcac05399c5cde4637d.tar.gz |
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_<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 <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803973
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 5 |
1 files changed, 4 insertions, 1 deletions
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 |