[riot-notifications] [RIOT-OS/RIOT] makefiles/color: Add color functions, new attempt. (#12156)

Juan I Carrano notifications at github.com
Mon Sep 2 18:22:53 CEST 2019


### Contribution description

Using color output from within make currently involves wrappping text in a $(COLOR_X)...$(COLOR_RESET) block, which can easily result in forgetting the reset, and is also more verbose.

This PR adds c_xxxx functions can be used to wrap a piece of text in a $(COLOR_XXXX)...$(COLOR_RESET) block. Existing instances are fixed to use the new functions whenever possible.

### Testing procedure

Force erros, for example:

```
BOARD=samr21-xpro make -C tests/periph_qdec
```

### Issues/PRs references

Previous attempts #10405 
Depends on #12126 .

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/12156

-- Commit Summary --

  * makefiles/color: preprocess color strings.
  * makefiles/utils/ansi: Refactor ansi codes into their own file.
  * makefiles: remove usage of COLOR_ECHO.
  * makefiles: replace $(shell echo..) by $(info..) $(warning..)
  * makefiles/color: Add color functions.
  * makefiles: replace $(COLOR_X) by color function.

-- File Changes --

    M Makefile.include (33)
    M cpu/stm32_common/Makefile.include (11)
    M examples/usbus_minimal/Makefile (4)
    M makefiles/buildtests.inc.mk (6)
    M makefiles/color.inc.mk (26)
    M makefiles/docker.inc.mk (2)
    M makefiles/info-global.inc.mk (14)
    M makefiles/info.inc.mk (167)
    M makefiles/mcuboot.mk (9)
    M makefiles/scan-build.inc.mk (8)
    A makefiles/utils/ansi.mk (11)
    A makefiles/utils/ansi_special.mk (16)
    M tests/usbus_cdc_ecm/Makefile (4)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/12156.patch
https://github.com/RIOT-OS/RIOT/pull/12156.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12156
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190902/ebb27417/attachment.htm>


More information about the notifications mailing list