autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] use m4_require to implement AS_REQUIRE


From: Eric Blake
Subject: Re: [PATCH] use m4_require to implement AS_REQUIRE
Date: Fri, 17 Oct 2008 06:28:05 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Paolo Bonzini on 10/17/2008 6:19 AM:
> That's related to tmp being underquoted, see the following even more
> reduced testcase
> 
> AS_INIT
> m4_defun([AS_DOIT], [: $1])
> m4_define([tmp], [AS_TR_SH(foo)])
> AS_DOIT(tmp)
> 
> => : # Sed expression to map a string onto a valid variable name.
>    as_tr_sh="eval sed 'y%*+%pp%;s%^_$as_cr_alnum%_%g'"
> 
>    foo

Thanks; that was what I was missing.  I'm trying to document and test
AS_VAR, and didn't realize that the temporary variable still needed
quoting until the last minute.  It turns out that the m4 temporary
variable created by AS_VAR_PUSHDEF must be expanded only at the outermost
level (diversions only work for outermost expansions; otherwise the text
is picked up by argument collection).  AS_VAR patch coming up soon, and
nothing more to see in this thread.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkj4hNUACgkQ84KuGfSFAYDXPQCeJ0tMUJ6RDJwUpMy1qnYVrOXJ
0EwAn1Kj8qiG03C64tRqqTUS+eZvvION
=IA2p
-----END PGP SIGNATURE-----




reply via email to

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