1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
Benjamin Valentin
b18b8e4f77 makefiles/color: fix build on NixOS
On NixOS, there is no `/bin/echo`, instead
`which echo` will return

    /home/benpicco/.nix-profile/bin/echo

so hard-coding the path will break here.

Use `/usr/bin/env` to get the path of `echo`.
This should be availiable on all systems at the same location.
2020-02-27 18:13:36 +01:00
Francisco Molina
b1ca4597ef makefiles/color.inc.mk: don't set CC_NOCOLOR
If CC_NOCOLOR was not set by the user it was set according to the
terminal support of colored output.

But since CC_NOCOLOR is also used to set `-fdiagnostics-color` flags
this means changing `CFLAGS` according to terminal support of colored
output.

This is not needed for `-fdiagnostics-color` since this option is by
default `auto` if the compiler supports colored output, and `auto`
means it will only use color when standard error is a terminal.
2020-01-10 08:58:54 +01:00
Juan Carrano
0d6a8879bc makefiles/color: detect if writing to terminal.
The current code for detecting whether colors should be used by default
was not working. Normally what programs such as git or grep do is check
if they are writing to a pipe.

To see the issue by yourself:

$ BOARD=samr21-xpro make -C tests/periph_qdec > I_SHOULD_NOT_HAVE_COLORS 2>&1

This commit uses MAKE_TERMOUT, MAKE_TERMERR and if ANY of them is NOT
a terminal, colors are disabled.
2019-08-30 16:35:25 +02:00
Xavier Clive
c6af3f733d make: Do not attempt to use color if the terminal cannot support it 2017-11-16 20:04:18 +01:00
daa277b36e make: refactor info- and buildtest targets 2017-09-14 13:15:53 +02:00