summaryrefslogtreecommitdiff
path: root/builddefs
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-05-15 21:58:12 +1000
committerGitHub <noreply@github.com>2023-05-15 21:58:12 +1000
commit507e32b28c5067fb01cb85c3259a50bec7ec1907 (patch)
tree86f5d8221c436268b42fa8491dff04b7f4e109ad /builddefs
parentd6f8df4be873bb9b876e4ec2bb41030c95f58155 (diff)
Generate `make` dependency file during build for info.json's etc. (#20451)
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/build_keyboard.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk
index 5fd61a96ce..53b3ef4a11 100644
--- a/builddefs/build_keyboard.mk
+++ b/builddefs/build_keyboard.mk
@@ -343,6 +343,15 @@ $(KEYBOARD_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES)
generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/default_keyboard.c $(KEYBOARD_OUTPUT)/src/default_keyboard.h
+generated-files: $(KEYMAP_OUTPUT)/src/info_deps.d
+
+$(KEYMAP_OUTPUT)/src/info_deps.d:
+ @$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
+ $(eval CMD=$(QMK_BIN) generate-make-dependencies -kb $(KEYBOARD) -km $(KEYMAP) -o $(KEYMAP_OUTPUT)/src/info_deps.d)
+ @$(BUILD_CMD)
+
+-include $(KEYMAP_OUTPUT)/src/info_deps.d
+
.INTERMEDIATE : generated-files
# Userspace setup and definitions