bug-make
[Top][All Lists]
Advanced

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

Re: Some serious issues with the new -O option


From: Tim Murphy
Subject: Re: Some serious issues with the new -O option
Date: Thu, 2 May 2013 12:25:59 +0100

One optimisation I have thought of in the past for this situation would be to allow a single "job"  to hold onto the lock when it obtained it.

This way it could output directly to the console while all other jobs would have to buffer. When it released, the next job lucky enough to grab the lock might have a full buffer already.

It might appear to be less choppy.  Not sure how it would perform.

Regards,

Tim


On 2 May 2013 03:53, Eli Zaretskii <address@hidden> wrote:
> From: Paul Smith <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Wed, 01 May 2013 16:27:58 -0400
>
> If your recipe normally runs for 5 seconds (say) and it continually
> generates output during that time, then yes, certainly the -O feature
> will result in choppiness because instead of a sequence of continuous
> output over 5 seconds you get 5 seconds of silence, followed by all the
> output.

I think that's the reason, yes.

> Consider if you have a makefile, like every single automake makefile for
> example!, where the "top-level" target is nothing more than a recursive
> invocation of a sub-make with some extra arguments, and the sub-make
> actually does all the work:
>
>    all: config.h
>            $(MAKE) $(AM_MAKEFLAGS) all-recursive
>
> Now, if you do nothing special for recursive make, you'll get no output
> from the entire build until it is completely done, because all the
> output from the recursive make command is going to the temporary file
> for that target, then it all gets dumped at the same time.

Not every Makefile looks like that on its top level.  I agree that we
should cater to the above, but perhaps we could do that without
"punishing" the other use cases.  For example, perhaps we should have
a -Osub-make option that will _not_ activate sync-output on the top
level, only in the sub-make's.  This should produce the desired
results, I think.

> > shouldn't we have an option _not_ to make such an exception, but
> > without -Omake, i.e. without waiting for the whole session to end?
> > Whenever any top-level recipe finishes, it is flushed to the
> > screen as a single unit.  Does this make sense?
>
> I don't understand the change that you're suggesting.  That's exactly
> what -Omake does today: whenever any recipe finishes it is flushed to
> the screen as a single unit, and no special handling is given to
> recursive makes.

In my case, I see all the output at once.  Maybe I misunderstand what
-Omake is supposed to do, too.

_______________________________________________
Bug-make mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-make



--
You could help some brave and decent people to have access to uncensored news by making a donation at:

http://www.thezimbabwean.co.uk/friends/

reply via email to

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