[Top][All Lists]

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

Re: patch to support output synchronization under -j

From: Paul Smith
Subject: Re: patch to support output synchronization under -j
Date: Tue, 03 May 2011 01:33:38 -0400

On Fri, 2011-04-15 at 16:57 +0300, Eli Zaretskii wrote:
> > Date: Fri, 15 Apr 2011 12:43:53 +0100
> > From: Tim Murphy <address@hidden>
> > 
> > I think it's an inevitable consequence that if you have a long-running
> > task then the output from it won't appear until it has completely
> > finished and you won't be able to watch the progress - in this scheme
> > there is no way to show "some" of the output whilst also ensuring that
> > it is not interspersed with output from other recipes.
> Well, if that's so, then this feature will be less useful than it
> could be, at least for me.  It reminds me of my DOS days, when running
> a compilation command from Emacs would show me the output only when
> the compiler was done.  I'm not happy to return to those "compiling
> blind" days.  Can something be done to alleviate this?

When I first read this it seemed to me that (a) there's no good way to
solve this, and (b) it's not so important anyway in most builds as
compiles are relatively quick.

But, I've been playing with a makefile that I have, that builds a
complete suite of GCC tools from scratch.  I'm building them on larger
systems with -j5 or -j10 (not much compared to what some are doing I
realize).  Sometimes these builds fail and it can be frustrating to see
what part of the build is failing.

But here's the thing: these makefiles are by their very nature massively
recursive.  Each top-level rule is an entire build of a major component
like gcc, binutils, gdb, bison, etc.  As far as I understand it, if I
were to enable this feature then all of the output from the entire build
of gcc (for example) would be collected into a file and not printed
until the entire sub-make had completed.

That's not very optimal.  Unless I missed something?

I wonder if we can figure out a way to make this work better, as Eli
asked.  Can we work out a way to handle "normal" rules (rules with "+"
or $(MAKE)) and "sub-make" rules differently, so that output from normal
rules wasn't collected behind a sub-make?  I'm not sure I see exactly
how this could work.

The other thing I was thinking is that this feature might want to be
enabled via a command-line argument.  All the complex makefiles
generated by automake, etc. for example cannot take advantage of this if
you have to modify every makefile to add the special target.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.mad-scientist.net
 "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]