Karl,

The bug bug#79053 has been resolved.  The patch is attached.

-------- Forwarded Message --------
Subject: [automake-commit] branch master updated: lib/am/distdir.am: do not run "make dvi" in distcheck by default
Date: Wed, 21 Oct 2026 12:59:35 -0400
From: Kamila Szewczyk <[email protected]>
Reply-To: [email protected], Kamila Szewczyk <[email protected]>
To: [email protected]

This is an automated email from the git hooks/post-receive script.

iczelia pushed a commit to branch master
in repository automake.

View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=f8ee7cc84c305d396f63033635a843aef161228c

The following commit(s) were added to refs/heads/master by this push:
new f8ee7cc84 lib/am/distdir.am: do not run "make dvi" in distcheck by default
f8ee7cc84 is described below

commit f8ee7cc84c305d396f63033635a843aef161228c
Author: Kamila Szewczyk <[email protected]>
AuthorDate: Wed Oct 21 18:59:15 2026 +0200

    lib/am/distdir.am: do not run "make dvi" in distcheck by default
        DVI is no longer required by the GNU coding standards.
* lib/am/distdir.am (AM_DISTCHECK_DVI_TARGET): Default to empty. (distcheck): Skip the documentation step when it is empty. * doc/automake.texi (dvi and distcheck): Document the new default. (Introducing Automake, Auxiliary Programs, Checking the Distribution): No longer claim that distcheck runs "make dvi".
    * t/distcheck-no-dvi.sh: New test.
    * t/list-of-tests.mk: Add it.
    * NEWS: Mention it.
---
 NEWS                  |  7 ++++++
 doc/automake.texi     | 38 ++++++++++++++++----------------
 lib/am/distdir.am     |  8 ++++---
t/distcheck-no-dvi.sh | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++
 t/list-of-tests.mk    |  1 +
 5 files changed, 93 insertions(+), 21 deletions(-)

diff --git a/NEWS b/NEWS
index 1c7e152cd..0f6a98904 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,13 @@ New in 1.20 (????-??-??):
     rule like `foo.h: gen.sh; ./gen.sh > $@' then no longer leaves a
     truncated result that later runs of make treat as up to date.
 +* Changes to Automake-generated Makefiles
+
+  - distcheck no longer runs "make dvi" by default, so TeX is not needed
+    to check a distribution containing Texinfo manuals.  Set
+    AM_DISTCHECK_DVI_TARGET in Makefile.am, e.g., to dvi, pdf or html,
+    to check that the documentation can be built.  (bug#79053)
+
 * Bugs fixed
    - Repeated target declarations in overlapping Automake conditionals no
diff --git a/doc/automake.texi b/doc/automake.texi
index c55334d58..4b9169c9c 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -326,7 +326,7 @@ Checking the Distribution
  * DISTCHECK_CONFIGURE_FLAGS::  Overriding configure flags in distcheck.
 * distcheck-hook::             Running commands after distcheck.
-* dvi and distcheck::          Overriding the distcheck doc target.
+* dvi and distcheck::          Testing documentation in distcheck.
 * distcleancheck::             Handling files not cleaned.
 * distuninstallcheck::         Overriding the uninstall check.
 * Errors with distclean::
@@ -1255,7 +1255,7 @@ work:
 @item
 It attempts a full compilation of the package (@pxref{Basic
 Installation}): unpacking the newly constructed tarball, running
-@code{make}, @code{make dvi}, @code{make check}, @code{make install},
+@code{make}, @code{make check}, @code{make install},
 as well as @code{make installcheck}, and even @code{make dist},
 @item
 it tests VPATH builds with a read-only source tree (@pxref{VPATH Builds}),
@@ -2444,8 +2444,9 @@ When Texinfo sources are in the package, this file is required for
 version can be downloaded from
 @url{https://www.gnu.org/software/texinfo/}.  A working @TeX{}
 distribution, or at least a @file{tex} program, is also required.
-Furthermore, @samp{make dist} invokes @samp{make dvi}, so these become
-requirements for making a distribution with Texinfo sources.
+These are not needed by @samp{make distcheck} unless
+@code{AM_DISTCHECK_DVI_TARGET} asks for printable output
+(@pxref{dvi and distcheck}).
  @item ylwrap
 @cmindex ylwrap
@@ -9168,7 +9169,8 @@ a bit, we can say this rule first makes a distribution, and then,
 does a @code{VPATH} build (@pxref{VPATH Builds}), with the
 @code{srcdir} and all its content made @emph{read-only};
 @item
-makes the printable documentation (with @command{make dvi}), if any,
+builds the documentation target named by
+@code{AM_DISTCHECK_DVI_TARGET}, if any (@pxref{dvi and distcheck});
 @item
 runs the test suite (with @command{make check}) on this fresh build;
 @item
@@ -9193,7 +9195,7 @@ please do not rely on it.
 @menu
 * DISTCHECK_CONFIGURE_FLAGS::  Overriding configure flags in distcheck.
 * distcheck-hook::             Running commands after distcheck.
-* dvi and distcheck::          Overriding the distcheck doc target.
+* dvi and distcheck::          Testing documentation in distcheck.
 * distcleancheck::             Handling files not cleaned.
 * distuninstallcheck::         Overriding the uninstall check.
 * Errors with distclean::
@@ -9255,19 +9257,19 @@ and @code{DISTCHECK_CONFIGURE_FLAGS}, are not honored in a subpackage
 @subsection @code{dvi} and @code{distcheck}
 @trindex dvi
 -Ordinarily, @command{make distcheck} runs @command{make dvi}.  It does
-nothing if the distribution contains no Texinfo sources.  If the
-distribution does contain a Texinfo manual, by default the @code{dvi}
-target will run @TeX{} to make sure it can be successfully processed
-(@pxref{Texinfo}).
+By default, @command{make distcheck} does not build any documentation
+beyond what @command{make} itself builds; in particular, it no longer
+runs @command{make dvi}, so @TeX{} is not needed to check a
+distribution.
  @vindex AM_DISTCHECK_DVI_TARGET
 @cindex @code{eps} images, and @code{distcheck}
-However, you may wish to test the manual by producing @code{pdf}
-(e.g., if your manual uses images in formats other than @code{eps}),
-@code{html} (if you don't have @TeX{} at all), some other format, or
-just skip the test entirely (not recommended).  You can change the
-target that is run by setting the variable
+However, you may wish to test that your Texinfo manual
+(@pxref{Texinfo}) can be successfully processed, by producing
+@code{dvi}, @code{pdf} (e.g., if your manual uses images in formats
+other than @code{eps}), @code{html}, or some other format.  You can
+name the target to run, after the build and before
+@command{make check}, by setting the variable
 @code{AM_DISTCHECK_DVI_TARGET} in your @code{Makefile.am}; for
 example,
 @@ -9275,8 +9277,8 @@ example,
 AM_DISTCHECK_DVI_TARGET = pdf
 @end example
 -To make @code{dvi} into a do-nothing target, see the example for
-@code{EMPTY_AUTOMAKE_TARGETS} in @ref{Third-Party Makefiles}.
+Setting it to @code{dvi} restores the behavior of Automake 1.19 and
+earlier.
  @node distcleancheck
 @subsection @code{distcleancheck}
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 50e36122c..d04982ab0 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -538,8 +538,9 @@ if %?SUBDIRS%
 AM_RECURSIVE_TARGETS += distcheck
 endif %?SUBDIRS%
 -# Exists only to be overridden by the user if desired.
-AM_DISTCHECK_DVI_TARGET = dvi
+# Documentation target run by distcheck, e.g., dvi, pdf or html.  None by
+# default; exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET =
  # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
@@ -610,7 +611,8 @@ distcheck: dist
 ## (in corner-case usages); see automake bug#14991.
            --srcdir=../.. --prefix="$$dc_install_base" \
          && $(MAKE) $(AM_MAKEFLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
+         && { test -z "$(AM_DISTCHECK_DVI_TARGET)" \
+              || $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET); } \
          && $(MAKE) $(AM_MAKEFLAGS) check \
          && $(MAKE) $(AM_MAKEFLAGS) install \
          && $(MAKE) $(AM_MAKEFLAGS) installcheck \
diff --git a/t/distcheck-no-dvi.sh b/t/distcheck-no-dvi.sh
new file mode 100755
index 000000000..09e1134fe
--- /dev/null
+++ b/t/distcheck-no-dvi.sh
@@ -0,0 +1,60 @@
+#! /bin/sh
+# Copyright (C) 2026 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
+
+# By default, distcheck must not run 'make dvi', so that TeX is not
+# required (automake bug#79053).  AM_DISTCHECK_DVI_TARGET can still
+# ask for it.  See also 'distcheck-override-dvi.sh'.
+
+# TeX should not be needed or invoked by default.
+TEX=false
+export TEX
+
+required='makeinfo'
+. test-init.sh
+
+cat >> configure.ac << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = main.texi
+END
+
+# Protect with leading " # " to avoid spurious maintainer-check failures.
+sed 's/^ *# *//' > main.texi << 'END'
+ # \input texinfo
+ # @setfilename main.info
+ # @settitle main
+ #
+ # @node Top
+ # Hello.
+ # @bye
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+$AUTOCONF
+
+./configure
+$MAKE
+run_make -M distcheck
+grep -- '-o main\.dvi' output && exit 1
+
+# Asking for dvi explicitly runs texi2dvi again.
+run_make -M distcheck AM_DISTCHECK_DVI_TARGET=dvi TEXI2DVI=true
+grep '^true .*-o main\.dvi' output
+
+:
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 9b7bdcb72..74834fdfd 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -447,6 +447,7 @@ t/distcheck-hook2.sh \
 t/distcheck-missing-m4.sh \
 t/distcheck-no-prefix-or-srcdir-override.sh \
 t/distcheck-outdated-m4.sh \
+t/distcheck-no-dvi.sh \
 t/distcheck-override-dvi.sh \
 t/distcheck-override-infodir.sh \
 t/distcheck-pr10470.sh \

Attachment: OpenPGP_0xC868F0B6DE38409D.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to