summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2023-03-12 16:59:27 -0400
committerZack Weinberg <zackw@panix.com>2023-03-12 16:59:27 -0400
commite0681c50ac3cd2a3cad2395e2691868a3dea1b12 (patch)
tree48548571aaaf13c56481b560ae3ac9ef9c173983
parentbeb6d826338fb854b5c73458a1d52662b04c171c (diff)
downloadautoconf-e0681c50ac3cd2a3cad2395e2691868a3dea1b12.tar.gz
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.
-rw-r--r--cfg.mk6
-rw-r--r--doc/autoconf.texi2
-rw-r--r--lib/autoconf/programs.m42
-rw-r--r--lib/m4sugar/m4sh.m416
4 files changed, 14 insertions, 12 deletions
diff --git a/cfg.mk b/cfg.mk
index 42827eb9..aef751a6 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 a37d70de..8db64d8b 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 221bdb1d..1b7460c8 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 46c06fdd..ab5ca7db 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 :