kbuild: reuse real-search to simplify cmd_mod

The first command in cmd_mod is similar to the real-search macro.
Reuse it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
This commit is contained in:
Masahiro Yamada 2022-04-07 00:30:19 +09:00
parent f97cf39991
commit b3591e0619

View File

@ -306,7 +306,7 @@ $(obj)/%.prelink.o: $(obj)/%.o FORCE
endif
cmd_mod = { \
echo $(if $($*-objs)$($*-y)$($*-m), $(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)), $(@:.mod=.o)); \
echo $(addprefix $(obj)/, $(call real-search, $*.o, .o, -objs -y -m)); \
$(undefined_syms) echo; \
} > $@