Commit 9eef99f7 authored by Masahiro Yamada's avatar Masahiro Yamada

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: default avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
parent 7cfa2fcb
...@@ -238,7 +238,7 @@ endif ...@@ -238,7 +238,7 @@ endif
define multi_depend define multi_depend
$(foreach m, $(notdir $1), \ $(foreach m, $(notdir $1), \
$(eval $(obj)/$m: \ $(eval $(obj)/$m: \
$(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s))))))) $(addprefix $(obj)/, $(call suffix-search, $m, $2, $3))))
endef endef
# Copy a file # Copy a file
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment