autoconf-archive-maintainers
[Top][All Lists]
Advanced

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

Re: AX_APPEND_FLAG changed behaviour


From: Bastien ROUCARIES
Subject: Re: AX_APPEND_FLAG changed behaviour
Date: Fri, 6 Feb 2015 18:48:56 +0100

On Fri, Feb 6, 2015 at 2:09 PM, Peter Simons <address@hidden> wrote:
> Hi Peter,
>
> Bastien Roucari├Ęs changed the macro recently to modernize its use of
> Autoconf [1]. I'm adding him to Cc to make sure he's aware of your
> question:
>
>> Hello,
>>
>> I noticed that in the most recent version of the archive, AX_APPEND_FLAG
>> has changed behaviour and does add the FLAG also when the variable
>> contains FLAG. I traced down the altered behaviour to the two lines
>>
>>  [case " AS_VAR_GET(FLAGS) " in
>>     *" $1 "*)
>>
>> which have changed to
>>
>>   AS_CASE([AS_VAR_GET(FLAGS)],
>>     ["* $1 *|*$1"]
>>
>> besides that AS_CASE is used (which is good imho) the pattern has
>> changed and the space around FLAGS in the first argument of AS_CASE has
>> gone. This means that e.g. if FLAGS is "alpha beta gamma" that will not
>> match the pattern "* $1 *|*$1" for $1 being any of 'alpha', 'beta', or
>> 'gamma'. I think that is unexpected behaviour.

I added the or case because it add something when pattern is at end.
Previously it add flag alpha when flag contains "beta alpha". I have
fuxed this problem but introduced a regression

Could you made a patch for review ?



>> Easiest would be to just move back to the old pattern, but wanted to
>> check if there was any reason for the modification, in which case we
>> perhaps can come up with something better.
>>
>> Thank,
>> Peter
>
> Best regards,
> The other Peter
>
>
> [1] https://github.com/peti/autoconf-archive/blame/master/m4/ax_append_flag.m4



reply via email to

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