summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-04-07 00:30:17 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2022-05-08 03:16:58 +0900
commit9eef99f7a335e4ffc6dfe65fc29c7d38dafae915 (patch)
treeff3a061dfbbf669ba21da27a99f5cca35cee3170 /scripts/Makefile.lib
parent7cfa2fcbac167ca0ceadf25a4b600391fd01fb29 (diff)
kbuild: reuse suffix-search to refactor multi_depend
The complicated part of multi_depend is the same as suffix-search. Reuse it. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 9f69ecdd7977..d56cda3c1e8a 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -238,7 +238,7 @@ endif
define multi_depend
$(foreach m, $(notdir $1), \
$(eval $(obj)/$m: \
- $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s)))))))
+ $(addprefix $(obj)/, $(call suffix-search, $m, $2, $3))))
endef
# Copy a file