[PATCH 01/11] kbuild: move the Module.symvers check for external module build

From: Masahiro Yamada
Date: Sat Aug 10 2019 - 11:54:24 EST


$(objtree)/Module.symvers is not required for descending into
sub-directories. It is needed for the modpost stage.

Move the Module.symvers check to the right place.

Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
---

Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 02aff718a11d..24c9ed272b5f 100644
--- a/Makefile
+++ b/Makefile
@@ -1620,10 +1620,10 @@ $(objtree)/Module.symvers:

module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
PHONY += $(module-dirs) modules
-$(module-dirs): prepare $(objtree)/Module.symvers
+$(module-dirs): prepare
$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) need-modorder=1

-modules: $(module-dirs)
+modules: $(module-dirs) $(objtree)/Module.symvers
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost

--
2.17.1