>From 34abe8ff8a000f650b22935f36240d9acda66439 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Mon, 7 Jun 2010 15:24:21 +0200 Subject: [PATCH] Added news-check-lines-limit variable to determine the number of lines that the 'news-check' target inspects in order to find a heading for the current release's version number. The default value is "10". The variable can be overidden in cfg.mk. --- ChangeLog | 7 +++++++ top/maint.mk | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3eb9e3a..f8bcd47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-06-07 Peter Simons + + * top/maint.mk: Added news-check-lines-limit variable to determine + the number of lines that the 'news-check' target inspects in order + to find a heading for the current release's version number. The + default value is "10". The variable can be overidden in cfg.mk. + 2010-06-07 Jim Meyering do-release-commit-and-tag: fix typo in --help diff --git a/top/maint.mk b/top/maint.mk index 644fbb6..68c3407 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -104,6 +104,7 @@ endif # NEWS file. today = $(shell date +%Y-%m-%d) news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)' +news-check-lines-limit ?= 10 # 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. @@ -874,8 +875,8 @@ sc_makefile_at_at_check: && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || : news-check: NEWS - if head $(srcdir)/NEWS | grep -E $(news-check-regexp) \ - >/dev/null; then \ + if head -n $(news-check-lines-limit) $(srcdir)/NEWS \ + | grep -E $(news-check-regexp) >/dev/null; then \ :; \ else \ echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \ -- 1.7.1