From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conuserg-09.nifty.com ([210.131.2.76]:19689 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727899AbgEXPnX (ORCPT ); Sun, 24 May 2020 11:43:23 -0400 From: Masahiro Yamada Subject: [PATCH v2 12/29] modpost: move external module options Date: Mon, 25 May 2020 00:42:18 +0900 Message-Id: <20200524154235.380482-13-masahiroy@kernel.org> In-Reply-To: <20200524154235.380482-1-masahiroy@kernel.org> References: <20200524154235.380482-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Separate out the external-only code for readability. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/Makefile.modpost | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index bc5561aedb24..8321068abb31 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -44,14 +44,11 @@ include include/config/auto.conf include scripts/Kbuild.include kernelsymfile := $(objtree)/Module.symvers -modulesymfile := $(KBUILD_EXTMOD)/Module.symvers MODPOST = scripts/mod/modpost \ $(if $(CONFIG_MODVERSIONS),-m) \ $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \ - $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \ - $(if $(KBUILD_EXTMOD),$(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS))) \ - $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ + $(if $(KBUILD_EXTMOD),,-o $(kernelsymfile)) \ $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ $(if $(KBUILD_MODPOST_WARN),-w) @@ -81,6 +78,13 @@ src := $(obj) # Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS include $(if $(wildcard $(KBUILD_EXTMOD)/Kbuild), \ $(KBUILD_EXTMOD)/Kbuild, $(KBUILD_EXTMOD)/Makefile) + +# modpost options for external modules +MODPOST += \ + -i Module.symvers \ + $(addprefix -e ,$(KBUILD_EXTRA_SYMBOLS)) \ + -o $(KBUILD_EXTMOD)/Module.symvers + endif # find all modules listed in modules.order -- 2.25.1