2017-08-24 02:29:07 +00:00
|
|
|
LAYOUTS_PATH := layouts
|
|
|
|
LAYOUTS_REPOS := $(patsubst %/,%,$(sort $(dir $(wildcard $(LAYOUTS_PATH)/*/))))
|
|
|
|
|
|
|
|
define SEARCH_LAYOUTS_REPO
|
|
|
|
LAYOUT_KEYMAP_PATH := $$(LAYOUTS_REPO)/$$(LAYOUT)/$$(KEYMAP)
|
|
|
|
LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c
|
|
|
|
ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","")
|
|
|
|
KEYMAP_C := $$(LAYOUT_KEYMAP_C)
|
|
|
|
KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
|
2018-06-07 19:41:19 +00:00
|
|
|
else
|
|
|
|
$$(error Could not find keymap)
|
2017-08-24 02:29:07 +00:00
|
|
|
endif
|
|
|
|
endef
|
|
|
|
|
|
|
|
define SEARCH_LAYOUTS
|
|
|
|
$$(foreach LAYOUTS_REPO,$$(LAYOUTS_REPOS),$$(eval $$(call SEARCH_LAYOUTS_REPO)))
|
|
|
|
endef
|
|
|
|
|
2018-06-07 19:41:19 +00:00
|
|
|
$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS)))
|