projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7cfa2fc
)
kbuild: reuse suffix-search to refactor multi_depend
author
Masahiro Yamada
<masahiroy@kernel.org>
Wed, 6 Apr 2022 15:30:17 +0000
(
00:30
+0900)
committer
Masahiro Yamada
<masahiroy@kernel.org>
Sat, 7 May 2022 18:16:58 +0000
(
03:16
+0900)
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>
scripts/Makefile.lib
patch
|
blob
|
history
diff --git
a/scripts/Makefile.lib
b/scripts/Makefile.lib
index 9f69ecdd7977a3ae1f8649758b74ad3559694e78..d56cda3c1e8a592e5d30c00cd397f64832a57b0d 100644
(file)
--- 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