[riot-commits] [RIOT-OS/RIOT] 0d6a88: makefiles/color: detect if writing to terminal.

Francisco noreply at github.com
Fri Sep 6 14:40:57 CEST 2019


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 0d6a8879bc9f2e3dbae8e2ee788400cf0c365c4b
      https://github.com/RIOT-OS/RIOT/commit/0d6a8879bc9f2e3dbae8e2ee788400cf0c365c4b
  Author: Juan Carrano <j.carrano at fu-berlin.de>
  Date:   2019-08-30 (Fri, 30 Aug 2019)

  Changed paths:
    M makefiles/color.inc.mk

  Log Message:
  -----------
  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.


  Commit: e2c91639ea47abea1bddf07c97e3e8a036b1200c
      https://github.com/RIOT-OS/RIOT/commit/e2c91639ea47abea1bddf07c97e3e8a036b1200c
  Author: Francisco <francois-xavier.molina at inria.fr>
  Date:   2019-09-06 (Fri, 06 Sep 2019)

  Changed paths:
    M makefiles/color.inc.mk

  Log Message:
  -----------
  Merge pull request #12127 from jcarrano/color-detect-terminal

makefiles/color: detect if writing to terminal.


Compare: https://github.com/RIOT-OS/RIOT/compare/9ca842c226fb...e2c91639ea47


More information about the commits mailing list