coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[coreutils] [PATCH] maint: add a NEWS-checking syntax-check rule


From: Jim Meyering
Subject: [coreutils] [PATCH] maint: add a NEWS-checking syntax-check rule
Date: Sun, 14 Nov 2010 17:47:58 +0100

Here's a trivial syntax check rule that I'll be using in a few projects.
Without this, it's too easy to forget the guideline that says
we prefer to use two empty lines to separate per-version sections.

>From 23dbe438fd4c6a15281a1dc938a6b2682c48f677 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 14 Nov 2010 10:16:27 +0100
Subject: [PATCH] maint: add a NEWS-checking syntax-check rule

* cfg.mk (sc_NEWS_two_empty_lines): New syntax-check rule.
---
 cfg.mk |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 7651ab2..8b3670c 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
--
1.7.3.2.4.g60aa9



reply via email to

[Prev in Thread] Current Thread [Next in Thread]