You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
627 B

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