summaryrefslogtreecommitdiffstats
path: root/build_keyboard.mk
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2022-02-04 07:36:02 +1100
committerGitHub <noreply@github.com>2022-02-04 07:36:02 +1100
commitdb43e450771f4eefe27821a88cc86df46c1006c1 (patch)
treebca051808d9aaacd969ea7bc94ac7ffaae1c0d99 /build_keyboard.mk
parent57a78b68de4e8202655ab33f549f7b0349fbdf78 (diff)
Ensure `version.h` is recreated each build. (#16188)
Diffstat (limited to 'build_keyboard.mk')
-rw-r--r--build_keyboard.mk11
1 files changed, 5 insertions, 6 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk
index a5e20853b3..80c295d9be 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -45,6 +45,9 @@ ifdef SKIP_GIT
VERSION_H_FLAGS := --skip-git
endif
+# Generate the board's version.h file.
+$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o $(KEYMAP_OUTPUT)/src/version.h)
+
# Determine which subfolders exist.
KEYBOARD_FOLDER_PATH_1 := $(KEYBOARD)
KEYBOARD_FOLDER_PATH_2 := $(patsubst %/,%,$(dir $(KEYBOARD_FOLDER_PATH_1)))
@@ -165,13 +168,8 @@ generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c
endif
-generated-files: $(KEYMAP_OUTPUT)/src/version.h
-$(KEYMAP_OUTPUT)/src/version.h:
- [ -d $(KEYMAP_OUTPUT)/src ] || mkdir -p $(KEYMAP_OUTPUT)/src
- $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o $(KEYMAP_OUTPUT)/src/version.h
-
ifeq ($(strip $(CTPC)), yes)
- CONVERT_TO_PROTON_C=yes
+ CONVERT_TO_PROTON_C=yes
endif
ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
@@ -397,6 +395,7 @@ VPATH += $(KEYMAP_PATH)
VPATH += $(USER_PATH)
VPATH += $(KEYBOARD_PATHS)
VPATH += $(COMMON_VPATH)
+VPATH += $(KEYBOARD_OUTPUT)/src
VPATH += $(KEYMAP_OUTPUT)/src
include common_features.mk