[Top][All Lists]

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

Re: How to output result in order in parallel mode?

From: Paul Smith
Subject: Re: How to output result in order in parallel mode?
Date: Sat, 25 Oct 2008 18:04:06 -0400

On Sat, 2008-10-25 at 16:30 -0500, Peng Yu wrote:
> In parallel mode (with -j option), the outputs from different rules
> are intermixed. I'm wondering if there is a way to order the outputs
> as if make is run in serial mode, but it should still achieve the
> speed of parallel mode.

There is no ability to do that in GNU make.

In order for this to work GNU make would need to create a temporary file
for every job that it invoked and redirect stdout and stderr to that
file when the job was started.  Then after the job finished, make would
have to read/print the contents of that file to its own stdout (the
distinction between stdout and stderr would be lost... unless there were
some other "helper" application that managed the distinction) and delete
the file.

In order for this to not slow down make processing, the read/print loop
would have to be integrated with make's normal job processing loop, so
that make wouldn't have to wait for a complete output file to be written
before it could start the next job.

And there are issues like handling ^C and cleaning up, etc. to be
 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]