bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] syntax-check rules to check for links in README


From: Jose E. Marchesi
Subject: [PATCH] syntax-check rules to check for links in README
Date: Mon, 05 Jun 2023 22:38:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

The GNU Coding Standards says:

     The 'README' file should refer to the file 'INSTALL', which should
  contain an explanation of the installation procedure.

     The 'README' file should also refer to the file which contains the
  copying conditions.  The GNU GPL, if used, should be in a file called
  'COPYING'.  If the GNU LGPL is used, it should be in a file called
  'COPYING.LESSER'.

I was failing to do so in GNU poke.
This patch adds two syntax-check rules to maint.mk.

diff --git a/ChangeLog b/ChangeLog
index b761ca3a8e..2430d20014 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-06-05  Jose E. Marchesi  <jemarch@gnu.org>
+
+       * top/maint.mk (sc_readme_link_install): New rule.
+       (sc_readme_link_copying): Likewise.
+
 2023-06-05  Bruno Haible  <bruno@clisp.org>
 
        posix_spawn-internal: Fix a warning (regression 2022-11-20).
diff --git a/top/maint.mk b/top/maint.mk
index 44f3db9d9d..88b3625dcb 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -1377,6 +1377,22 @@ sc_unportable_grep_q:
        @prohibit='grep -q' halt="unportable 'grep -q', use >/dev/null instead" 
\
          $(_sc_search_regexp)
 
+# The GNU Codying standards says that README should refer to both
+# INSTALL and the file that contains the copying conditions.  This
+# shall be COPYING for GPL and COPYING.LESSER for LGPL.
+
+sc_readme_link_install:
+       @require='INSTALL'                                      \
+       in_vc_files='$(top_srcdir)/README$$'                    \
+       halt='The README file should refer to INSTALL'          \
+         $(_sc_search_regexp)
+
+sc_readme_link_copying:
+       @require='COPYING'                                      \
+       in_vc_files='$(top_srcdir)/README$$'                    \
+       halt='The README file should refer to COPYING[.LESSER]' \
+         $(_sc_search_regexp)
+
 vc-diff-check:
        $(AM_V_GEN)(unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
        $(AM_V_at)if test -s vc-diffs; then                     \



reply via email to

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