diff options
| author | Takeshi ISHII <2170248+mtei@users.noreply.github.com> | 2019-02-15 10:52:58 +0900 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-02-14 17:52:58 -0800 |
| commit | d5bc7fc1575543eb27cffcc465a8f0c4e11b7de7 (patch) | |
| tree | e37cfceb42232ce03afa62146eaf73fe7e8a2e47 | |
| parent | a08be85780692021943bb11fb716d91994ddb223 (diff) | |
| download | qmk_firmware-d5bc7fc1575543eb27cffcc465a8f0c4e11b7de7.tar.gz qmk_firmware-d5bc7fc1575543eb27cffcc465a8f0c4e11b7de7.zip | |
Add makefile target 'show_build_options' and 'show_all_features' (#5048)
* Add makefile target 'show_build_options' and 'show_all_features'
Example:
```
$ make planck:default:show_all_features
QMK Firmware 0.6.266
Making planck/rev5 with keymap default and target show_all_features
PLATFORM = AVR
FIRMWARE_FORMAT = hex
Build Options:
BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
COMMAND_ENABLE = no
SLEEP_LED_ENABLE = no
NKRO_ENABLE = yes
BACKLIGHT_ENABLE = no
RGBLIGHT_ENABLE = no
MIDI_ENABLE = no
UNICODE_ENABLE = no
BLUETOOTH_ENABLE = no
AUDIO_ENABLE = yes
FAUXCLICKY_ENABLE =
HD44780_ENABLE =
Other Features:
API_SYSEX_ENABLE = no
RGB_MATRIX_ENABLE = no
```
* remove duplicate 'SPLIT_KEYBOARD'
* add .PHONY, change 'echo' -> '@echo'
* update show_options.mk: useing variable BUILD_OPTION_NAMES, HARDWARE_OPTION_NAMES and OTHER_OPTION_NAMES
* update show_options.mk: add KEYBOARD,KEYMAP
* update show_options.mk: add sorting
* update show_options.mk: add show_full_features, add $(origin XXX)
* update show_options.mk: Macro names was collected from keyboards/.
* update show_options.mk: add some Macro Names
| -rw-r--r-- | build_keyboard.mk | 1 | ||||
| -rw-r--r-- | show_options.mk | 136 |
2 files changed, 137 insertions, 0 deletions
diff --git a/build_keyboard.mk b/build_keyboard.mk index 0239a58b7..71ba80523 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk | |||
| @@ -371,4 +371,5 @@ all: build check-size | |||
| 371 | build: elf cpfirmware | 371 | build: elf cpfirmware |
| 372 | check-size: build | 372 | check-size: build |
| 373 | 373 | ||
| 374 | include show_options.mk | ||
| 374 | include $(TMK_PATH)/rules.mk | 375 | include $(TMK_PATH)/rules.mk |
diff --git a/show_options.mk b/show_options.mk new file mode 100644 index 000000000..e72dd75cf --- /dev/null +++ b/show_options.mk | |||
| @@ -0,0 +1,136 @@ | |||
| 1 | BUILD_OPTION_NAMES = \ | ||
| 2 | BOOTMAGIC_ENABLE \ | ||
| 3 | MOUSEKEY_ENABLE \ | ||
| 4 | EXTRAKEY_ENABLE \ | ||
| 5 | CONSOLE_ENABLE \ | ||
| 6 | COMMAND_ENABLE \ | ||
| 7 | NKRO_ENABLE \ | ||
| 8 | TERMINAL_ENABLE \ | ||
| 9 | CUSTOM_MATRIX \ | ||
| 10 | CUSTOM_DEBOUNCE \ | ||
| 11 | SPLIT_KEYBOARD \ | ||
| 12 | DYNAMIC_KEYMAP_ENABLE \ | ||
| 13 | USB_HID_ENABLE | ||
| 14 | |||
| 15 | HARDWARE_OPTION_NAMES = \ | ||
| 16 | SLEEP_LED_ENABLE \ | ||
| 17 | BACKLIGHT_ENABLE \ | ||
| 18 | BACKLIGHT_CUSTOM_DRIVER \ | ||
| 19 | RGBLIGHT_ENABLE \ | ||
| 20 | RGBLIGHT_CUSTOM_DRIVER \ | ||
| 21 | RGB_MATRIX_ENABLE \ | ||
| 22 | SERIAL_LINK_ENABLE \ | ||
| 23 | CIE1931_CURVE \ | ||
| 24 | MIDI_ENABLE \ | ||
| 25 | BLUETOOTH_ENABLE \ | ||
| 26 | AUDIO_ENABLE \ | ||
| 27 | FAUXCLICKY_ENABLE \ | ||
| 28 | HD44780_ENABLE \ | ||
| 29 | ENCODER_ENABLE \ | ||
| 30 | LCD_ENABLE \ | ||
| 31 | LED_BREATHING_TABLE \ | ||
| 32 | LED_TABLES \ | ||
| 33 | POINTING_DEVICE_ENABLE \ | ||
| 34 | VISUALIZER_ENABLE | ||
| 35 | |||
| 36 | OTHER_OPTION_NAMES = \ | ||
| 37 | UNICODE_ENABLE \ | ||
| 38 | UCIS_ENABLE \ | ||
| 39 | UNICODEMAP_ENABLE \ | ||
| 40 | UNICODE_COMMON \ | ||
| 41 | API_SYSEX_ENABLE \ | ||
| 42 | AUTO_SHIFT_ENABLE \ | ||
| 43 | AUTO_SHIFT_MODIFIERS \ | ||
| 44 | COMBO_ENABLE \ | ||
| 45 | KEY_LOCK_ENABLE \ | ||
| 46 | LEADER_ENABLE \ | ||
| 47 | PRINTING_ENABLE \ | ||
| 48 | STENO_ENABLE \ | ||
| 49 | TAP_DANCE_ENABLE \ | ||
| 50 | VIRTSER_ENABLE \ | ||
| 51 | OLED_ENABLE \ | ||
| 52 | LED_BACK_ENABLE \ | ||
| 53 | LED_UNDERGLOW_ENABLE \ | ||
| 54 | LED_ANIMATIONS \ | ||
| 55 | IOS_DEVICE_ENABLE \ | ||
| 56 | HELIX ZINC \ | ||
| 57 | ADAFRUIT_BLE_ENABLE \ | ||
| 58 | AUTOLOG_ENABLE \ | ||
| 59 | BREATHING_LED_ENABLE \ | ||
| 60 | DEBUG_ENABLE \ | ||
| 61 | ENCODER_ENABLE_CUSTOM \ | ||
| 62 | FADING_LED_ENABLE \ | ||
| 63 | GERMAN_ENABLE \ | ||
| 64 | HAPTIC_ENABLE \ | ||
| 65 | HHKB_RN42_ENABLE \ | ||
| 66 | ISSI_ENABLE \ | ||
| 67 | KEYBOARD_LOCK_ENABLE \ | ||
| 68 | KEYLOGGER_ENABLE \ | ||
| 69 | KEYMAP_IN_EEPROM_ENABLE \ | ||
| 70 | KEYMAP_SECTION_ENABLE \ | ||
| 71 | LCD_BACKLIGHT_ENABLE \ | ||
| 72 | LEDMAP_ENABLE \ | ||
| 73 | LEDMAP_IN_EEPROM_ENABLE \ | ||
| 74 | MACROS_ENABLED \ | ||
| 75 | ONEHAND_ENABLE \ | ||
| 76 | PS2_MOUSE_ENABLE \ | ||
| 77 | RAW_ENABLE \ | ||
| 78 | SOFTPWM_LED_ENABLE \ | ||
| 79 | SWAP_HANDS_ENABLE \ | ||
| 80 | USB_6KRO_ENABLE \ | ||
| 81 | WATCHDOG_ENABLE \ | ||
| 82 | XT_ENABLE \ | ||
| 83 | ERGOINU \ | ||
| 84 | NO_USB_STARTUP_CHECK \ | ||
| 85 | DISABLE_PROMICRO_LEDs \ | ||
| 86 | MITOSIS_DATAGROK_BOTTOMSPACE \ | ||
| 87 | MITOSIS_DATAGROK_SLOWUART \ | ||
| 88 | RGB_MATRIX_KEYPRESSES \ | ||
| 89 | LED_MIRRORED \ | ||
| 90 | RGBLIGHT_FULL_POWER \ | ||
| 91 | Link_Time_Optimization | ||
| 92 | |||
| 93 | define NAME_ECHO | ||
| 94 | @echo " $1 = $($1) # $(origin $1)" | ||
| 95 | |||
| 96 | endef | ||
| 97 | |||
| 98 | .PHONY: show_build_options0 show_build_options | ||
| 99 | show_build_options0: | ||
| 100 | @echo " KEYBOARD = $(KEYBOARD)" | ||
| 101 | @echo " KEYMAP = $(KEYMAP)" | ||
| 102 | @echo " MCU = $(MCU)" | ||
| 103 | @echo " MCU_SERIES = $(MCU_SERIES)" | ||
| 104 | @echo " PLATFORM = $(PLATFORM)" | ||
| 105 | @echo " FIRMWARE_FORMAT = $(FIRMWARE_FORMAT)" | ||
| 106 | @echo | ||
| 107 | @echo "Build Options:" | ||
| 108 | $(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\ | ||
| 109 | $(call NAME_ECHO,$(A_OPTION_NAME))) | ||
| 110 | |||
| 111 | show_build_options: show_build_options0 | ||
| 112 | @echo | ||
| 113 | @echo "If you want to know more, please try 'show_all_features' or 'show_full_features'" | ||
| 114 | @echo | ||
| 115 | |||
| 116 | .PHONY: show_all_features | ||
| 117 | show_all_features: show_build_options0 | ||
| 118 | @echo | ||
| 119 | @echo "Hardware Options:" | ||
| 120 | $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ | ||
| 121 | $(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME)))) | ||
| 122 | @echo | ||
| 123 | @echo "Other Options:" | ||
| 124 | $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ | ||
| 125 | $(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME)))) | ||
| 126 | |||
| 127 | .PHONY: show_full_features | ||
| 128 | show_full_features: show_build_options0 | ||
| 129 | @echo | ||
| 130 | @echo "Hardware Options:" | ||
| 131 | $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ | ||
| 132 | $(call NAME_ECHO,$(A_OPTION_NAME))) | ||
| 133 | @echo | ||
| 134 | @echo "Other Options:" | ||
| 135 | $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ | ||
| 136 | $(call NAME_ECHO,$(A_OPTION_NAME))) | ||
