autoconf
[Top][All Lists]
Advanced

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

Re: m4_pattern_forbid matches itself


From: Phil Edwards
Subject: Re: m4_pattern_forbid matches itself
Date: Thu, 24 Jul 2003 15:50:40 -0400
User-agent: Mutt/1.5.3i

On Thu, Jul 24, 2003 at 02:44:12PM -0500, Raja R Harinath wrote:
> 
> That's strange.  It is implemented by a grep.
> 
>       foreach (split (/\W+/))
>         {
>           $prohibited{$_} = $.
>             if /$forbidden/o && !/$allowed/o && ! exists $prohibited{$_};
>         }

Where is this code?  On my system, /usr/bin/m4 is a binary, not a perl
script.  :-)  I've been trying to dig to learn more, but haven't yet
retrieved the m4 source.


> > Any other ideas?  The few examples of m4_pattern_forbid I've seen all
> > seem to be matching isolated words, e.g., m4_pattern_forbid([^FOO$]),
> > which clearly won't help for trying to match part of a variable name.
> 
> Given the splitting above on \W, that shouldn't be a problem.

I've been trying variations on

    m4_pattern_forbid([\${?target_alias\>],
                      [target alias is not what you think it is])

    this_is_a_use_of=foo/$target_alias/bar
    this_is_another_use_of=foo/${target_alias}/bar

with additional [] quoting, more backslashes on the $, etc, etc, etc.
Nothing /ever/ generates an error other than the plain simple

    m4_pattern_forbid([target_alias], ...)

which only reports its own line in the error text.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams




reply via email to

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