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/diffutils.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/diffutils.texi ; (cd doc && make diffutils.info V=1)
and
  make sc_makefile_at_at_check

From 4938fa8767bf56521eaa96b0b7991ee74cc18458 Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Date: Fri, 23 Jun 2023 00:29:28 +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/r/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 | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/cfg.mk b/cfg.mk
index 3713860..83d454e 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -42,6 +42,9 @@ old_NEWS_hash = d6a8096805f9b3ee162842058477f0bc
 # via diff.h or system.h.
 config_h_header = (<config\.h>|"(diff|system)\.h")
 
+# Add an exemption for sc_makefile_at_at_check.
+_makefile_at_at_check_exceptions = ' && !/MAKEINFO/'
+
 update-copyright-env = \
   UPDATE_COPYRIGHT_USE_INTERVALS=1 \
   UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 300617e..8166ab0 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -15,6 +15,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://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
+
 AM_MAKEINFOFLAGS = --no-split
 
 info_TEXINFOS = diffutils.texi
-- 
2.34.1

Reply via email to