Eric Blake wrote: > On 03/24/2010 01:46 AM, Simon Josefsson wrote: >>> syntax-check test for this seems useful, to foster harmonization across >>> GNU packages. How about the patch below? >>> >>> I have no objection, certainly. >> >> I pushed the patch below. >> >> +# Don't use Texinfo @acronym{} as it is not a good idea. >> +sc_texinfo_acronym: >> + @grep -nE '@acronym{' \ >> + $$($(VC_LIST_EXCEPT) | grep -E '\.texi$$') && \ >> + { echo '$(ME): found use of Texinfo @acronym{}' 1>&2; \ >> + exit 1; } || : > > This hangs for non-GNU projects, like libvirt, that have no .texi > documentation. We really need to make progress on the patch to refactor > maint.mk rules per Jose's ideas: > http://lists.gnu.org/archive/html/bug-gnulib/2010-02/msg00242.html > which would conveniently fix this rule in the process.
IMHO, the disall...@acronym rule belongs in an optionally-enabled class of tests. Otherwise, I'll end up disabling it in nearly every package I maintain. I agree that it's not easy to maintain (esp if you don't automate checks for it), but I do find that using @acronym does add a tiny bit of useful mark-up, and it seems counter-productive to remove it globally. > Meanwhile, I noticed that the last email in that thread asked Jose to > change an unportable use of test -a. Perhaps we should migrate > libvirt's recent syntax check to cfg.mk, since it seems to be a > pervasive problem? > https://www.redhat.com/archives/libvir-list/2010-March/msg01127.html I agree. I'll push this shortly: >From e66265eb857cc371b66355618b721559a66c5138 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyer...@redhat.com> Date: Fri, 26 Mar 2010 09:04:29 +0100 Subject: [PATCH] maint.mk: prohibit use of test's -o and -a operators * top/maint.mk (sc_prohibit_test_minus_ao): New rule. --- ChangeLog | 6 ++++++ top/maint.mk | 8 ++++++++ 2 files changed, 14 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b11d62..a49cbcd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-03-26 Jim Meyering <meyer...@redhat.com> + Eric Blake <ebl...@redhat.com> + + maint.mk: prohibit use of test's -o and -a operators + * top/maint.mk (sc_prohibit_test_minus_ao): New rule. + 2010-03-25 Eric Blake <ebl...@redhat.com> maint: use pragma consistently across replacement headers diff --git a/top/maint.mk b/top/maint.mk index 09da20a..3e7ad32 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -590,6 +590,14 @@ sc_prohibit_S_IS_definition: msg='do not define S_IS* macros; include <sys/stat.h>' \ $(_prohibit_regexp) +_ptm1 = use "test C1 && test C2", not "test C1 -''a C2" +_ptm2 = use "test C1 || test C2", not "test C1 -''o C2" +# Using test's -a and -o operators is not portable. +sc_prohibit_test_minus_ao: + @re='\<test .+ -[ao] ' \ + msg='$(_ptm1); $(_ptm2)' \ + $(_prohibit_regexp) + # Each program that uses proper_name_utf8 must link with one of the # ICONV libraries. Otherwise, some ICONV library must appear in LDADD. # The perl -0777 invocation below extracts the possibly-multi-line -- 1.7.0.3.448.g82eeb