colouring output

View: New views
1 Messages — Rating Filter:   Alert me  

colouring output

by Mattijs Janssens :: Rate this Message:

| View Threaded | Show Only this Message

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


_______________________________________________
Help-make mailing list
Help-make@...
http://lists.gnu.org/mailman/listinfo/help-make