bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH 2/4] maint.mk: expand the prohibit_doubled_word regex


From: Jim Meyering
Subject: Re: [PATCH 2/4] maint.mk: expand the prohibit_doubled_word regex
Date: Mon, 1 Aug 2016 07:57:04 -0700

On Fri, Jul 29, 2016 at 2:29 PM, Eric Blake <address@hidden> wrote:
> gnulib is still stuck in the old ways of GNU-style changelog entries
> where you call out the file and section touched, as in:
>
>         * maint.mk (prohibit_doubled_word): Pre-expand the regex to
>         avoid expensive perl regex backreferences.

Yes, but...

>> +prohibit_doubled_words_ = \
>> +    the then in an on if is it but for or at and do to
>> +# expand the regex before running the check to avoid using expensive 
>> captures
>> +prohibit_doubled_word_expanded_ = \
>> +    $(shell echo $(prohibit_doubled_words_) | sed -r 
>> 's/\b(\S+)\b/\1\\s\+\1/g')

sed -r is not portable, so please either take Eric's suggestion and
use GNU make functions or just use perl -pe in place of sed -r.
So you can take the opportunity of amending to adjust the commit log
and ChangeLog entry to conform.



reply via email to

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