Skip to content

Commit d445283

Browse files
committed
kbuild: refactor modname-multi by using suffix-search
Improve the readability slightly. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent bcf0c66 commit d445283

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/Makefile.lib

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
109109
# Finds the multi-part object the current object will be linked into.
110110
# If the object belongs to two or more multi-part objects, list them all.
111111
modname-multi = $(sort $(foreach m,$(multi-obj-ym),\
112-
$(if $(filter $*.o, $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$(m:.o=))))
112+
$(if $(filter $*.o, $(call suffix-search, $m, .o, -objs -y -m)),$(m:.o=))))
113113

114114
__modname = $(if $(modname-multi),$(modname-multi),$(basetarget))
115115

0 commit comments

Comments
 (0)