]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
scripts/gdb: delay generation of gdb constants.py
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 19 Feb 2019 09:33:02 +0000 (18:33 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 27 Feb 2019 12:39:48 +0000 (21:39 +0900)
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>
Kbuild
Makefile

diff --git a/Kbuild b/Kbuild
index 65db5bef2e3617eb080569c1061e72a8750a7394..4cebcc7b09b7563e063a95e2ca0baa9781161aa0 100644 (file)
--- a/Kbuild
+++ b/Kbuild
@@ -6,7 +6,6 @@
 # 2) Generate timeconst.h
 # 3) Generate asm-offsets.h (may need bounds.h and timeconst.h)
 # 4) Check for missing system calls
-# 5) Generate constants.py (may need bounds.h)
 
 #####
 # 1) Generate bounds.h
@@ -58,14 +57,5 @@ quiet_cmd_syscalls = CALL    $<
 missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE
        $(call cmd,syscalls)
 
-#####
-# 5) Generate constants for Python GDB integration
-#
-
-extra-$(CONFIG_GDB_SCRIPTS) += build_constants_py
-
-build_constants_py: $(timeconst-file) $(bounds-file)
-       @$(MAKE) $(build)=scripts/gdb/linux $@
-
 # Keep these three files during make clean
 no-clean-files := $(bounds-file) $(offsets-file) $(timeconst-file)
index 8d502752944bcf01590acd8508b59c552b829a0b..15a9987a200def17b5060e14a8da98684d56443b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1519,6 +1519,17 @@ PHONY += $(DOC_TARGETS)
 $(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
 
 ###