From: Zack Weinberg Date: Sun, 12 Mar 2023 20:59:27 +0000 (-0400) Subject: Fix ‘make syntax-check’ complaints. X-Git-Tag: v2.72c~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e0681c50ac3cd2a3cad2395e2691868a3dea1b12;p=thirdparty%2Fautoconf.git Fix ‘make syntax-check’ complaints. * cfg.mk (local-checks-to-skip): Add sc_unportable_grep_q, which has too many false positives to bother with; for instance, it triggers on autoconf.texi’s discussion of why grep -q is unportable, and on the code in maint.mk that implements the check! (old_NEWS_hash): Update for commit b751bf49496ea3f0054533cfd63f977640abb07a, which fixed spelling errors in old NEWS. * doc/autoconf.texi: Remove a doubled word. * lib/autoconf/programs.m4: Remove a space immediately before a tab. * lib/m4sugar/m4sh.m4 (_AS_IF): Rephrase documentation to avoid saying “if IF-FALSE” which triggers the prohibit_doubled_word check. --- diff --git a/cfg.mk b/cfg.mk index 42827eb93..aef751a64 100644 --- a/cfg.mk +++ b/cfg.mk @@ -63,8 +63,8 @@ local-checks-to-skip ?= \ sc_prohibit_always_true_header_tests \ sc_prohibit_magic_number_exit \ sc_prohibit_stat_st_blocks \ - sc_unmarked_diagnostics - + sc_unmarked_diagnostics \ + sc_unportable_grep_q # Always use shorthand copyrights. update-copyright-env = \ @@ -84,7 +84,7 @@ update-release-year: .PHONY: update-release-year # Prevent incorrect NEWS edits. -old_NEWS_hash = 981169afdd2c97642125938f80a26b7f +old_NEWS_hash = 18aef204e16f6fe9487ab79ca2556ab4 # Update autoconf-latest.tar.* symlinks during 'make stable/beta'. GNUPLOADFLAGS = --symlink-regex diff --git a/doc/autoconf.texi b/doc/autoconf.texi index a37d70de7..8db64d8bb 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -8830,7 +8830,7 @@ default to @code{--enable-year2038}; if and when that happens, @code{AC_SYS_LARGEFILE} and @code{AC_SYS_YEAR2038} will become equivalent. @xref{AC_SYS_YEAR2038}. -Set the shell variable @code{ac_have_largefile} to to @samp{yes} or +Set the shell variable @code{ac_have_largefile} to @samp{yes} or @code{no} depending on whether a wide @code{off_t} is available, regardless of whether arrangements were necessary. Similarly, set the shell variable @code{ac_have_year2038} to @code{yes} diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4 index 221bdb1dc..1b7460c85 100644 --- a/lib/autoconf/programs.m4 +++ b/lib/autoconf/programs.m4 @@ -418,7 +418,7 @@ AC_DEFUN([AC_PROG_GREP], # _AC_PROG_GREP(VARIABLE, PROGNAME-LIST, [PROG-ARGUMENTS], -# [ACTION-IF-NOT-FOUND]) +# [ACTION-IF-NOT-FOUND]) # -------------------------------------------------------- # Solaris 9 /usr/xpg4/bin/*grep is suitable, but /usr/bin/*grep lacks -e. # AIX silently truncates long lines before matching. diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index 46c06fdd0..ab5ca7db7 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -673,13 +673,15 @@ done[]_m4_popdef([$1])]) # | fi # with simplifications when IF-TRUE1 and/or IF-FALSE are empty. # -# Note: IF-TRUEn and IF-FALSE may be nonempty but, after further macro -# expansion, leave no actual shell code. We can't detect this, so -# surround each clause with appropriate shell syntax so that it is valid -# even if it is empty. For the IF-TRUEn this can simply be ':' before -# the clause. IF-FALSE is harder because it might use the value of $? -# from the conditional expression. One way to do this is to write -# 'case e in e) IF-FALSE ;; esac' which is valid even if IF-FALSE is empty. +# Note: IF-TRUEn and IF-FALSE may be nonempty but, after further +# macro expansion, leave no actual shell code. We can't detect this, +# so surround each clause with appropriate shell syntax so that it is +# valid even if it is empty. For the IF-TRUEn this can simply be ':' +# before the clause. However, we can't do the same for IF-FALSE +# because the ':' would trash the value of $? from the conditional +# expression, which the IF-FALSE code might use. Instead we use +# 'case e in e) IF-FALSE ;; esac' which is valid even when IF-FALSE +# is empty. m4_define([_AS_IF], [elif $1 then :