On Fri, Apr 04, 2025 at 07:53:34AM -0500, Eric Blake wrote:
> On Fri, Jun 23, 2023 at 01:50:51AM +0200, Bruno Haible wrote:
> > 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/sed.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/m4.texi ; (cd doc && make m4.info V=1)
> 
> Thanks; applied.

Fails 'make syntax-check', which wants it to be spelled $(MAKEINFO)
rather than @MAKEINFO@.

Is it really valid to do "MAKEINFO = $(MAKEINFO) more-opts" in a
Makefile?

/me goes and tests...

Nope, make complains about infinite recursion.  Hence why you spelled
it @MAKEINFO@.  But that's not very satisfactory for the syntax check.

Setting it in AM_MAKEINFOFLAGS avoids the syntax check issue, but
does't cover html; but there _is_ AM_MAKEINFOHTMLFLAGS as well (and
that one defaults to AM_MAKEINFOFLAGS), so I'm not sure why you said
it affects "makeinfo" but not "makeinfo --html".

I've pushed the followup patch, after first verifying that the new
option is present on the command line issued by 'make V=1 -C doc
html':

diff --git i/doc/Makefile.am w/doc/Makefile.am
index 090e3649..c3646f54 100644
--- i/doc/Makefile.am
+++ w/doc/Makefile.am
@@ -29,7 +29,7 @@ SUFFIXES = .1

 # The customization variable CHECK_NORMAL_MENU_STRUCTURE is necessary with
 # makeinfo versions ≥ 6.8.
-MAKEINFO = @MAKEINFO@ -c CHECK_NORMAL_MENU_STRUCTURE=1
+AM_MAKEINFOFLAGS = -c CHECK_NORMAL_MENU_STRUCTURE=1

 HELP2MAN = $(SHELL) $(top_srcdir)/build-aux/missing --run help2man

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org


Reply via email to