X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=top%2Fmaint.mk;h=59e9cb58ebdc39bd4239cc952c6aa4ad5173ae22;hb=542af6b9ca1011a9d304139cb8f5e7b6cf217c47;hp=644fbb6485f697627691a53b983d00031518f5c6;hpb=8b4add2c64d10b260c21352768e22d41dc9d2ff7;p=gnulib.git diff --git a/top/maint.mk b/top/maint.mk index 644fbb648..59e9cb58e 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -103,6 +103,12 @@ endif # 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. @@ -874,8 +880,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 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; \