'GNU make: colorized output with $(info)?

Colorized output from the recipes with echo works fine. However, $(info) does not seem to work with the GNU make in sourceforge.net/projects/ezwinports/.

This is what I do. The weird characters are actual escapes, 0x1b. enter image description here

And this is what happens. There are left arrows printed instead of the escape characters, and the ANSI color sequence is printed to the console as plain text without processing. enter image description here

It works with the GNU make in Cygwin, MSYS, MinGW, GnuWin, with many versions from 3.86 to 4.3. Only the ezwinports version fails. enter image description here

Is there a better way to colorize the $(info) messages? Any idea why ezwinports behaves differently?



Solution 1:[1]

Found a solution:

$(shell echo 1>&2 -e "\e[31mThis is Red\e[0mThis is not")

Entering the esc chars directly in the text editor also works. Inserting as picture here because the esc are invisible otherwise:

enter image description here

A bit slower, but works with ezwinports and Chocolatey, too. Issue finally solved!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 vjalle