summaryrefslogtreecommitdiffstats
path: root/build_keyboard.mk
diff options
context:
space:
mode:
Diffstat (limited to 'build_keyboard.mk')
-rw-r--r--build_keyboard.mk17
1 files changed, 15 insertions, 2 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk
index 6473e3e473..f727760465 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -37,6 +37,17 @@ ifdef SKIP_VERSION
OPT_DEFS += -DSKIP_VERSION
endif
+# Generate the version.h file
+ifdef SKIP_VERSION
+VERSION_H_FLAGS := --skip-all
+endif
+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)))
@@ -129,7 +140,7 @@ ifeq ("$(wildcard $(KEYMAP_PATH))", "")
# If we haven't found a keymap yet fall back to community layouts
include build_layout.mk
else
- $(error Could not find keymap)
+ $(call CATASTROPHIC_ERROR,Invalid keymap,Could not find keymap)
# this state should never be reached
endif
endif
@@ -158,7 +169,7 @@ generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c
endif
ifeq ($(strip $(CTPC)), yes)
- CONVERT_TO_PROTON_C=yes
+ CONVERT_TO_PROTON_C=yes
endif
ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
@@ -384,6 +395,8 @@ VPATH += $(KEYMAP_PATH)
VPATH += $(USER_PATH)
VPATH += $(KEYBOARD_PATHS)
VPATH += $(COMMON_VPATH)
+VPATH += $(KEYBOARD_OUTPUT)/src
+VPATH += $(KEYMAP_OUTPUT)/src
include common_features.mk
include $(BUILDDEFS_PATH)/generic_features.mk