[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with ifelse
From: |
Eric Blake |
Subject: |
Re: problem with ifelse |
Date: |
Thu, 05 Mar 2009 22:17:22 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Vincent Torri on 3/5/2009 8:33 AM:
>
> Hey,
>
> thanks for all the typo. Unfortunately, we want to support old versions
> of the autotools, so i will have to check that the m4 macro are not too
> recent.
Most of the m4sugar macros I referred to are quite old. The nice thing
about git development is that it is easy to find when something was
introduced. For example, m4_toupper was only mentioned in two commit
messages:
$ git log --pretty=oneline --abbrev-commit --grep=m4_toupper
lib/m4sugar/m4sugar.m4 | cat
987a333... Another round of regex avoidance.
b60b89e... * m4sugar.m4: (m4_tolower, m4_toupper): New macros. *
acgeneral.m4 (AC_PREFIX_PROGRAM): Use m4_toupper(). * aclang.m4
(AC_F77_FUNC): Use m4_toupper()/m4_tolower().
Then you can determine which versions those correspond to:
$ git describe --tags b60b89e
post-exp-merge-1999-10-31-794-gb60b89e
$ git describe --tags --contains b60b89e
autoconf-2.50~531
So m4_toupper has been around 531 commits before autoconf 2.50.
>
> For me, ifelse([$2], [no], [part1], [part2]) executes part1 if $2 is the
> same than the string "no", and executes part2 otherwise. But whatever
> the value of $2 is (in my cases, $2 is "yes" or "no", it is always part2
> that is executed.
Have you tried using the tracing utilities? Could you post a snippet
where you are actually invoking ECORE_CHECK_MODULE, to make sure there
aren't any obvious typos in how you called it?
> and what to do with m4_pushdef if i want to transform - to _. For example, I
> use this:
>
> pushdef([UP], translit([$1], [-a-z], [_A-Z]))dnl
> pushdef([DOWN], translit([$1], [-A-Z], [_a-z]))dnl
[m4_]translit expands its result, so the safest approach is to
double-quote the first argument in preparation for the later expansion. I
would write this as:
m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
- --
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
iEYEARECAAYFAkmwseIACgkQ84KuGfSFAYBeRQCgvT3cwz6HWyE7vJRdA4AN/5kK
iMcAn0tgE7VuF2fcH8/aKTYhiN0vuxJD
=ZkGF
-----END PGP SIGNATURE-----
Re: problem with ifelse, Vincent Torri, 2009/03/05