Re: .ONESHELL enhancement?

Ralf Wildenhues <[email protected]>
Newsgroups gmane.comp.gnu.make.devel
Organization Department of Numerical Simulation, University of Bonn
Message-ID <[email protected]>
* Matt McCutchen wrote on Mon, Oct 05, 2009 at 07:52:43AM CEST:
> On Mon, 2009-10-05 at 06:26 +0200, Ralf Wildenhues wrote:
> > Well, then we just have to agree to disagree on this.  I believe that
> > one goal of GNU programs is to avoid arbitrary limitations.  We have had
> > a bug report against Automake or Libtool (can't remember) where this
> > limit was actually hit on GNU/Linux.
> 
> Are you referring to this, which I found by Googling for `automake
> "argument list too long"':
> 
> http://osdir.com/ml/automake-gnu/2009-07/msg00053.html

That's on AIX.

> In any case, you've persuaded me that make should support the use of a
> pipe or temporary file.  I also note that the argument and temporary
> file are not interchangeable for all interpreters; for example, for a
> Haskell script, "ghc -e" wants a single IO action while "runghc" wants a
> module declaring a "main" IO action.  It would help in this case if the
> choice of an argument or temporary file were configurable in the
> makefile.  This feature then becomes orthogonal to .ONESHELL .

Sure.

> > > If there's any kind of length limitation with -c (whether from the shell
> > > or the OS), possible alternatives would include running $(SHELL) and
> > > piping the script to its stdin, or writing the script to a temporary
> > > file and running "$(SHELL) TMPFILE".
> > 
> > How come GNU make doesn't do this (on all systems) then?
> 
> Because it's slower, I imagine:

Well, do it only if the command line length would otherwise be exceeded,
of course.  That way you avoid any regressions that could stem from
detectability of the way it was invoked.

Cheers,
Ralf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.