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>
This commit is contained in:
parent
7cfa2fcbac
commit
9eef99f7a3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue