[riot-notifications] [RIOT-OS/RIOT] makefiles/color: detect if writing to terminal. (#12127)

Juan I Carrano notifications at github.com
Wed Sep 4 13:54:48 CEST 2019

jcarrano commented on this pull request.

> @@ -8,12 +8,8 @@ COLOR_RESET  :=
 COLOR_ECHO   := /bin/echo
 ifeq ($(CC_NOCOLOR),)
-  available_colors:=$(shell tput colors 2> /dev/null)
-  ifeq ($(available_colors),)
-    CC_NOCOLOR = 1
-  else ifeq ($(available_colors),-1)
-    CC_NOCOLOR = 1
-  else ifeq ($(available_colors),0)

what is `TERM=at`? what problem is this trying to solve? I believe that doing a fancy terminal type detection magic is out of scope for the RIOT build system.

Why should `TERM=at` disable color? I do `TERM=at ls --color=auto` and color still shows up.

This PR does something simple, than can be implemented without resorting to external commands: "disable colors by default if writing to a pipe". This is only for convenience, for reliability, setting CC_NOCOLOR is required.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190904/bcf3809d/attachment.htm>

More information about the notifications mailing list