From 05cb873bec12638b0218afcb0a42076f571c7836 Mon Sep 17 00:00:00 2001 From: Bogdan Drozdowski <> Date: Sat, 18 Mar 2023 21:46:36 +0100 Subject: [PATCH] Support for texinfo<4.9 --- lib/am/texibuild.am | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am index 6f6099c8d..b83dbfa44 100644 --- a/lib/am/texibuild.am +++ b/lib/am/texibuild.am @@ -76,7 +76,17 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX% ## avoid hitting a Texinfo bug that could cause low-probability racy ## failure when doing parallel builds; see: ## https://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html - $(TEXI2DVI) $(AM_TEXI2FLAGS) %MAKEINFOFLAGS% %TEXIQUIET% --build-dir=$(@:.dvi=.t2d) -o $@ %TEXIDEVNULL% \ +## See bug#29188 for why we are not using "--build-dir=": the old texi2dvi +## splits "--build-dir=xxx" into "--build-dir" and "xxx", interprets the +## "--build-dir" as "--batch" (checks just 1 letter, great!) and the "xxx" +## stays on the command line as another input file, causing the error. + TEXI2DVI_BUILD_DIRECTORY=$(@:.dvi=.t2d) \ +## We need TEXI2DVI_BUILD_MODE=tidy due to another bug in texi2dvi: +## when "--build-dir" is passed on the command line, the build mode is +## automatically set to 'tidy' by default, but when the build directory +## is set using an environment variable, the build mode stays default. + TEXI2DVI_BUILD_MODE=tidy \ + $(TEXI2DVI) $(AM_TEXI2FLAGS) %MAKEINFOFLAGS% %TEXIQUIET% -o $@ %TEXIDEVNULL% \ ?GENERIC? %SOURCE% ?!GENERIC? `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% @@ -97,7 +107,17 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX% ## avoid hitting a Texinfo bug that could cause low-probability racy ## failure when doing parallel builds; see: ## https://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html - $(TEXI2PDF) $(AM_TEXI2FLAGS) %MAKEINFOFLAGS% %TEXIQUIET% --build-dir=$(@:.pdf=.t2p) -o $@ %TEXIDEVNULL% \ +## See bug#29188 for why we are not using "--build-dir=": the old texi2dvi +## splits "--build-dir=xxx" into "--build-dir" and "xxx", interprets the +## "--build-dir" as "--batch" (checks just 1 letter, great!) and the "xxx" +## stays on the command line as another input file, causing the error. + TEXI2DVI_BUILD_DIRECTORY=$(@:.pdf=.t2p) \ +## We need TEXI2DVI_BUILD_MODE=tidy due to another bug in texi2dvi: +## when "--build-dir" is passed on the command line, the build mode is +## automatically set to 'tidy' by default, but when the build directory +## is set using an environment variable, the build mode stays default. + TEXI2DVI_BUILD_MODE=tidy \ + $(TEXI2PDF) $(AM_TEXI2FLAGS) %MAKEINFOFLAGS% %TEXIQUIET% -o $@ %TEXIDEVNULL% \ ?GENERIC? %SOURCE% ?!GENERIC? `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% -- 2.35.1