]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
texi: define new AM_TEXI2FLAGS variable
authorMike Frysinger <vapier@gentoo.org>
Mon, 24 Jan 2022 08:08:13 +0000 (03:08 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 28 Jan 2022 07:50:29 +0000 (02:50 -0500)
To provide a bit more flexibility when invoking TEXI2DVI & TEXI2PDF,
and provide a bit of symmetry with .info & .html generation, provide
a AM_TEXI2FLAGS setting that is passed to all TEXI2xxx invocations.

* doc/automake.texi: Mention new AM_TEXI2FLAGS setting.
* lib/am/texibuild.am: Pass $(AM_TEXI2FLAGS) to TEXI2DVI & TEXI2PDF.
* NEWS: Mention AM_TEXI2FLAGS.
* t/txinfo-many-output-formats.sh: Check for AM_TEXI2FLAGS.

NEWS
doc/automake.texi
lib/am/texibuild.am
t/txinfo-many-output-formats.sh

diff --git a/NEWS b/NEWS
index 57fd4275b8a72bced2ee041ce0ded772012eef2a..f408605077078768b5f12ada78f6c39001a1239c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,8 @@ New in 1.17:
   - AM_PATH_PYTHON will also search for Python versions 3.10 - 3.15.  It has
     previously searched for 3.0 - 3.9.
 
+  - AM_TEXI2FLAGS may be defined to pass extra flags to TEXI2DVI & TEXI2PDF.
+
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 New in 1.16.5:
index c94b9f528c11c58b68b56b0c359402745cccbd94..df2b46dfaa12de357e5b8b53f22fd524c59383fc 100644 (file)
@@ -8153,12 +8153,14 @@ users to pass extra flags to suit their needs.
 
 @item AM_MAKEINFOFLAGS
 @itemx AM_MAKEINFOHTMLFLAGS
+@itemx AM_TEXI2FLAGS
 Maintainer flags passed to each @command{makeinfo} invocation.  Unlike
 @code{MAKEINFOFLAGS}, these variables are meant to be defined by
 maintainers in @file{Makefile.am}.  @samp{$(AM_MAKEINFOFLAGS)} is
-passed to @code{makeinfo} when building @file{.info} files; and
+passed to @code{makeinfo} when building @file{.info} files;
 @samp{$(AM_MAKEINFOHTMLFLAGS)} is used when building @file{.html}
-files.
+files; and @samp{$(AM_TEXI2FLAGS)} is used when building @file{.dvi} and
+@file{.pdf} files.
 
 @c Keep in sync with txinfo-many-output-formats.sh
 For instance, the following setting can be used to obtain one single
index c9c4f92d82cbc30dd1569267ed8d306c99b57f9d..43e69d7b94ea1ac704d78484fbd131b54fa6fe33 100644 (file)
@@ -76,7 +76,7 @@ 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) %MAKEINFOFLAGS% %TEXIQUIET% --build-dir=$(@:.dvi=.t2d) -o $@ %TEXIDEVNULL% \
+       $(TEXI2DVI) $(AM_TEXI2FLAGS) %MAKEINFOFLAGS% %TEXIQUIET% --build-dir=$(@:.dvi=.t2d) -o $@ %TEXIDEVNULL% \
 ?GENERIC?      %SOURCE%
 ?!GENERIC?     `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
 
@@ -97,7 +97,7 @@ 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) %MAKEINFOFLAGS% %TEXIQUIET% --build-dir=$(@:.pdf=.t2p) -o $@ %TEXIDEVNULL% \
+       $(TEXI2PDF) $(AM_TEXI2FLAGS) %MAKEINFOFLAGS% %TEXIQUIET% --build-dir=$(@:.pdf=.t2p) -o $@ %TEXIDEVNULL% \
 ?GENERIC?      %SOURCE%
 ?!GENERIC?     `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
 
index a5f795c2cc63841a9140fbcd11c1f1acc726375c..9903d4ef875ec8baba58349d60961ced71a9c735 100644 (file)
@@ -86,6 +86,10 @@ $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
 
+# Make sure AM_TEXI2FLAGS is passed down.
+grep '\$(TEXI2DVI).*\$(AM_TEXI2FLAGS)' Makefile.in
+grep '\$(TEXI2PDF).*\$(AM_TEXI2FLAGS)' Makefile.in
+
 # To simplify syncing with sister test 'txinfo-many-output-formats.sh'
 srcdir=.