[Top][All Lists]
[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 17:55:07 +0200 |
User-agent: |
Mutt/1.5.20 (2010-04-22) |
* Stefano Lattarini wrote on Sun, Aug 08, 2010 at 05:48:58PM CEST:
> At Sunday 08 August 2010, Ralf Wildenhues wrote:
> > * Stefano Lattarini wrote on Sun, Aug 08, 2010 at 05:35:57PM CEST:
> > > foo=`extract_makefile_deps tgt2 Makefile`; echo x"$foo"x
> > More or less, yes. I'd avoid the command substitution fork by
> > letting extract_makefile_deps set some variable instead of
> > printing.
> So the we'd have move the comamnd substitution inside the function?
> ;-)
No. You save a fork with
foo ()
{
...
foo_result=bar
}
foo ARG...
test "$foo_result" = ...
which we've been doing a lot in Libtool and Autoconf lately. Since it's
not quite as intuitive, an alternative is
foo ()
{
...
eval "$1=bar_suitably_escaped"
}
foo result_var ARG...
test "$result_var" = ...
Cheers,
Ralf
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Stefano Lattarini, 2010/08/05
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Ralf Wildenhues, 2010/08/08
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Stefano Lattarini, 2010/08/08
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Ralf Wildenhues, 2010/08/08
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Stefano Lattarini, 2010/08/08
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Ralf Wildenhues, 2010/08/08
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Stefano Lattarini, 2010/08/08
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Ralf Wildenhues, 2010/08/08
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Stefano Lattarini, 2010/08/08
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test.,
Ralf Wildenhues <=
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Stefano Lattarini, 2010/08/08
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Ralf Wildenhues, 2010/08/08
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Stefano Lattarini, 2010/08/08
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Ralf Wildenhues, 2010/08/08
- Re: [PATCH] Modernize, improve and/or extend tests `colon*.test., Stefano Lattarini, 2010/08/08
- avoiding forks in shell scripts (was: [PATCH] Modernize, improve and/or extend tests `colon*.test.), Ralf Wildenhues, 2010/08/08
- Re: avoiding forks in shell scripts (was: [PATCH] Modernize, improve and/or extend tests `colon*.test.), Stefano Lattarini, 2010/08/08