[Top][All Lists]

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

Re: possible solution for -Otarget recurse (was: Re: Some serious issues

From: Paul Smith
Subject: Re: possible solution for -Otarget recurse (was: Re: Some serious issues with the new -O option)
Date: Sat, 04 May 2013 18:10:44 -0400

On Fri, 2013-05-03 at 12:55 -0400, Paul Smith wrote:
> Suppose we do this: if we're about to invoke a line marked recursive
> and we're in -Otarget mode, then before we run it we'll show the
> current contents of the temp file (using the normal synchronized
> output function).

I've implemented this feature and it seems to work as expected.  I also
implemented the fix to the duplicate output being shown in some cases.

I have two open issues I want to address before calling this feature
done: first, fix make's writing of the command it's going to run (for
rules that don't start with "@") as that's not working right.  Second,
fix the enter/leave issue.  It turns out that these are currently
somewhat bound together so I may have to solve the second one first.

Oh, and a renaming as well :-)

Eli, I did some cleanup in job.c to try to make things simpler and
reduce duplication.  I tried to be careful but it's quite possible I did
something to disrupt the Windows version again.  It's up to you if you
want to fix any problems now or wait until I solve the above two issues
and look at it all at the same time.  There will be more disruption I

One other thing: I changed the pump function to read from a FD but write
to a FILE*, because all our other uses of stdout/stderr use FILE* and
it's not wise to mix them.  It works fine.  While I was in there I
noticed the handling of the text/binary mode.  I wonder if this is not
quite right.  It seems to me that since we're going to be writing to
stdout/stderr anyway, if we're going to set the mode at all we should be
setting the mode on the temporary file to match the mode on
stdout/stderr, before we write to it, rather than setting the mode on
stdout/stderr to match the temporary file.

What do you think?

reply via email to

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