Add list-keymaps make target (#5563)
This commit is contained in:
parent
ea96c4b787
commit
2df3799e3d
2 changed files with 18 additions and 0 deletions
13
Makefile
13
Makefile
|
@ -371,6 +371,9 @@ define PARSE_KEYBOARD
|
||||||
# The same if all was specified
|
# The same if all was specified
|
||||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
|
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
|
||||||
$$(eval $$(call PARSE_ALL_KEYMAPS))
|
$$(eval $$(call PARSE_ALL_KEYMAPS))
|
||||||
|
# List all keymaps for the given keyboard
|
||||||
|
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,list-keymaps),true)
|
||||||
|
$$(eval $$(call LIST_ALL_KEYMAPS))
|
||||||
# Try to match the specified keyamp with the list of known keymaps
|
# Try to match the specified keyamp with the list of known keymaps
|
||||||
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true)
|
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true)
|
||||||
$$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM)))
|
$$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM)))
|
||||||
|
@ -407,6 +410,16 @@ endef
|
||||||
# endif
|
# endif
|
||||||
# endef
|
# endef
|
||||||
|
|
||||||
|
# Prints a list of all known keymaps for the given keyboard
|
||||||
|
define LIST_ALL_KEYMAPS
|
||||||
|
COMMAND_true_LIST_KEYMAPS := \
|
||||||
|
printf "$$(KEYMAPS)\n";
|
||||||
|
COMMAND_false_LIST_KEYMAPS := \
|
||||||
|
printf "$$(MSG_AVAILABLE_KEYMAPS)\n"; \
|
||||||
|
printf "$$(KEYMAPS)\n";
|
||||||
|
COMMANDS += LIST_KEYMAPS
|
||||||
|
endef
|
||||||
|
|
||||||
# $1 Keymap
|
# $1 Keymap
|
||||||
# This is the meat of compiling a keyboard, when entering this, everything is known
|
# This is the meat of compiling a keyboard, when entering this, everything is known
|
||||||
# keyboard, subproject, and keymap
|
# keyboard, subproject, and keymap
|
||||||
|
|
|
@ -76,6 +76,11 @@ define GENERATE_MSG_MAKE_TEST
|
||||||
endef
|
endef
|
||||||
MSG_MAKE_TEST = $(eval $(call GENERATE_MSG_MAKE_TEST))$(MSG_MAKE_TEST_ACTUAL)
|
MSG_MAKE_TEST = $(eval $(call GENERATE_MSG_MAKE_TEST))$(MSG_MAKE_TEST_ACTUAL)
|
||||||
MSG_TEST = Testing $(BOLD)$(TEST_NAME)$(NO_COLOR)
|
MSG_TEST = Testing $(BOLD)$(TEST_NAME)$(NO_COLOR)
|
||||||
|
define GENERATE_MSG_AVAILABLE_KEYMAPS
|
||||||
|
MSG_AVAILABLE_KEYMAPS_ACTUAL := Available keymaps for $(BOLD)$$(CURRENT_KB)$(NO_COLOR):
|
||||||
|
endef
|
||||||
|
MSG_AVAILABLE_KEYMAPS = $(eval $(call GENERATE_MSG_AVAILABLE_KEYMAPS))$(MSG_AVAILABLE_KEYMAPS_ACTUAL)
|
||||||
|
|
||||||
MSG_CHECK_FILESIZE = Checking file size of $(TARGET).hex
|
MSG_CHECK_FILESIZE = Checking file size of $(TARGET).hex
|
||||||
MSG_FILE_TOO_BIG = $(ERROR_COLOR)The firmware is too large!$(NO_COLOR) $(CURRENT_SIZE)/$(MAX_SIZE) ($(OVER_SIZE) bytes over)\n
|
MSG_FILE_TOO_BIG = $(ERROR_COLOR)The firmware is too large!$(NO_COLOR) $(CURRENT_SIZE)/$(MAX_SIZE) ($(OVER_SIZE) bytes over)\n
|
||||||
MSG_FILE_TOO_SMALL = The firmware is too small! $(CURRENT_SIZE)/$(MAX_SIZE)\n
|
MSG_FILE_TOO_SMALL = The firmware is too small! $(CURRENT_SIZE)/$(MAX_SIZE)\n
|
||||||
|
|
Loading…
Reference in a new issue