maint.mk: ignore multi-line copyright in NEWS
authorEric Blake <ebb9@byu.net>
Wed, 6 Jan 2010 17:03:34 +0000 (10:03 -0700)
committerEric Blake <ebb9@byu.net>
Thu, 7 Jan 2010 03:20:22 +0000 (20:20 -0700)
The old algorithm did not work for projects like m4 that used
long-hand copyright years that wrapped lines.  Meanwhile, this
change has no impact to single-line copyrights, like coreutils.

Changing the rest of the footer, such as bumping from GFDL 1.2
to GFDL 1.3, will still require the developer to rerun
'make update-NEWS-hash' to get the hash back in sync, but that
is probably less frequent.

* top/maint.mk (NEWS_hash): Add immunity to multi-line copyright.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
top/maint.mk

index 715826f..d9e6c44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-01-06  Jim Meyering  <meyering@redhat.com>
+       and Eric Blake  <ebb9@byu.net>
+
+       maint.mk: ignore multi-line copyright in NEWS
+       * top/maint.mk (NEWS_hash): Add immunity to multi-line copyright.
+
 2010-01-06  Eric Blake  <ebb9@byu.net>
 
        select: add missing dependency
 2010-01-06  Eric Blake  <ebb9@byu.net>
 
        select: add missing dependency
index 40f306e..084a177 100644 (file)
@@ -550,7 +550,8 @@ sc_const_long_option:
 NEWS_hash =                                                            \
   $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p'             \
        $(srcdir)/NEWS                                                  \
 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\.\n//ms'       \
      | md5sum -                                                                \
      | sed 's/ .*//')
 
      | md5sum -                                                                \
      | sed 's/ .*//')