[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] use m4_require to implement AS_REQUIRE
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] use m4_require to implement AS_REQUIRE |
Date: |
Fri, 17 Oct 2008 14:19:40 +0200 |
User-agent: |
Thunderbird 2.0.0.17 (Macintosh/20080914) |
> It's still not perfect. This file is failing:
>
> AS_INIT
> foo=bar
> AS_VAR_PUSHDEF([tmp], [foo])
> AS_VAR_IF(tmp, [bar], [echo yes], [echo no])
> AS_VAR_POPDEF([tmp])
>
> because it is expanding _AS_TR_SH_PREPARE in the middle of AS_VAR_IF
> rather than hoisting it into M4SH-INIT right after _AS_CR_PREPARE:
That's related to tmp being underquoted, see the following even more
reduced testcase
AS_INIT
m4_defun([AS_DOIT], [: $1])
m4_define([tmp], [AS_TR_SH(foo)])
AS_DOIT(tmp)
=> : # Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%^_$as_cr_alnum%_%g'"
foo
AS_INIT
m4_defun([AS_DOIT], [: $1])
m4_define([tmp], [AS_TR_SH(foo)])
AS_DOIT([tmp])
=> # Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
: foo
Paolo