[16/37] modpost: refactor -i option calculation
diff mbox series

Message ID 20200601055731.3006266-16-masahiroy@kernel.org
State New
Headers show
Series
  • [01/37] kbuild: refactor subdir-ym calculation
Related show

Commit Message

Masahiro Yamada June 1, 2020, 5:57 a.m. UTC
Prepare to use -i for in-tree modpost as well.

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

 scripts/Makefile.modpost | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 8d000987b201..6808086075b6 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -43,13 +43,9 @@  __modpost:
 include include/config/auto.conf
 include scripts/Kbuild.include
 
-kernelsymfile := $(objtree)/Module.symvers
-
 MODPOST = scripts/mod/modpost								\
 	$(if $(CONFIG_MODVERSIONS),-m)							\
 	$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a)					\
-	$(if $(KBUILD_EXTMOD),-i $(kernelsymfile))					\
-	$(if $(KBUILD_EXTMOD),$(addprefix -i ,$(KBUILD_EXTRA_SYMBOLS)))			\
 	$(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E)					\
 	$(if $(KBUILD_MODPOST_WARN),-w) \
 	-o $@
@@ -86,12 +82,14 @@  include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \
 # modpost option for external modules
 MODPOST += -e
 
+input-symdump := Module.symvers $(KBUILD_EXTRA_SYMBOLS)
 output-symdump := $(KBUILD_EXTMOD)/Module.symvers
 
 endif
 
 # modpost options for modules (both in-kernel and external)
 MODPOST += \
+	$(addprefix -i ,$(input-symdump)) \
 	$(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N)
 
 ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),)