You are not logged in.

#1 2019-03-24 21:17:00

lemarin
Member
Registered: 2019-03-24
Posts: 3

[SOLVED] echo in make does not behave has it should

Hello,

I have, in some of my makefiles, echo commands that display colored text, but when i run the makefile the colors are not displayed, and the escape sequence is printed instead. The same echo command straight out the terminal displays the colors just fine. Any idea where that could come from?

https://i.imgur.com/wsY28e8.png

I also have troubles with a project using the termcap library and i wondered if both could be linked...

My $TERM is set to screen-256color, i use kitty terminal, but I have the same issue in Konsole and gnome terminal

let me know if you need more information,

thanks you!



moderator edit -- replaced oversized image with link.
Pasting pictures and code

Last edited by lemarin (2019-03-25 07:44:07)

Offline

#2 2019-03-24 21:31:19

loqs
Member
Registered: 2014-03-06
Posts: 18,463

Re: [SOLVED] echo in make does not behave has it should

lemarin wrote:

The same echo command straight out the terminal displays the colors just fine.

type echo

Please change the image to a link it is slightly too large in pixels Code_of_conduct#Pasting_pictures_and_code.

Offline

#3 2019-03-24 21:53:48

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,370
Website

Re: [SOLVED] echo in make does not behave has it should

As the above should reveal, you must have a function/alias for echo, or perhaps you have some niche shell (fish?) that has a nonstandard echo builtin.  As written, that command should not produce color output, you'd need to add te '-e' flag.

Add the '-e' flag, or use printf instead.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2019-03-25 07:42:09

lemarin
Member
Registered: 2019-03-24
Posts: 3

Re: [SOLVED] echo in make does not behave has it should

Thank you! I should have thought about that... Have a nice day

Offline

Board footer

Powered by FluxBB