summaryrefslogtreecommitdiff
path: root/lib/am/texibuild.am
diff options
context:
space:
mode:
Diffstat (limited to 'lib/am/texibuild.am')
-rw-r--r--lib/am/texibuild.am14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index 40f01e45a..f77748a3e 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -68,8 +68,11 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
## Do not use '-o' unless necessary: it is only supported since Texinfo 4.1.
## texi2dvi doesn't silence everything with -q, redirect to /dev/null instead.
## We still want -q (%TEXIQUIET%) because it turns on batch mode.
-?GENERIC? $(TEXI2DVI) %TEXIQUIET% %SOURCE% %TEXIDEVNULL%
-?!GENERIC? $(TEXI2DVI) %TEXIQUIET% -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
+## Use '--clean' to avoid leaving auxiliary files behind cluttering the build
+## directory (see automake bug#11146). We should start using '--tidy' when we
+## can assume Texinf 4.9 or later.
+?GENERIC? $(TEXI2DVI) %TEXIQUIET% --clean %SOURCE% %TEXIDEVNULL%
+?!GENERIC? $(TEXI2DVI) %TEXIQUIET% --clean -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
?GENERIC?%SOURCE_SUFFIX%.pdf:
?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
@@ -80,8 +83,11 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
## Do not use '-o' unless necessary: it is only supported since Texinfo 4.1.
## texi2pdf doesn't silence everything with -q, redirect to /dev/null instead.
## We still want -q (%TEXIQUIET%) because it turns on batch mode.
-?GENERIC? $(TEXI2PDF) %TEXIQUIET% %SOURCE% %TEXIDEVNULL%
-?!GENERIC? $(TEXI2PDF) %TEXIQUIET% -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
+## Use '--clean' to avoid leaving auxiliary files behind cluttering the build
+## directory (see automake bug#11146). We should start using '--tidy' when we
+## can assume Texinf 4.9 or later.
+?GENERIC? $(TEXI2PDF) %TEXIQUIET% --clean %SOURCE% %TEXIDEVNULL%
+?!GENERIC? $(TEXI2PDF) %TEXIQUIET% --clean -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
?GENERIC?%SOURCE_SUFFIX%.html:
?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%