Makeinfo versions < 6.7 detected mistakes in the @menu structure of TeXinfo
input. Makeinfo versions ≥ 6.8 don't do this any more by default. They need
an extra option, for this validation to happen. See
<https://lists.gnu.org/archive/html/bug-texinfo/2023-06/msg00015.html>.
Since doc/grep.texi has a hand-written @menu, it should use this extra
option.
Here's a patch to that effect.
There are two possibilities for adding the extra option:
- in the MAKEINFO variable, where it has an effect on both "makeinfo"
and "makeinfo --html",
- in the AM_MAKEINFOFLAGS variable, where it has an effect on "makeinfo"
only.
Since some maintainers may check their documentation edits only by regenerating
the HTML-formatted documentation, the first choice is preferrable.
Tested by running
touch doc/grep.texi ; (cd doc && make grep.info V=1)
and
make sc_makefile_at_at_check
From 394ad4fb9b1c9f565e3f07b187950be13758df7a Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Fri, 23 Jun 2023 00:48:13 +0200
Subject: [PATCH] =?UTF-8?q?build:=20Ensure=20that=20makeinfo=20=E2=89=A5?=
=?UTF-8?q?=206.8=20checks=20the=20@menu=20structure.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
See <https://lists.gnu.org/archive/html/bug-texinfo/2023-06/msg00015.html>.
* doc/Makefile.am (MAKEINFO): New variable.
* cfg.mk (_makefile_at_at_check_exceptions): New variable.
---
cfg.mk | 3 +++
doc/Makefile.am | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/cfg.mk b/cfg.mk
index 1000d4f..8eec613 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -45,6 +45,9 @@ announcement_Cc_ = $(translation_project_), $(PACKAGE)[email protected]
_gl_TS_unmarked_extern_functions = \
main usage mb_clen to_uchar dfaerror dfawarn imbrlen
+# Add an exemption for sc_makefile_at_at_check.
+_makefile_at_at_check_exceptions = ' && !/MAKEINFO/'
+
# Now that we have better tests, make this the default.
export VERBOSE = yes
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 4237af6..4bc2476 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -16,6 +16,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
+# The customization variable CHECK_NORMAL_MENU_STRUCTURE is necessary with
+# makeinfo versions ≥ 6.8.
+MAKEINFO = @MAKEINFO@ -c CHECK_NORMAL_MENU_STRUCTURE=1
+
info_TEXINFOS = grep.texi
grep_TEXINFOS = fdl.texi
--
2.34.1