summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2022-05-13 11:41:32 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2022-05-13 11:41:32 +0200
commita637a4e50bac0bfd9ae809220d8841dd9c344f2a (patch)
tree8b8f740e023cab42543dfefc6d9801c8fe42b961
parentc399332d50f221d295e41eed10300211e8575b3c (diff)
downloadptxdist-a637a4e50bac0bfd9ae809220d8841dd9c344f2a.tar.gz
ptxdist-a637a4e50bac0bfd9ae809220d8841dd9c344f2a.tar.xz
template-src-linux-driver: generate compile_commands.json at build-time
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/templates/template-src-linux-driver-make8
1 files changed, 8 insertions, 0 deletions
diff --git a/rules/templates/template-src-linux-driver-make b/rules/templates/template-src-linux-driver-make
index 144f14d8e..480fe9e97 100644
--- a/rules/templates/template-src-linux-driver-make
+++ b/rules/templates/template-src-linux-driver-make
@@ -43,6 +43,14 @@ endif
M=$(@PACKAGE@_DIR) \
modules
+$(STATEDIR)/@package@.compile:
+ @$(call targetinfo)
+ @$(call world/compile, @PACKAGE@)
+ @$(call world/execute, @PACKAGE@, \
+ $(KERNEL_DIR)/scripts/clang-tools/gen_compile_commands.py)
+ @$(call world/compile-commands, @PACKAGE@)
+ @$(call touch)
+
# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------