1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-28 23:29:45 +01:00

makefiles/color: Add color functions.

c_xxxx functions can be used to wrap a piece of text in a
$(COLOR_X)...$(COLOR_RESET) block, thereby avoiding the easy mistake
of forgetting to place a COLOR_RESET.
This commit is contained in:
Juan Carrano 2019-09-02 17:57:42 +02:00 committed by Francisco Molina
parent 1036115f2d
commit 9fe8f54db9
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8

View File

@ -27,3 +27,11 @@ ifneq ($(CC_NOCOLOR),1)
endif
endif
endif
# Colorizer functions:
# These functions wrap a block of text in $(COLOR_X)...$(COLOR_RESET).
# Do not nest calls to this functions or the colors will be wrong.
c_green = $(COLOR_GREEN)$(1)$(COLOR_RESET)
c_red = $(COLOR_RED)$(1)$(COLOR_RESET)
c_yellow = $(COLOR_YELLOW)$(1)$(COLOR_RESET)
c_purple = $(COLOR_PURPLE)$(1)$(COLOR_RESET)