[Top][All Lists]

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

Re: Making output of make more beautiful

From: Paul Smith
Subject: Re: Making output of make more beautiful
Date: Wed, 10 Jun 2009 08:22:51 -0400

On Wed, 2009-06-10 at 14:04 +0200, Vincent Torri wrote:
> Is it possible to add 2 features :
> 1) adding a percentage at the beginning of the line

People often ask for this, but it's not possible: a percentage of what?
The way make works, it has absolutely no idea how much work there is
left to do.  Make does not plan out all the operations it needs to run,
then start working on them: rather, it knows what it wants to build and
it works on it one step at a time until there are no more steps to take.
But when it's working on step 5 it has no idea if there is one step
left, or 100.  So computing a "percent complete" cannot be done.

Certainly there's no way automake can do this.

> 2) displaying the lines with a color according to what is done 
> (compilation, execution or error)

Today, make does no processing on the output of the commands it invokes:
they just write directly to stdout, so colorizing error or warning
messages by make is not possible.  This feature could conceivably be
added (in fact, there are even more legitimate reasons for make to
process job output than colorization: when make invokes parallel builds
the output from the parallel jobs is today all jumbled together which
makes it difficult to read: there are enhancement requests to allow the
output to be buffered then displayed all at once when the command

The colorization of different types of rules (rather than output) is
most easily accomplished by automake, by adding that directly to the

However, both of these could also be, and are perhaps most easily,
accomplished via an extra "colorization" tool, where the output of make
is piped into this tool which reads stdin, colorizes it, then displays
it.  This saves a lot of effort and change in make and automake and
provides a clean and much more easily modifiable colorization

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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