lkml.org 
[lkml]   [2021]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] kbuild: refactor modname-multi by using suffix-search
Date
Improve the readability slightly.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

scripts/Makefile.lib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 0da58af8d192..865a5d4bdf1a 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))

--
2.27.0
\
 
 \ /
  Last update: 2021-05-02 20:11    [W:0.151 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site