[Top][All Lists]

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

Re: maint.mk and NEWS footer

From: Eric Blake
Subject: Re: maint.mk and NEWS footer
Date: Wed, 6 Jan 2010 21:00:19 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Jim Meyering <jim <at> meyering.net> writes:

> > But I'm not fluent enough with sed to
> > quickly write a script that can sanitize both styles into a single 
> > line:
> >
> This should do it
>   perl -0777 -pe 's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.//ms'

Indeed - once we realize that maint.mk implies the presence of perl (the 
implication is indirect: use of maint.mk rules implies that a maintainer is 
doing something, but being a maintainer implies the presence of autoconf which 
implies perl), it is much easier to ditch sed and grep altogether.

>  NEWS_hash =                                                          \
>    $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p'           \
>         $(srcdir)/NEWS                                                
> -     | grep -v '^Copyright .*Free Software'                          \
> +     | perl -0777 -pe                                                
> +     's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.//ms'         \

Is it worth trying to merge the sed and grep into a single process?

> Then I realized that the patch above would probably be enough.
> The GFDL version number will not be changing often.

Fair enough.  So, do we apply your patch, or should I try testing/tweaking it 

Eric Blake

reply via email to

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