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 Namesmaster
parent
a08be85780
commit
d5bc7fc157
|
@ -371,4 +371,5 @@ all: build check-size
|
||||||
build: elf cpfirmware
|
build: elf cpfirmware
|
||||||
check-size: build
|
check-size: build
|
||||||
|
|
||||||
|
include show_options.mk
|
||||||
include $(TMK_PATH)/rules.mk
|
include $(TMK_PATH)/rules.mk
|
||||||
|
|
|
@ -0,0 +1,136 @@
|
||||||
|
BUILD_OPTION_NAMES = \
|
||||||
|
BOOTMAGIC_ENABLE \
|
||||||
|
MOUSEKEY_ENABLE \
|
||||||
|
EXTRAKEY_ENABLE \
|
||||||
|
CONSOLE_ENABLE \
|
||||||
|
COMMAND_ENABLE \
|
||||||
|
NKRO_ENABLE \
|
||||||
|
TERMINAL_ENABLE \
|
||||||
|
CUSTOM_MATRIX \
|
||||||
|
CUSTOM_DEBOUNCE \
|
||||||
|
SPLIT_KEYBOARD \
|
||||||
|
DYNAMIC_KEYMAP_ENABLE \
|
||||||
|
USB_HID_ENABLE
|
||||||
|
|
||||||
|
HARDWARE_OPTION_NAMES = \
|
||||||
|
SLEEP_LED_ENABLE \
|
||||||
|
BACKLIGHT_ENABLE \
|
||||||
|
BACKLIGHT_CUSTOM_DRIVER \
|
||||||
|
RGBLIGHT_ENABLE \
|
||||||
|
RGBLIGHT_CUSTOM_DRIVER \
|
||||||
|
RGB_MATRIX_ENABLE \
|
||||||
|
SERIAL_LINK_ENABLE \
|
||||||
|
CIE1931_CURVE \
|
||||||
|
MIDI_ENABLE \
|
||||||
|
BLUETOOTH_ENABLE \
|
||||||
|
AUDIO_ENABLE \
|
||||||
|
FAUXCLICKY_ENABLE \
|
||||||
|
HD44780_ENABLE \
|
||||||
|
ENCODER_ENABLE \
|
||||||
|
LCD_ENABLE \
|
||||||
|
LED_BREATHING_TABLE \
|
||||||
|
LED_TABLES \
|
||||||
|
POINTING_DEVICE_ENABLE \
|
||||||
|
VISUALIZER_ENABLE
|
||||||
|
|
||||||
|
OTHER_OPTION_NAMES = \
|
||||||
|
UNICODE_ENABLE \
|
||||||
|
UCIS_ENABLE \
|
||||||
|
UNICODEMAP_ENABLE \
|
||||||
|
UNICODE_COMMON \
|
||||||
|
API_SYSEX_ENABLE \
|
||||||
|
AUTO_SHIFT_ENABLE \
|
||||||
|
AUTO_SHIFT_MODIFIERS \
|
||||||
|
COMBO_ENABLE \
|
||||||
|
KEY_LOCK_ENABLE \
|
||||||
|
LEADER_ENABLE \
|
||||||
|
PRINTING_ENABLE \
|
||||||
|
STENO_ENABLE \
|
||||||
|
TAP_DANCE_ENABLE \
|
||||||
|
VIRTSER_ENABLE \
|
||||||
|
OLED_ENABLE \
|
||||||
|
LED_BACK_ENABLE \
|
||||||
|
LED_UNDERGLOW_ENABLE \
|
||||||
|
LED_ANIMATIONS \
|
||||||
|
IOS_DEVICE_ENABLE \
|
||||||
|
HELIX ZINC \
|
||||||
|
ADAFRUIT_BLE_ENABLE \
|
||||||
|
AUTOLOG_ENABLE \
|
||||||
|
BREATHING_LED_ENABLE \
|
||||||
|
DEBUG_ENABLE \
|
||||||
|
ENCODER_ENABLE_CUSTOM \
|
||||||
|
FADING_LED_ENABLE \
|
||||||
|
GERMAN_ENABLE \
|
||||||
|
HAPTIC_ENABLE \
|
||||||
|
HHKB_RN42_ENABLE \
|
||||||
|
ISSI_ENABLE \
|
||||||
|
KEYBOARD_LOCK_ENABLE \
|
||||||
|
KEYLOGGER_ENABLE \
|
||||||
|
KEYMAP_IN_EEPROM_ENABLE \
|
||||||
|
KEYMAP_SECTION_ENABLE \
|
||||||
|
LCD_BACKLIGHT_ENABLE \
|
||||||
|
LEDMAP_ENABLE \
|
||||||
|
LEDMAP_IN_EEPROM_ENABLE \
|
||||||
|
MACROS_ENABLED \
|
||||||
|
ONEHAND_ENABLE \
|
||||||
|
PS2_MOUSE_ENABLE \
|
||||||
|
RAW_ENABLE \
|
||||||
|
SOFTPWM_LED_ENABLE \
|
||||||
|
SWAP_HANDS_ENABLE \
|
||||||
|
USB_6KRO_ENABLE \
|
||||||
|
WATCHDOG_ENABLE \
|
||||||
|
XT_ENABLE \
|
||||||
|
ERGOINU \
|
||||||
|
NO_USB_STARTUP_CHECK \
|
||||||
|
DISABLE_PROMICRO_LEDs \
|
||||||
|
MITOSIS_DATAGROK_BOTTOMSPACE \
|
||||||
|
MITOSIS_DATAGROK_SLOWUART \
|
||||||
|
RGB_MATRIX_KEYPRESSES \
|
||||||
|
LED_MIRRORED \
|
||||||
|
RGBLIGHT_FULL_POWER \
|
||||||
|
Link_Time_Optimization
|
||||||
|
|
||||||
|
define NAME_ECHO
|
||||||
|
@echo " $1 = $($1) # $(origin $1)"
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
|
.PHONY: show_build_options0 show_build_options
|
||||||
|
show_build_options0:
|
||||||
|
@echo " KEYBOARD = $(KEYBOARD)"
|
||||||
|
@echo " KEYMAP = $(KEYMAP)"
|
||||||
|
@echo " MCU = $(MCU)"
|
||||||
|
@echo " MCU_SERIES = $(MCU_SERIES)"
|
||||||
|
@echo " PLATFORM = $(PLATFORM)"
|
||||||
|
@echo " FIRMWARE_FORMAT = $(FIRMWARE_FORMAT)"
|
||||||
|
@echo
|
||||||
|
@echo "Build Options:"
|
||||||
|
$(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\
|
||||||
|
$(call NAME_ECHO,$(A_OPTION_NAME)))
|
||||||
|
|
||||||
|
show_build_options: show_build_options0
|
||||||
|
@echo
|
||||||
|
@echo "If you want to know more, please try 'show_all_features' or 'show_full_features'"
|
||||||
|
@echo
|
||||||
|
|
||||||
|
.PHONY: show_all_features
|
||||||
|
show_all_features: show_build_options0
|
||||||
|
@echo
|
||||||
|
@echo "Hardware Options:"
|
||||||
|
$(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\
|
||||||
|
$(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME))))
|
||||||
|
@echo
|
||||||
|
@echo "Other Options:"
|
||||||
|
$(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\
|
||||||
|
$(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME))))
|
||||||
|
|
||||||
|
.PHONY: show_full_features
|
||||||
|
show_full_features: show_build_options0
|
||||||
|
@echo
|
||||||
|
@echo "Hardware Options:"
|
||||||
|
$(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\
|
||||||
|
$(call NAME_ECHO,$(A_OPTION_NAME)))
|
||||||
|
@echo
|
||||||
|
@echo "Other Options:"
|
||||||
|
$(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\
|
||||||
|
$(call NAME_ECHO,$(A_OPTION_NAME)))
|
Loading…
Reference in New Issue