+2010-06-08 Peter Simons <simons@cryp.to>
+
+ maint.mk: make the news-check rule more configurable
+ * top/maint.mk (news-check-lines-spec) New variable.
+ (news-check): Use "sed -n 1,10p" in place of "head".
+
2010-06-07 Jim Meyering <meyering@redhat.com>
do-release-commit-and-tag: fix typo in --help
# Override this in cfg.mk if you are using a different format in your
# NEWS file.
today = $(shell date +%Y-%m-%d)
+
+# Select which lines of NEWS are searched for $(news-check-regexp).
+# This is a sed line number spec. The default says that we search
+# lines 1..10 of NEWS for $(news-check-regexp).
+# If you want to search only line 3 or only lines 20-22, use "3" or "20,22".
+news-check-lines-spec ?= 1,10
news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)'
# Prevent programs like 'sort' from considering distinct strings to be equal.
&& { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
news-check: NEWS
- if head $(srcdir)/NEWS | grep -E $(news-check-regexp) \
- >/dev/null; then \
+ if sed -n $(news-check-lines-spec)p $(srcdir)/NEWS \
+ | grep -E $(news-check-regexp) >/dev/null; then \
:; \
else \
echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \