6 ERROR_COLOR
=\033[31;01m
12 ifneq ($(shell awk
--version
2>/dev
/null
),)
20 OK_STRING
=$(OK_COLOR
)[OK
]$(NO_COLOR
)\n
21 ERROR_STRING
=$(ERROR_COLOR
)[ERRORS
]$(NO_COLOR
)\n
22 WARN_STRING
=$(WARN_COLOR
)[WARNINGS
]$(NO_COLOR
)\n
24 TAB_LOG
= printf
"\n$$LOG\n\n" |
$(AWK
) '{ sub(/^/," | "); print }'
25 TAB_LOG_PLAIN
= printf
"$$LOG\n"
26 AWK_STATUS
= $(AWK
) '{ printf " %-10s\n", $$1; }'
27 AWK_CMD
= $(AWK
) '{ printf "%-99s", $$0; }'
28 PRINT_ERROR
= ($(SILENT
) ||printf
" $(ERROR_STRING)" |
$(AWK_STATUS
)) && $(TAB_LOG
) && $(ON_ERROR
)
29 PRINT_WARNING
= ($(SILENT
) || printf
" $(WARN_STRING)" |
$(AWK_STATUS
)) && $(TAB_LOG
)
30 PRINT_ERROR_PLAIN
= ($(SILENT
) ||printf
" $(ERROR_STRING)" |
$(AWK_STATUS
)) && $(TAB_LOG_PLAIN
) && $(ON_ERROR
)
31 PRINT_WARNING_PLAIN
= ($(SILENT
) || printf
" $(WARN_STRING)" |
$(AWK_STATUS
)) && $(TAB_LOG_PLAIN
)
32 PRINT_OK
= $(SILENT
) || printf
" $(OK_STRING)" |
$(AWK_STATUS
)
33 BUILD_CMD
= LOG
=$$($(CMD
) 2>&1) ; if
[ $$?
-gt
0 ]; then
$(PRINT_ERROR
); elif
[ "$$LOG" != "" ] ; then
$(PRINT_WARNING
); else $(PRINT_OK
); fi
;
34 MAKE_MSG_FORMAT
= $(AWK
) '{ printf "%-118s", $$0;}'
38 MSG_ERRORS_NONE
= Errors
: none
39 MSG_ERRORS
= $(ERROR_COLOR
)Make finished with errors
\n$(NO_COLOR
)
40 MSG_BEGIN
= -------- begin
--------
41 MSG_END
= -------- end
--------
42 MSG_SIZE_BEFORE
= Size before
:
43 MSG_SIZE_AFTER
= Size after
:
44 MSG_COFF
= Converting to AVR COFF
:
45 MSG_EXTENDED_COFF
= Converting to AVR Extended COFF
:
46 MSG_FLASH
= Creating load file for Flash
:
47 MSG_EEPROM
= Creating load file for EEPROM
:
48 MSG_BIN
= Creating binary load file for Flash
:
49 MSG_EXTENDED_LISTING
= Creating Extended Listing
:
50 MSG_SYMBOL_TABLE
= Creating Symbol Table
:
51 MSG_LINKING
= Linking
:
52 MSG_COMPILING
= Compiling
:
53 MSG_COMPILING_CPP
= Compiling
:
54 MSG_ASSEMBLING
= Assembling
:
55 MSG_CLEANING
= Cleaning project
:
56 MSG_CREATING_LIBRARY
= Creating library
:
57 MSG_SUBMODULE_DIRTY
= $(WARN_COLOR
)WARNING
:$(NO_COLOR
)\n \
58 Some git sub-modules are out of date or modified
, please consider runnning
:$(BOLD
)\n\
59 git submodule sync
--recursive
\n\
60 git submodule update
--init
--recursive
$(NO_COLOR
)\n\n\
61 You can ignore this warning if you are not compiling any ChibiOS keyboards
,\n\
62 or if you have modified the ChibiOS libraries yourself.
\n\n
63 MSG_NO_CMP
= $(ERROR_COLOR
)Error
:$(NO_COLOR
)$(BOLD
) cmp command not found
, please
install diffutils
\n$(NO_COLOR
)
65 define GENERATE_MSG_MAKE_KB
66 MSG_MAKE_KB_ACTUAL
:= Making
$$(KB_SP
) with keymap
$(BOLD
)$$(CURRENT_KM
)$(NO_COLOR
)
67 ifneq ($$(MAKE_TARGET
),)
68 MSG_MAKE_KB_ACTUAL
+= and target
$(BOLD
)$$(MAKE_TARGET
)$(NO_COLOR
)
71 MSG_MAKE_KB
= $(eval
$(call GENERATE_MSG_MAKE_KB
))$(MSG_MAKE_KB_ACTUAL
)
72 define GENERATE_MSG_MAKE_TEST
73 MSG_MAKE_TEST_ACTUAL
:= Making
test $(BOLD
)$(TEST_NAME
)$(NO_COLOR
)
74 ifneq ($$(MAKE_TARGET
),)
75 MSG_MAKE_TEST_ACTUAL
+= with target
$(BOLD
)$$(MAKE_TARGET
)$(NO_COLOR
)
78 MSG_MAKE_TEST
= $(eval
$(call GENERATE_MSG_MAKE_TEST
))$(MSG_MAKE_TEST_ACTUAL
)
79 MSG_TEST
= Testing
$(BOLD
)$(TEST_NAME
)$(NO_COLOR
)