History

kbuild: reuse suffix-search to refactor multi_depend

The complicated part of multi_depend is the same as suffix-search. Reuse it.

Masahiro Yamada committed 4 years ago

Commit 9eef99f1 parent 7cfa2fc1 file · +1 −1Browse files

Unified · Split

scripts/Makefile.lib+1−1
@@ -238,7 +238,7 @@ endif · 237 unmodified lines
238define multi_depend238define multi_depend
239$(foreach m, $(notdir $1), \239$(foreach m, $(notdir $1), \
240 $(eval $(obj)/$m: \240 $(eval $(obj)/$m: \
241 $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s)))))))241 $(addprefix $(obj)/, $(call suffix-search, $m, $2, $3))))
242endef242endef
243 243
244# Copy a file244# Copy a file