From 12b13aeab2ca45de0b59e27d7010f66c55ad2cda Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 7 Apr 2022 00:30:17 +0900 Subject: [PATCH] FROMGIT: 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 Reviewed-by: Nick Desaulniers Bug: 175420575 (cherry picked from commit db6836b669fb7c4a214e967e3985db05d85f2a24 https://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kbuild) Change-Id: I7966897a0151a08d003f53d20adaf3fb40028442 Signed-off-by: Elliot Berman --- scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 0f24f347ead5..82997185b94a 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -251,7 +251,7 @@ objtool_args = \ 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 quiet_cmd_copy = COPY $@