summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-04-06 18:30:17 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2022-05-07 21:16:58 +0300
commit9eef99f7a335e4ffc6dfe65fc29c7d38dafae915 (patch)
treeff3a061dfbbf669ba21da27a99f5cca35cee3170 /scripts/Makefile.lib
parent7cfa2fcbac167ca0ceadf25a4b600391fd01fb29 (diff)
downloadlinux-9eef99f7a335e4ffc6dfe65fc29c7d38dafae915.tar.xz
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