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 recognizable > > 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 further? -- Eric Blake