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: Paul Smith
Subject: Re: Some serious issues with the new -O option
Date: Fri, 03 May 2013 07:47:09 -0400

On Fri, 2013-05-03 at 09:50 +0300, Eli Zaretskii wrote:
> > From: Paul Smith <address@hidden>
> > Cc: address@hidden, address@hidden
> > Date: Thu, 02 May 2013 16:21:36 -0400
> > 
> > The one and only difference between them is that when running a
> > recursive make, -Otarget WILL NOT capture the output of the sub-make,
> > leaving whatever it prints going to the same stdout as the parent make,
> > and -Omake WILL capture the output of the sub-make in the temporary
> > file, to be dumped after the recipe is complete.
> 
> Thanks for explaining that.  I will have to try a few things to make
> sure I really get it this time, but one thing I can already say is
> that 'target' and 'make' are not very good names for these modes,
> since their semantics is quite different from the literal meaning of
> these two words.  That difference creates a semantic dissonance that
> we should try to avoid, I think.

It's good that we're having this discussion: I want to use it to try to
inform my editing of the GNU make manual to be sure it's as clear as
possible.

I don't think the names are so inaccurate.  I don't want to name things
based solely on the details of how they differ from one another, which
is all I was describing above.  I prefer to name them based on how their
most salient behavior manifests to the user.

The way the user experiences the -Ojob option's results is that the
output of every line of each recipe is dumped as soon as that line is
complete.

The way the user experiences the -Otarget option's results is that the
output of all the lines of a given target are dumped at the same time
once the target is completely built.

The way the user experiences the -Omake option's results is that the
output of an entire recursive make invocation is dumped, together, once
the recursive make has completed.

The issue of how -Otarget handles recursive make is, IMO, a detail
necessitated by the architecture of recursive make invocations.  I don't
know that it's feasible to reflect that detail in the name.

On the other hand I'm certainly not married to the current terms and I'm
quite happy to change them if better ones can be found.  It has already
been suggested that -Oline would be better than -Ojob, and -Orecipe
would be better than -Otarget, and -Omakefile would be better than
-Omake.  The current names are based more around _actions_ while the new
suggestions are based more around semantic elements of make.

To me -Omake is the most problematic.  -Omakefile is not much better; in
fact it might be worse (after all you can and often do invoke a
recursive make on the same makefile).  It would be nice to be more clear
about the fact it applies only to recursive make invocations.  Something
like -Osubmake might be more accurate, except that I don't think we use
the term "sub-make" in the documentation: we use "recursive make".  Is
-Orecursive better?




reply via email to

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