autoconf
[Top][All Lists]
Advanced

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

Re: test in a m4 macro and variable created from pushdef


From: Eric Blake
Subject: Re: test in a m4 macro and variable created from pushdef
Date: Thu, 09 Aug 2007 21:34:14 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666

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

According to Benoit SIGOURE on 8/9/2007 9:20 PM:
>>>
>>> AM_CONDITIONAL(BUILD_DRIVER_[]UP, test "x${use_]DOWN[}" = "xyes")
>>
>>
>> AM_CONDITIONAL([BUILD_DRIVER_[]UP, test "x${use_[]DOWN}" = "xyes"])
> 
> Hum, shouldn't this be:
> AM_CONDITIONAL([BUILD_DRIVER_[]UP], [test "x${use_[]DOWN}" = "xyes"])
> instead?

Needless to say, I only typed a quick answer, rather than trying to test
it.  There are two arguments to AM_CONDITIONAL, so both should be quoted.
 Then you have a choice:
  AM_CONDITIONAL([BUILD_DRIVER_[]UP], [...])
calls AM_CONDITIONAL with a string for the first argument; wherever
AM_CONDITIONAL outputs that string, the string is subject to reparsing,
and it is the reparsing that sees that UP is a macro.

  AM_CONDITIONAL([BUILD_DRIVER_]UP, [...])
calls AM_CONDITIONAL with a string consisting of UP already expanded (ok
if UP is alphanumeric, but with the potential for m4 syntax confusion if
it contains anything in the character class [][,()].

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

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

iD8DBQFGu9y284KuGfSFAYARAk8wAJ9aGF9dkAOWQxwIIX83jZ1xL5CecwCfaJ0s
vkpGTPWH/riKk5CxuBsVeWM=
=2liC
-----END PGP SIGNATURE-----




reply via email to

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