fix layouts

This commit is contained in:
Jack Humbert 2018-06-07 20:54:25 -04:00
parent e1e4a51472
commit bcbc64aed8
2 changed files with 9 additions and 6 deletions

View file

@ -231,10 +231,6 @@ ifeq ("$(USER_NAME)","")
endif
USER_PATH := users/$(USER_NAME)
-include $(USER_PATH)/rules.mk
ifneq ("$(wildcard $(USER_PATH)/config.h)","")
CONFIG_H += $(USER_PATH)/config.h
endif
# Object files directory
# To put object files in current directory, use a dot (.), do NOT make
@ -243,6 +239,7 @@ KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)
-include $(PARENT_KEYMAP_PATH)/rules.mk
-include $(KEYMAP_PATH)/rules.mk
-include $(USER_PATH)/rules.mk
ifneq ("$(wildcard $(PARENT_KEYMAP_PATH)/config.h)","")
CONFIG_H += $(PARENT_KEYMAP_PATH)/config.h
@ -250,6 +247,9 @@ endif
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
CONFIG_H += $(KEYMAP_PATH)/config.h
endif
ifneq ("$(wildcard $(USER_PATH)/config.h)","")
CONFIG_H += $(USER_PATH)/config.h
endif
# # project specific files
SRC += $(KEYBOARD_SRC) \

View file

@ -3,12 +3,15 @@ LAYOUTS_REPOS := $(patsubst %/,%,$(sort $(dir $(wildcard $(LAYOUTS_PATH)/*/))))
define SEARCH_LAYOUTS_REPO
LAYOUT_KEYMAP_PATH := $$(LAYOUTS_REPO)/$$(LAYOUT)/$$(KEYMAP)
PARENT_LAYOUT_KEYMAP_PATH := $(patsubst %/,%,$(dir $(LAYOUT_KEYMAP_PATH)))
LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c
PARENT_LAYOUT_KEYMAP_C := $$(PARENT_LAYOUT_KEYMAP_PATH)/keymap.c
ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","")
KEYMAP_C := $$(LAYOUT_KEYMAP_C)
KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
else
$$(error Could not find keymap)
else ifneq ("$$(wildcard $$(PARENT_LAYOUT_KEYMAP_C))","")
KEYMAP_C := $$(PARENT_LAYOUT_KEYMAP_C)
KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
endif
endef