[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fix tar bootstrap
From: |
Eric Blake |
Subject: |
Re: fix tar bootstrap |
Date: |
Fri, 11 Jul 2008 01:03:59 +0000 |
Bruno asked:
> So, the general rule is: If a macro FOO is defined through m4_define or
> m4_pushdef, then to get its value *without further evaluations or
> interpretation*
> one needs to write
>
> ...]m4_defn([FOO])[...
>
> not
>
> ...]FOO[...
>
> Is that right?
Yes. Or put another way, m4_defn is the only safe way to
retrieve the contents of a macro used to store arbitrary text. You
can optimize and use macro invocation if you are sure that
the macro's contents will not contain $, quotes, comments,
or further macro names (as is the case with the neighboring
usage of gl_LIBSOURCES_LIST, since we control the file
names that get committed into gnulib.git).
And even then, if you have m4_changequote currently set to
anything other than the normal [], then m4_defn might still
suffer from interpolation of the macro's definition according
to the changed quoting rules (yet another reason why the
autoconf manual discourages the use of m4_changequote).
--
Eric Blake