From d4452837ffbeb59e18f2499ef907579a618d623d Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 3 May 2021 03:09:57 +0900 Subject: kbuild: refactor modname-multi by using suffix-search Improve the readability slightly. Signed-off-by: Masahiro Yamada --- scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index deac60727e48..10950559b223 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -109,7 +109,7 @@ subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) # Finds the multi-part object the current object will be linked into. # If the object belongs to two or more multi-part objects, list them all. modname-multi = $(sort $(foreach m,$(multi-obj-ym),\ - $(if $(filter $*.o, $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$(m:.o=)))) + $(if $(filter $*.o, $(call suffix-search, $m, .o, -objs -y -m)),$(m:.o=)))) __modname = $(if $(modname-multi),$(modname-multi),$(basetarget)) -- cgit v1.2.3