On Mon, 2023-06-05 at 22:38 +0200, Jose E. Marchesi wrote: > > 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 <[email protected]> > + > + * top/maint.mk (sc_readme_link_install): New rule. > + (sc_readme_link_copying): Likewise. > + > 2023-06-05 Bruno Haible <[email protected]> > > 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)
IIUC, this is Makefile syntax. If so, there should be semicolons `;' at the end of each line (but before the `\'). Otherwise, the shell will be passed "require='COPYING' in_vc_files='/path/to/top_srcdir/README$'..." all on one line. > + > vc-diff-check: > $(AM_V_GEN)(unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || : > $(AM_V_at)if test -s vc-diffs; then \ > Pierre Labastie, Linuxfromscratch editor
