From 5eb53be671b4103626d0c0bb7828474d8be03ec7 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 1 Dec 2024 19:24:44 +0000 Subject: [PATCH] Avoid loading keymap rules.mk twice (#24665) --- builddefs/build_keyboard.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index afad67a76d..7d58c29462 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -197,8 +197,10 @@ ifneq ("$(wildcard $(KEYMAP_JSON))", "") KEYMAP_C := $(INTERMEDIATE_OUTPUT)/src/keymap.c KEYMAP_H := $(INTERMEDIATE_OUTPUT)/src/config.h - # Load the keymap-level rules.mk if exists - -include $(KEYMAP_PATH)/rules.mk + ifeq ($(OTHER_KEYMAP_C),) + # Load the keymap-level rules.mk if exists (and we havent already loaded it for keymap.c) + -include $(KEYMAP_PATH)/rules.mk + endif # Load any rules.mk content from keymap.json INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --output $(INTERMEDIATE_OUTPUT)/src/rules.mk $(KEYMAP_JSON))