[Dune] m4 cleanup
Elias Pipping
pipping.elias at googlemail.com
Fri Sep 11 14:26:31 CEST 2009
On Fri, Sep 11, 2009 at 1:55 PM, Christian Engwer <christi at uni-hd.de> wrote:
> Hi Elias,
>
> Let me pick out one example:
>
>> - if test "x$with_hostid" = "xno" ; then
>> - with_hostid="$ac_hostname (`uname -sm`, $COMPILER_NAME)";
>> - fi
>> + AS_IF([test "x$with_hostid" = "xno"],[
>> + with_hostid="$ac_hostname ($(uname -sm), $COMPILER_NAME)";
>> + ])
>
> You changed backticks to $(). $() is a bashism and `` is posix-sh. As
> the autotools create a sh-script and not bash I'm a little bit
> surprised. Does automake/autoconf replace these constructions?
> Otherwise I think `` is the safer way to do it. What was the reason
> for this particular change?
Hi,
indeed I forgot that $() are bash- and ksh-only. The problem w/
backticks is that they're special in m4.
`this is quoted in m4'
As a result, considering e.g.
dune_griddim.m4:42 variable_griddim="$``(``GRIDDIM``)``"
autom4te refuses to even continue parsing that file:
$ autom4te dune_griddim.m4
/usr/bin/m4:dune_griddim.m4:42: ERROR: end of file in string
autom4te-2.64: /usr/bin/m4 failed with exit status: 1
-- Elias
More information about the Dune
mailing list