From: Masahiro Yamada Date: Sun, 2 May 2021 18:09:57 +0000 (+0900) Subject: kbuild: refactor modname-multi by using suffix-search X-Git-Tag: v5.15~1154^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4452837ffbeb59e18f2499ef907579a618d623d;p=platform%2Fkernel%2Flinux-starfive.git kbuild: refactor modname-multi by using suffix-search Improve the readability slightly. Signed-off-by: Masahiro Yamada --- 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))