2017-11-11 15:56:55 +01:00
|
|
|
# Set colored output control sequences if the terminal supports it and if
|
|
|
|
# not disabled by the user
|
|
|
|
|
2017-09-09 00:06:29 +02:00
|
|
|
COLOR_GREEN :=
|
|
|
|
COLOR_RED :=
|
|
|
|
COLOR_PURPLE :=
|
|
|
|
COLOR_RESET :=
|
|
|
|
COLOR_ECHO := /bin/echo
|
|
|
|
|
2020-01-10 08:40:00 +01:00
|
|
|
# Check if colored output is not disabled by user, i.e: CC_NOCOLOR unset
|
|
|
|
# or 0
|
|
|
|
ifneq ($(CC_NOCOLOR),1)
|
2019-08-30 16:30:41 +02:00
|
|
|
IS_TERMINAL = $(if $(MAKE_TERMOUT),$(MAKE_TERMERR),)
|
2020-01-10 08:40:00 +01:00
|
|
|
# Check if terminal support colored output
|
|
|
|
ifneq ($(IS_TERMINAL),)
|
|
|
|
COLOR_GREEN := \033[1;32m
|
|
|
|
COLOR_RED := \033[1;31m
|
|
|
|
COLOR_YELLOW := \033[1;33m
|
|
|
|
COLOR_PURPLE := \033[1;35m
|
|
|
|
COLOR_RESET := \033[0m
|
|
|
|
ifeq ($(OS),Darwin)
|
|
|
|
COLOR_ECHO := echo -e
|
|
|
|
SHELL=bash
|
|
|
|
else
|
|
|
|
COLOR_ECHO := /bin/echo -e
|
|
|
|
endif
|
2017-09-09 00:06:29 +02:00
|
|
|
endif
|
|
|
|
endif
|