From 7815bc8b445e05e1fde235360747440a8ad316da Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Sat, 6 Apr 2024 14:51:53 +0100 Subject: [PATCH] Revert "Remove unnecessary AM_MAKEINFOFLAGS tweak" This reverts commit 1a20a3f7eec823820b5cd01d566244e4fa968b73. It turns out that `texi2dvi` _does_ require `-I $(srcdir)` for `@verbatiminclude default-ignore-list` to work after all. It's needed not for a normal docs build, but when `make distcheck` is run, presumably because `distcheck` runs from a different directory. --- Makefile.am | 12 ++++++++++++ configure.ac | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index d6e004f..7bd43bd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,6 +33,18 @@ pm_DATA = lib/Stow.pm pmstow_DATA = lib/Stow/Util.pm export TEXI2DVI_BUILD_MODE = clean +AM_MAKEINFOFLAGS = -I $(srcdir) + +# We require this -I parameter to ensure that the include of the +# default ignore list in the manual works correctly, even when the +# manual is being built via make distcheck from a different directory. +# Unfortunately this is the only way to do it: +# +# https://lists.gnu.org/archive/html/bug-automake/2008-09/msg00040.html +# +# even though it annoyingly produces a warning with the -Wall option +# to AM_INIT_AUTOMAKE which has to be silenced via -Wno-override. +TEXI2DVI = texi2dvi $(AM_MAKEINFOFLAGS) DEFAULT_IGNORE_LIST = $(srcdir)/default-ignore-list diff --git a/configure.ac b/configure.ac index 4b74c67..27d3b3b 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,8 @@ AC_INIT([stow], [2.3.2], [bug-stow@gnu.org]) AC_PREREQ([2.61]) AC_CONFIG_AUX_DIR([automake]) # Unfortunately we have to disable warnings for overrides, because we -# need to override the built-in `check-TESTS' rule. +# need to override the built-in `check-TESTS' rule and also the TEXI2DVI +# variable. AM_INIT_AUTOMAKE([-Wall -Werror -Wno-override dist-bzip2 foreign]) AC_PROG_INSTALL