1 LAYOUTS_PATH := layouts
2 LAYOUTS_REPOS := $(patsubst %/,%,$(sort $(dir $(wildcard $(LAYOUTS_PATH)/*/))))
4 define SEARCH_LAYOUTS_REPO
5 LAYOUT_KEYMAP_PATH := $$(LAYOUTS_REPO)/$$(LAYOUT)/$$(KEYMAP)
6 LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c
7 ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","")
8 -include $$(LAYOUT_KEYMAP_PATH)/rules.mk
9 KEYMAP_C := $$(LAYOUT_KEYMAP_C)
10 KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
15 $$(foreach LAYOUTS_REPO,$$(LAYOUTS_REPOS),$$(eval $$(call SEARCH_LAYOUTS_REPO)))
18 $(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS)))