kbuild: generate modules.order only when CONFIG_MODULES=y
Do not generate pointless modules.order when the module support is
disabled.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 0a9d849..b803233 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -63,7 +63,9 @@
builtin-target := $(obj)/built-in.a
endif
+ifdef CONFIG_MODULES
modorder-target := $(obj)/modules.order
+endif
# We keep a list of all modules in $(MODVERDIR)