automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Modernize, improve and/or extend tests `colon*.test.


From: Ralf Wildenhues
Subject: Re: [PATCH] Modernize, improve and/or extend tests `colon*.test.
Date: Sun, 8 Aug 2010 18:11:11 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

* Stefano Lattarini wrote on Sun, Aug 08, 2010 at 06:06:04PM CEST:
> At Sunday 08 August 2010, Ralf Wildenhues wrote:
> > No.  You save a fork with
> > 
> >   foo ()
> >   {
> >     ...
> >     foo_result=bar
> >   }
> > 
> >   foo ARG...
> >   test "$foo_result" = ...
> >
> Yes, but how do you get foo_result in our case? ;-)

With sed, of course.

> > which we've been doing a lot in Libtool and Autoconf lately.
> Yes, but using XSI variable substitutions and shell arithmetic, not 
> complex sed scripts.

That's not what I meant.  We are using more than one strategy to speed
up things.

> Or am I missing something?

I think you are.  You proposed
  result=`foo ...`
  test "$result" = ...

which is an extra fork over the above, regardless of what foo does
internally.

Cheers,
Ralf



reply via email to

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