modpost: move -d option in scripts/Makefile.modpost
authorMasahiro Yamada <masahiroy@kernel.org>
Mon, 1 Jun 2020 05:57:23 +0000 (14:57 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 6 Jun 2020 14:38:13 +0000 (23:38 +0900)
Collect options for modules into a single place.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/Makefile.modpost

index 4938a6f..3651cbf 100644 (file)
@@ -62,9 +62,6 @@ __modpost: vmlinux.symvers
 
 else
 
-MODPOST += \
-       $(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS))
-
 ifeq ($(KBUILD_EXTMOD),)
 
 input-symdump := vmlinux.symvers
@@ -91,6 +88,7 @@ endif
 # modpost options for modules (both in-kernel and external)
 MODPOST += \
        $(addprefix -i ,$(wildcard $(input-symdump))) \
+       $(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS)) \
        $(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N)
 
 # 'make -i -k' ignores compile errors, and builds as many modules as possible.