diff options
author | Albert Y <76888457+filterpaper@users.noreply.github.com> | 2022-08-13 21:57:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-13 23:57:07 +1000 |
commit | 69fa2d83781104fafd3992c1cece2ee98e862a69 (patch) | |
tree | 2b349877607dfe3a75c1e7cefe0305ccb6695da8 /builddefs/build_keyboard.mk | |
parent | 6a0d90f81a9b9938591b32f9321530e68e5cea0b (diff) |
[Core] Re-order user space rules inclusion (#17459)
Diffstat (limited to 'builddefs/build_keyboard.mk')
-rw-r--r-- | builddefs/build_keyboard.mk | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index fe95dcaf15..5840378d9c 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -118,6 +118,15 @@ MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP) INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_rules.mk) include $(INFO_RULES_MK) +# Userspace setup and definitions +ifeq ("$(USER_NAME)","") + USER_NAME := $(KEYMAP) +endif +USER_PATH := users/$(USER_NAME) + +# Pull in user level rules.mk +-include $(USER_PATH)/rules.mk + # Check for keymap.json first, so we can regenerate keymap.c include $(BUILDDEFS_PATH)/build_json.mk @@ -356,14 +365,7 @@ generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/def .INTERMEDIATE : generated-files -# Userspace setup and definitions -ifeq ("$(USER_NAME)","") - USER_NAME := $(KEYMAP) -endif -USER_PATH := users/$(USER_NAME) - -# Pull in user level rules.mk --include $(USER_PATH)/rules.mk +# Include user level config ifneq ("$(wildcard $(USER_PATH)/config.h)","") CONFIG_H += $(USER_PATH)/config.h endif |