History

kbuild: refactor modname-multi by using suffix-search

Improve the readability slightly.

Masahiro Yamada committed 5 years ago

Commit d4452831 parent bcf0c661 file · +1 −1Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/Makefile.lib+1−1
@@ -109,7 +109,7 @@ subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) · 108 unmodified lines
109# Finds the multi-part object the current object will be linked into.109# Finds the multi-part object the current object will be linked into.
110# If the object belongs to two or more multi-part objects, list them all.110# If the object belongs to two or more multi-part objects, list them all.
111modname-multi = $(sort $(foreach m,$(multi-obj-ym),\111modname-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=))))
113 113
114__modname = $(if $(modname-multi),$(modname-multi),$(basetarget))114__modname = $(if $(modname-multi),$(modname-multi),$(basetarget))
115 115