From 49efdd8a8eaed593beeb8686e40d343f38e82a62 Mon Sep 17 00:00:00 2001 From: Caveh Jalali Date: Thu, 12 Sep 2019 22:20:37 -0700 Subject: Makefile.rules: use patsubst instead of subst the patsubst function is a better function for removing a path prefix as it is anchored at the beginning of the search space. the original "subst" function can match everywhere in the path which leads to weird transformations. patsubst is anchored at the beginning of the string which better suits the intent here. BRANCH=none BUG=none TEST=make buildall passes, $(out) now only removed at beginning of output paths. Change-Id: Ic5fe7aeb5eb8c87aa8bb49ea0865dc07327cb3e5 Signed-off-by: Caveh Jalali Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1803178 Commit-Queue: Caveh Jalali Reviewed-by: Caveh Jalali Reviewed-by: Daisuke Nojiri --- Makefile.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile.rules') diff --git a/Makefile.rules b/Makefile.rules index 4f5b54ad0b..dbe6ee5161 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -43,7 +43,7 @@ else echo = echo $(1); ifeq ($(V),) Q := @ -quiet = @echo ' $(2)' $(subst $(out)/,,$@) ; $(cmd_$(1)) +quiet = @echo ' $(2)' $(patsubst $(out)/%,%,$@) ; $(cmd_$(1)) silent = 1>/dev/null silent_err = 2>/dev/null else -- cgit v1.2.1