summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-11-14 10:16:27 +0100
committerJim Meyering <meyering@redhat.com>2010-11-17 20:48:56 +0100
commit01a27b90546197c43da4b51b6eedabd7d9c349ea (patch)
treecdc8292fc6299d10645137916262540e609277a1
parent79adacc43178916392af3dd581ded87f3aea1655 (diff)
downloadcoreutils-01a27b90546197c43da4b51b6eedabd7d9c349ea.tar.xz
maint: add a NEWS-checking syntax-check rule
* cfg.mk (sc_NEWS_two_empty_lines): New syntax-check rule.
-rw-r--r--cfg.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/cfg.mk b/cfg.mk
index 7651ab26f..8b3670c93 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -164,6 +164,13 @@ sc_man_file_correlation:
@$(MAKE) -s -C src all_programs
@$(MAKE) -s -C man $@
+# Ensure that the end of each release's section is marked by two empty lines.
+sc_NEWS_two_empty_lines:
+ @sed -n 4,/Noteworthy/p $(srcdir)/NEWS \
+ | perl -n0e '/(^|\n)\n\n\* Noteworthy/ or exit 1' \
+ || { echo '$(ME): use two empty lines to separate NEWS sections' \
+ 1>&2; exit 1; } || :; \
+
# Perl-based tests used to exec perl from a #!/bin/sh script.
# Now they all start with #!/usr/bin/perl and the portability
# infrastructure is in tests/Makefile.am. Make sure no old-style