xwhatsit keyboards: bugfix of through hole with model F keyboards
[jackhill/qmk/firmware.git] / message.mk
CommitLineData
db5c3b74
FS
1COLOR ?= true
2
3ifeq ($(COLOR),true)
4 NO_COLOR=\033[0m
5 OK_COLOR=\033[32;01m
6 ERROR_COLOR=\033[31;01m
7 WARN_COLOR=\033[33;01m
8 BLUE=\033[0;34m
9 BOLD=\033[1m
10endif
11
c9d0f210 12ifneq ($(shell echo "1 2 3" | awk '{ printf "%2s", $$3; }' 2>/dev/null)," 3")
db5c3b74
FS
13 AWK=awk
14else
15 AWK=cat && test
16endif
17
03e31ef8
FS
18ON_ERROR ?= exit 1
19
db5c3b74
FS
20OK_STRING=$(OK_COLOR)[OK]$(NO_COLOR)\n
21ERROR_STRING=$(ERROR_COLOR)[ERRORS]$(NO_COLOR)\n
22WARN_STRING=$(WARN_COLOR)[WARNINGS]$(NO_COLOR)\n
23
b7d8dec7
FS
24TAB_LOG = printf "\n%s\n\n" "$$LOG" | $(AWK) '{ sub(/^/," | "); print }'
25TAB_LOG_PLAIN = printf "%s\n" "$$LOG"
db5c3b74
FS
26AWK_STATUS = $(AWK) '{ printf " %-10s\n", $$1; }'
27AWK_CMD = $(AWK) '{ printf "%-99s", $$0; }'
03e31ef8 28PRINT_ERROR = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) && $(ON_ERROR)
db5c3b74 29PRINT_WARNING = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG)
03e31ef8 30PRINT_ERROR_PLAIN = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN) && $(ON_ERROR)
db5c3b74
FS
31PRINT_WARNING_PLAIN = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN)
32PRINT_OK = $(SILENT) || printf " $(OK_STRING)" | $(AWK_STATUS)
67b294ca 33BUILD_CMD = LOG=$$($(CMD) 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING); else $(PRINT_OK); fi;
b26ded3a 34MAKE_MSG_FORMAT = $(AWK) '{ printf "%-118s", $$0;}'
3aac4e95
FS
35
36# Define Messages
37# English
38MSG_ERRORS_NONE = Errors: none
03e31ef8 39MSG_ERRORS = $(ERROR_COLOR)Make finished with errors\n$(NO_COLOR)
3aac4e95
FS
40MSG_BEGIN = -------- begin --------
41MSG_END = -------- end --------
42MSG_SIZE_BEFORE = Size before:
43MSG_SIZE_AFTER = Size after:
44MSG_COFF = Converting to AVR COFF:
45MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
9fdc2762 46MSG_FLASH = Creating load file for flashing:
3aac4e95 47MSG_EEPROM = Creating load file for EEPROM:
9fdc2762 48MSG_BIN = Creating binary load file for flashing:
3aac4e95
FS
49MSG_EXTENDED_LISTING = Creating Extended Listing:
50MSG_SYMBOL_TABLE = Creating Symbol Table:
51MSG_LINKING = Linking:
52MSG_COMPILING = Compiling:
b28ee6b0 53MSG_COMPILING_CXX = Compiling:
3aac4e95
FS
54MSG_ASSEMBLING = Assembling:
55MSG_CLEANING = Cleaning project:
56MSG_CREATING_LIBRARY = Creating library:
1877736f 57MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR) Some git submodules are out of date or modified.\n\
58Please consider running $(BOLD)make git-submodule$(NO_COLOR).\n\n
b26ded3a
FS
59MSG_NO_CMP = $(ERROR_COLOR)Error:$(NO_COLOR)$(BOLD) cmp command not found, please install diffutils\n$(NO_COLOR)
60
61define GENERATE_MSG_MAKE_KB
62 MSG_MAKE_KB_ACTUAL := Making $$(KB_SP) with keymap $(BOLD)$$(CURRENT_KM)$(NO_COLOR)
63 ifneq ($$(MAKE_TARGET),)
64 MSG_MAKE_KB_ACTUAL += and target $(BOLD)$$(MAKE_TARGET)$(NO_COLOR)
65 endif
66endef
67MSG_MAKE_KB = $(eval $(call GENERATE_MSG_MAKE_KB))$(MSG_MAKE_KB_ACTUAL)
27a673f5
FS
68define GENERATE_MSG_MAKE_TEST
69 MSG_MAKE_TEST_ACTUAL := Making test $(BOLD)$(TEST_NAME)$(NO_COLOR)
70 ifneq ($$(MAKE_TARGET),)
71 MSG_MAKE_TEST_ACTUAL += with target $(BOLD)$$(MAKE_TARGET)$(NO_COLOR)
72 endif
73endef
74MSG_MAKE_TEST = $(eval $(call GENERATE_MSG_MAKE_TEST))$(MSG_MAKE_TEST_ACTUAL)
7eefb34e 75MSG_TEST = Testing $(BOLD)$(TEST_NAME)$(NO_COLOR)
2df3799e 76define GENERATE_MSG_AVAILABLE_KEYMAPS
77 MSG_AVAILABLE_KEYMAPS_ACTUAL := Available keymaps for $(BOLD)$$(CURRENT_KB)$(NO_COLOR):
78endef
79MSG_AVAILABLE_KEYMAPS = $(eval $(call GENERATE_MSG_AVAILABLE_KEYMAPS))$(MSG_AVAILABLE_KEYMAPS_ACTUAL)
80
6052aa49 81MSG_CHECK_FILESIZE = Checking file size of $(TARGET).$(FIRMWARE_FORMAT)
8ef747ac 82MSG_FILE_TOO_BIG = $(ERROR_COLOR)The firmware is too large!$(NO_COLOR) $(CURRENT_SIZE)/$(MAX_SIZE) ($(OVER_SIZE) bytes over)\n
83MSG_FILE_TOO_SMALL = The firmware is too small! $(CURRENT_SIZE)/$(MAX_SIZE)\n
8e348c42 84MSG_FILE_JUST_RIGHT = The firmware size is fine - $(CURRENT_SIZE)/$(MAX_SIZE) ($(PERCENT_SIZE)%%, $(FREE_SIZE) bytes free)\n
85MSG_FILE_NEAR_LIMIT = The firmware size is approaching the maximum - $(CURRENT_SIZE)/$(MAX_SIZE) ($(PERCENT_SIZE)%%, $(FREE_SIZE) bytes free)\n
99500243 86MSG_PYTHON_MISSING = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \
87 Python 3 is not installed. It will be required by a future version\n\
88 of qmk_firmware.\n\n\
89 Please run $(BOLD)util/qmk_install.sh$(NO_COLOR) to install all the dependencies QMK requires.\n\n
4003d077
DJ
90MSG_FLASH_BOOTLOADER = $(WARN_COLOR)WARNING:$(NO_COLOR) This board's bootloader is not specified or is not supported by the \":flash\" target at this time.\n\n
91MSG_FLASH_ARCH = $(WARN_COLOR)WARNING:$(NO_COLOR) This board's architecture is not supported by the \":flash\" target at this time.\n\n
44fd317a 92MSG_BOOTLOADER_NOT_FOUND = $(ERROR_COLOR)ERROR:$(NO_COLOR) Bootloader not found. Trying again in 5s.\n