mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-13 23:44:54 +00:00
Proper parsing of keymaps inside subprojects
This commit is contained in:
parent
44441de8ca
commit
2dd9c1edcd
1 changed files with 21 additions and 5 deletions
16
Makefile
16
Makefile
|
@ -131,17 +131,33 @@ endef
|
|||
# $1 Subproject
|
||||
define PARSE_SUBPROJECT
|
||||
ifeq ($1,defaultsp)
|
||||
SUBPROJECT_DEFAULT=
|
||||
$$(eval include $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/Makefile)
|
||||
CURRENT_SP := $$(SUBPROJECT_DEFAULT)
|
||||
else
|
||||
CURRENT_SP := $1
|
||||
endif
|
||||
# If current subproject is empty (the default was not defined), and we have a list of subproject
|
||||
# then make all
|
||||
ifeq ($$(CURRENT_SP),)
|
||||
ifneq ($$(SUBPROJECTS),)
|
||||
CURRENT_SP := allsp
|
||||
endif
|
||||
endif
|
||||
ifneq ($$(CURRENT_SP),allsp)
|
||||
KEYMAPS := $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/keymaps/*/.)))
|
||||
ifneq ($$(CURRENT_SP),)
|
||||
SP_KEYMAPS := $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(CURRENT_KB)/$$(CURRENT_SP)/keymaps/*/.)))
|
||||
KEYMAPS := $$(sort $$(KEYMAPS) $$(SP_KEYMAPS))
|
||||
endif
|
||||
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allkm),true)
|
||||
$$(eval $$(call PARSE_ALL_KEYMAPS))
|
||||
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true)
|
||||
$$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM)))
|
||||
endif
|
||||
else
|
||||
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$(SUBPROJECTS)))
|
||||
endif
|
||||
endef
|
||||
|
||||
define PARSE_ALL_SUBPROJECTS
|
||||
|
|
Loading…
Reference in a new issue