scripts/gdb: delay generation of gdb constants.py
scripts/gdb/linux/constants.py is never used in the kernel build
process. There is no good reason to create it so early.
Get it out of the 'prepare' stage.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
diff --git a/Makefile b/Makefile
index 8d50275..15a9987 100644
--- a/Makefile
+++ b/Makefile
@@ -1519,6 +1519,17 @@
$(DOC_TARGETS): scripts_basic FORCE
$(Q)$(MAKE) $(build)=Documentation $@
+# Misc
+# ---------------------------------------------------------------------------
+
+PHONY += scripts_gdb
+scripts_gdb: prepare
+ $(Q)$(MAKE) $(build)=scripts/gdb/linux build_constants_py
+
+ifdef CONFIG_GDB_SCRIPTS
+all: scripts_gdb
+endif
+
else # KBUILD_EXTMOD
###