[Top][All Lists]

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

[bug #22923] option to prevent "interspersed" output in parallel builds

From: Paul D. Smith
Subject: [bug #22923] option to prevent "interspersed" output in parallel builds
Date: Sat, 06 Sep 2008 03:50:17 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/2008072820 Firefox/3.0.1

Follow-up Comment #2, bug #22923 (project make):

It's not actually quite that simple, although it's do-able.  Make is not a
multi-threaded application, and so it cannot read from multiple streams at the
same time (such as stdin and stderr, either for a single job or for multiple
jobs) without a lot of complexity and potential loss of performance.

The only realistic way this could be done would be, as bkustel mentions,
redirecting the output of each job to a temporary file then printing the
contents of that file after the job is complete.  It would be necessary to
redirect both stdout and stderr for each job to one file and there's no way to
"mark" them, since make is not actually processing the output of the jobs.

Similarly, ijprest's idea of having make read lines and print them, prefixed
with a job number, cannot really be implemented by make itself for the reasons
mentioned in the first paragraph.

However, one idea would be a new special variable that defined a program that
job output would be piped to.  If that variable was set, then every time make
runs a job it would run this program and arrange for all stdout/stderr from
the job to be piped to the command line that was the value of that variable. 
It could have various format options that could optionally be provided, to
give a job number, the command being invoked, or whatever.  Then people could
provide their own script or program that did whatever they liked: stored the
output and printed it all at the end, or printed it line-by-line with a job
prefix, etc.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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