maintainer-makefile: allow customization of NEWS entry format
authorAlfred M. Szmidt <ams@gnu.org>
Sat, 5 Dec 2009 04:27:40 +0000 (21:27 -0700)
committerEric Blake <ebb9@byu.net>
Sat, 5 Dec 2009 05:11:32 +0000 (22:11 -0700)
* top/maint.mk (news-date-regexp): New overridable variable.
(news-date-check): Use it.

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

index 48e1026..bba40ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-12-04  Alfred M. Szmidt  <ams@gnu.org>
+
+       maintainer-makefile: allow customization of NEWS entry format
+       * top/maint.mk (news-date-regexp): New overridable variable.
+       (news-date-check): Use it.
+
 2009-12-04  Eric Blake  <ebb9@byu.net>
 
        mgetgroups: add xgetgroups, and avoid ENOSYS failures
index c3fab9a..a7e31f0 100644 (file)
@@ -77,6 +77,10 @@ else
 url_dir_list ?= ftp://$(gnu_rel_host)/gnu/$(PACKAGE)
 endif
 
+# Override this in cfg.mk if you are using a different format in your
+# NEWS file.
+news-date-regexp ?= '^\*.* $(VERSION_REGEXP) ('$$today')'
+
 # Prevent programs like 'sort' from considering distinct strings to be equal.
 # Doing it here saves us from having to set LC_ALL elsewhere in this file.
 export LC_ALL = C
@@ -570,7 +574,7 @@ sc_makefile_check:
 
 news-date-check: NEWS
        today=`date +%Y-%m-%d`;                                         \
-       if head $(srcdir)/NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \
+       if head $(srcdir)/NEWS | grep $(news-date-regexp)               \
            >/dev/null; then                                            \
          :;                                                            \
        else                                                            \