Hello.

As suggested by Gavin, I'm reporting a problem (or at least a "surprising inconsistency") in the texi2dvi script. This is related to Automake bug#29188 (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=29188).

Since texinfo-4.9, one can set the build directory with an environment variable "TEXI2DVI_BUILD_DIRECTORY". Unfortunately, texinfo has a problem/inconsistency there. When setting "--build-dir=" on the command line, the build mode is set to "tidy" (which cleans some log files, etc.). Fine. The problem is that if you set the build directory using an environment variable, the mode is NOT set to "tidy", leaving the logs files (and failing tests in Automake). Luckily, you can also set the build mode from an environment variable, "TEXI2DVI_BUILD_MODE".

The attached patch changes this behavior: when the user provides the build directory via an environment variable, but not the build mode, set the build mode to 'tidy', to match the command-line processing. I did a simple manual test, seems to be working.

 Thank you for Texinfo!

 Bogdan Drozdowski

P.S. I didn't manage to find any bugtracker for Texinfo, so I don't know if I'm not duplicating some other report or patch.

--
Regards - Bogdan ('bogdro') D.                 (GNU/Linux & FreeDOS)
X86 assembly (DOS, GNU/Linux):    http://bogdro.evai.pl/index-en.php
Soft(EN): http://bogdro.evai.pl/soft  http://bogdro.evai.pl/soft4asm
www.Xiph.org  www.TorProject.org  www.LibreOffice.org  www.GnuPG.org
diff --git a/ChangeLog b/ChangeLog
index 2d3e17329c..47dbed0dd8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-03-20  Bogdan Drozdowski <bogdro #at# users . sourceforge . net>
+
+	* util/texi2dvi: Make setting the environment variable
+	TEXI2DVI_BUILD_DIRECTORY have the same effect as using --build-dir
+	on the command line - set the build mode to 'tidy' (but still let
+	the user override this with a command line switch or environment).
+
 2023-03-19  Gavin Smith <gavinsmith0...@gmail.com>
 
 	* README-hacking: Update
diff --git a/util/texi2dvi b/util/texi2dvi
index 28c53ebe44..14fe547624 100755
--- a/util/texi2dvi
+++ b/util/texi2dvi
@@ -38,6 +38,13 @@ program=`echo $0 | $SED -e 's!.*/!!'`
 build_mode=${TEXI2DVI_BUILD_MODE:-local}
 build_dir=${TEXI2DVI_BUILD_DIRECTORY:-.}
 
+# When the user provides the build dir, but not the build mode, set the
+# build mode to 'tidy', to match the command-line processing
+if test -n "$TEXI2DVI_BUILD_DIRECTORY" -a \
+  -z "$TEXI2DVI_BUILD_MODE" ; then
+  build_mode=tidy;
+fi
+
 orig_pwd=`pwd`
 
 # Initialize variables for option overriding and otherwise.

Reply via email to