mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #13071 from fjmolinas/pr_fix_CC_NOCOLOR_compiler
makefiles/color.inc.mk: don't set CC_NOCOLOR to avoid setting CFLAGS
This commit is contained in:
commit
0b1a1d13ff
@ -15,7 +15,7 @@ OPTIONAL_CFLAGS += -fno-delete-null-pointer-checks
|
|||||||
|
|
||||||
# Use colored compiler output if the compiler supports this and if this is not
|
# Use colored compiler output if the compiler supports this and if this is not
|
||||||
# disabled by the user
|
# disabled by the user
|
||||||
ifeq ($(CC_NOCOLOR),0)
|
ifneq ($(CC_NOCOLOR),1)
|
||||||
OPTIONAL_CFLAGS += -fdiagnostics-color
|
OPTIONAL_CFLAGS += -fdiagnostics-color
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -7,25 +7,22 @@ COLOR_PURPLE :=
|
|||||||
COLOR_RESET :=
|
COLOR_RESET :=
|
||||||
COLOR_ECHO := /bin/echo
|
COLOR_ECHO := /bin/echo
|
||||||
|
|
||||||
ifeq ($(CC_NOCOLOR),)
|
# Check if colored output is not disabled by user, i.e: CC_NOCOLOR unset
|
||||||
|
# or 0
|
||||||
|
ifneq ($(CC_NOCOLOR),1)
|
||||||
IS_TERMINAL = $(if $(MAKE_TERMOUT),$(MAKE_TERMERR),)
|
IS_TERMINAL = $(if $(MAKE_TERMOUT),$(MAKE_TERMERR),)
|
||||||
ifeq ($(IS_TERMINAL),)
|
# Check if terminal support colored output
|
||||||
CC_NOCOLOR = 1
|
ifneq ($(IS_TERMINAL),)
|
||||||
else
|
COLOR_GREEN := \033[1;32m
|
||||||
CC_NOCOLOR = 0
|
COLOR_RED := \033[1;31m
|
||||||
endif
|
COLOR_YELLOW := \033[1;33m
|
||||||
endif
|
COLOR_PURPLE := \033[1;35m
|
||||||
|
COLOR_RESET := \033[0m
|
||||||
ifeq ($(CC_NOCOLOR),0)
|
ifeq ($(OS),Darwin)
|
||||||
COLOR_GREEN := \033[1;32m
|
COLOR_ECHO := echo -e
|
||||||
COLOR_RED := \033[1;31m
|
SHELL=bash
|
||||||
COLOR_YELLOW := \033[1;33m
|
else
|
||||||
COLOR_PURPLE := \033[1;35m
|
COLOR_ECHO := /bin/echo -e
|
||||||
COLOR_RESET := \033[0m
|
endif
|
||||||
ifeq ($(OS),Darwin)
|
|
||||||
COLOR_ECHO := echo -e
|
|
||||||
SHELL=bash
|
|
||||||
else
|
|
||||||
COLOR_ECHO := /bin/echo -e
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user