aboutsummaryrefslogtreecommitdiff
path: root/builddefs
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2024-11-24 20:32:30 +1100
committerGitHub <noreply@github.com>2024-11-24 20:32:30 +1100
commit7d8f193988495deb0e12ad79d5104d30c0724bf9 (patch)
treebff63d89048b699e393e8f65ec1c059f0d953d0c /builddefs
parent859dab864a0738f577d1da8e7189748ed8109c44 (diff)
Allow codegen of `keymap.json` => `keymap.c` without requiring layers/layout etc. (#23451)
Diffstat (limited to 'builddefs')
-rw-r--r--builddefs/build_keyboard.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk
index ccd7e50b05..afad67a76d 100644
--- a/builddefs/build_keyboard.mk
+++ b/builddefs/build_keyboard.mk
@@ -186,7 +186,10 @@ endif
# Have we found a keymap.json?
ifneq ("$(wildcard $(KEYMAP_JSON))", "")
ifneq ("$(wildcard $(KEYMAP_C))", "")
- $(call WARNING_MESSAGE,Keymap is specified as both keymap.json and keymap.c -- keymap.json file wins.)
+ # Allow a separately-found keymap.c next to keymap.json -- the keymap.c
+ # generator will include the other keymap.c in the process, if supplied.
+ OTHER_KEYMAP_C := $(KEYMAP_C)
+ OPT_DEFS += -DOTHER_KEYMAP_C=\"$(OTHER_KEYMAP_C)\"
endif
KEYMAP_PATH := $(KEYMAP_JSON_PATH)