diff options
author | Joel Challis <[email protected]> | 2021-08-18 21:52:41 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-08-18 21:52:41 +0100 |
commit | 2e734fb6b9e3480854b794218d381559aab431b7 (patch) | |
tree | 2bec5639b3dd200c640cd8c76b8c2b614f67e34b /build_json.mk | |
parent | 10fab4ec077354f41d19f01798a49e5864a189cd (diff) | |
download | qmk_firmware-2e734fb6b9e3480854b794218d381559aab431b7.tar.gz qmk_firmware-2e734fb6b9e3480854b794218d381559aab431b7.zip |
Add config.h and rules.mk support for data driven keymaps (#12859)
* Add config.h and rules.mk support for data driven keymaps
* tidy up after rebase
* Rename key as it can contain more than just keyboard overrides
* tidy up after rebase
* Add validation
Diffstat (limited to 'build_json.mk')
-rw-r--r-- | build_json.mk | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/build_json.mk b/build_json.mk index 28659f2603..0c034eb2ae 100644 --- a/build_json.mk +++ b/build_json.mk @@ -1,31 +1,17 @@ # Look for a json keymap file ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","") - KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5) else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","") - KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4) else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","") - KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3) else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","") - KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2) else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","") - KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) endif - -# Load the keymap-level rules.mk if exists -ifneq ("$(wildcard $(KEYMAP_PATH))", "") - -include $(KEYMAP_PATH)/rules.mk -endif - -# Generate the keymap.c -$(KEYMAP_C): $(KEYMAP_JSON) - $(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON) |