[riot-notifications] [RIOT-OS/RIOT] makefiles: refactor the coloring and the use of echo. (#12126)

Juan I Carrano notifications at github.com
Tue Sep 10 11:25:27 CEST 2019


Maybe I should explain a bit more what all of this achieves. Current issues, solved by this PR:

- Currently one has to know if a string has colors or not, to know if normal echo/$(info ..)/$(warning ..) can be used or $(COLOR_ECHO)
- A terminal can support ANSI colors, but not have a "echo -e".
- COLOR_ECHO is confusing- it is needed when _any_ escape sequence is used (e.g. \t, \n), not only colors.
- Requiring "echo -e" to show colors means that $(info ..), $(warning ..) cannot be used.
  - They are the natural way of generating output  in a makefile.
  - Warning reports the origin of the message.
- $(shell echo ...) calls have quite some overhead (like all $(shell ...) invocations).
  - Same thing for "@echo" in recipes. Remember each line in a recipe is a _new_ shell.


-- 
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/12126#issuecomment-529852065
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190910/893363a1/attachment.htm>


More information about the notifications mailing list