autoconf
[Top][All Lists]
Advanced

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

Re: AC_CONFIG_FILES and chmod


From: Eric Blake
Subject: Re: AC_CONFIG_FILES and chmod
Date: Wed, 17 Jun 2009 06:00:13 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666

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

According to Eric Blake on 6/16/2009 2:19 PM:
> Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:
> 
>>> m4_esyscmd([for f in foo bar;
>>>         do echo "AC_CONFIG_FILES([$f],[chmod +x $f])"; done])
>>>
>>> Eric, is that safe?
> 
> No.  The echo statement didn't provide enough [] quoting, so you are in 
> effect 
> invoking:
> 
> AC_CONFIG_FILES(foo,chmod +x foo)
> AC_CONFIG_FILES(bar,chmod +x bar)

Aargh.  I spoke too soon.  If you want m4_esyscmd to result in a quoted
string with no further macro expansion, then yes this is underquoted.  But
in this case, you did want further macro expansion of AC_CONFIG_FILES.  So
I guess this was safe (although inefficient) after all.  But I still stand
by the statement that iteratively generating m4 text is best done in m4,
and not by dropping to a shell via esyscmd.

- --
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

iEYEARECAAYFAko42s0ACgkQ84KuGfSFAYBDgACfWw7fZmG3VKbFfWFMdibsvKb6
WooAn33giAz/TxjAgYckY4Yl9FAFEpyA
=A9JC
-----END PGP SIGNATURE-----




reply via email to

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