help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

colouring output


From: Mattijs Janssens
Subject: colouring output
Date: Fri, 2 May 2008 17:50:55 +0100
User-agent: KMail/1.9.5

I am using gmake to do parallel builds. It can be quite hard to find out which 
message comes from which source file so I would like to colour the output of 
every compilation.

I've currently hacked it by piping the output of individual compilations 
through a pipe which adds colour:

g++ ...  2>&1 | (while read line; do setterm -foreground XXX; echo "$line" ; 
done; setterm -foreground default)

where XXX is a colour which is different for every compilation. Works but
- is slow
- does not guarantee the output is in the correct colour; all the compilations 
are 'fighting' for the terminal.
- does not set the return value correctly.

Is it possible to do something like this inside gmake?

Regards,

Mattijs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]