From 0e5d67145a649480fd49a72712997feb6303a471 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Tue, 5 Jul 2022 08:58:35 +1000 Subject: Allow for `keymaps` array to be implemented in a file other than `$(KEYMAP_C)` (#17559) --- builddefs/build_keyboard.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'builddefs') diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index b5616a438f..fe95dcaf15 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -400,6 +400,12 @@ endif OPT_DEFS += -DKEYMAP_C=\"$(KEYMAP_C)\" +# If a keymap or userspace places their keymap array in another file instead, allow for it to be included +# !!NOTE!! -- For this to work, the source file cannot be part of $(SRC), so users should not add it via `SRC += ` +ifneq ($(strip $(INTROSPECTION_KEYMAP_C)),) +OPT_DEFS += -DINTROSPECTION_KEYMAP_C=\"$(strip $(INTROSPECTION_KEYMAP_C))\" +endif + # project specific files SRC += \ $(KEYBOARD_SRC) \ -- cgit v1.2.3