autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] trim down the size of the better-shell test


From: Eric Blake
Subject: Re: [PATCH] trim down the size of the better-shell test
Date: Tue, 14 Oct 2008 15:42:32 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Paolo Bonzini <bonzini <at> gnu.org> writes:

> 
> I decided that the size of the prolog was too much...  It's better to
> use variables for the common parts of the better-shell tests.  I also
> moved the 2>/dev/null into _AS_RUN, since we always do it.  This saves
> ~70 lines in the prolog.

Everything looks okay except...

>  m4_define([_AS_RUN],
> -[m4_ifval([$2],
> -[{ $2 <<\_ASEOF
> -_AS_BOURNE_COMPATIBLE
> -$1
> -_ASEOF
> -}],
> -[(eval "AS_ESCAPE(m4_expand([$1]))")])])
> +[m4_ifval([$2], [(echo "$as_bourne_compatible"$1 | $2)],
> +             [(eval $1)]) 2>/dev/null])

Is this guaranteed to be a portable use of echo?  The moment 
$as_bourne_compatible, $as_required, or $as_suggested contains a \, this could 
blow up on us.  It looks like $as_echo (used by AS_ECHO) is defined by this 
point, thanks to AS_SHELL_SANITIZE; will it always do the right thing?

-- 
Eric Blake







reply via email to

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