summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorfauxpark <fauxpark@gmail.com>2019-09-21 17:00:58 +1000
committerDrashna Jael're <drashna@live.com>2019-12-05 16:03:49 -0800
commit860995817fa5b0aee59d748a55270b34fced8c4f (patch)
treec02d33426ad051e9f8f4de786919a3c3eab3d579 /Makefile
parent53e7452e49d1fd8b53acdbd986b0dd1bb9e67356 (diff)
Add list-keymaps make target (#5563)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 37f5f23dbe..508691f45f 100644
--- a/Makefile
+++ b/Makefile
@@ -371,6 +371,9 @@ define PARSE_KEYBOARD
# The same if all was specified
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
$$(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
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYMAPS)),true)
$$(eval $$(call PARSE_KEYMAP,$$(MATCHED_ITEM)))
@@ -407,6 +410,16 @@ endef
# endif
# 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
# This is the meat of compiling a keyboard, when entering this, everything is known
# keyboard, subproject, and keymap