[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AM_SILENT_RULES doesn't silence texinfo rules
From: |
Jack Kelly |
Subject: |
Re: AM_SILENT_RULES doesn't silence texinfo rules |
Date: |
Tue, 22 Sep 2009 12:33:27 +1000 |
(+ automake-patches)
Disclaimer has finally been processed. I suspect it will need
additional tests (and perhaps a NEWS entry?), but I wanted some eyes
on the style before I got in too deep.
Let me know if the inline patch gets mangled; if so, I'll start
sending them as attachments.
>From ae772ea28436cb0c49a423b541d6b51f3e907cc9 Mon Sep 17 00:00:00 2001
From: Jack Kelly <address@hidden>
Date: Tue, 22 Sep 2009 12:24:04 +1000
Subject: [PATCH] Add silent rules support for dvips, makeinfo,
makeinfo --html, texi2dvi and texi2pdf.
---
ChangeLog | 16 ++++++++++++++++
automake.in | 22 ++++++++++++++++++++--
lib/am/texibuild.am | 26 +++++++++++++++++---------
lib/am/texinfos.am | 5 +++--
4 files changed, 56 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 10581ee..03d0543 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2009-09-22 Jack Kelly <address@hidden>
+
+ Add silent rules support for dvips, makeinfo, makeinfo --html,
+ texi2dvi and texi2pdf.
+ * automake.in (define_verbose_texinfo): define several new verbose
+ tagvars and verbose vars.
+ * automake.in (define_verbose_tagvar): increase spacing to 12 to
+ accommodate MAKEINFOHTML.
+ * automake.in (handle_texinfo): additional substitution for
+ quieting dvips.
+ * automake.in (output_texinfo_build_rules): additional
+ substitution for quieting texi2dvi and texi2pdf.
+ * lib/am/texibuild.am: Add silencing to makeinfo, makeinfo --html,
+ texi2dvi and texi2pdf rules.
+ * lib/am/texinfos.am: Add silencing to .dvi.ps rule.
+
2009-09-18 Peter Johansson <address@hidden> (tiny change)
Fix link to "Recursive Make Considered Harmful" paper.
diff --git a/automake.in b/automake.in
index bab8c42..419bdc5 100755
--- a/automake.in
+++ b/automake.in
@@ -1199,11 +1199,25 @@ sub define_verbose_tagvar ($)
my ($name) = @_;
if (option 'silent-rules')
{
- define_verbose_var ($name, '@echo " '. $name . ' ' x (6 -
length ($name)) . '" $@;');
+ define_verbose_var ($name, '@echo " '. $name . ' ' x (12 -
length ($name)) . '" $@;');
define_verbose_var ('at', '@');
}
}
+# define_verbose_texinfo
+# ----------------------
+# Engage the needed `silent-rules' machinery for assorted texinfo commands.
+sub define_verbose_texinfo ()
+{
+ my @tagvars = ('DVIPS', 'MAKEINFO', 'MAKEINFOHTML', 'TEXI2DVI', 'TEXI2PDF');
+ foreach my $tag (@tagvars)
+ {
+ define_verbose_tagvar($tag);
+ }
+ define_verbose_var('texinfo', '-q');
+ define_verbose_var('texidevnull', '> /dev/null');
+}
+
# define_verbose_libtool
# ----------------------
# Engage the needed `silent-rules' machinery for `libtool --silent'.
@@ -3248,6 +3262,8 @@ sub output_texinfo_build_rules ($$$@)
? '$<' : $source),
SOURCE_REAL => $source,
SOURCE_SUFFIX => $ssfx,
+ TEXIQUIET => verbose_flag('texinfo'),
+ TEXIDEVNULL =>
verbose_flag('texidevnull'),
);
return ($dirstamp, "$dpfx.dvi", "$dpfx.pdf", "$dpfx.ps", "$dpfx.html");
}
@@ -3551,6 +3567,7 @@ sub handle_texinfo ()
reject_var 'TEXINFOS', "`TEXINFOS' is an anachronism; use `info_TEXINFOS'";
# FIXME: I think this is an obsolete future feature name.
reject_var 'html_TEXINFOS', "HTML generation not yet supported";
+ define_verbose_texinfo;
my $info_texinfos = var ('info_TEXINFOS');
my ($mostlyclean, $clean, $maintclean) = ('', '', '');
@@ -3567,7 +3584,8 @@ sub handle_texinfo ()
MOSTLYCLEAN => $mostlyclean,
TEXICLEAN => $clean,
MAINTCLEAN => $maintclean,
- 'LOCAL-TEXIS' => !!$info_texinfos);
+ 'LOCAL-TEXIS' => !!$info_texinfos,
+ TEXIQUIET => verbose_flag('texinfo'));
}
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index dca9ce1..a197033 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -32,7 +32,8 @@
## to fail, the info files are not removed. (They are needed by the
## developer while he writes documentation.)
## *.iNN files are used on DJGPP. See the comments in install-info-am
- restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+ $(AM_V_MAKEINFO)
+ $(AM_V_at)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
?INSRC? am__cwd=`pwd` && $(am__cd) $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
## If makeinfo is not installed we must not backup the files so
@@ -62,23 +63,29 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
?GENERIC?%SOURCE_SUFFIX%.dvi:
?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS% %DIRSTAMP%
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(AM_V_TEXI2DVI)
+ $(AM_V_at)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS"
\
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)
%MAKEINFOFLAGS%' \
## Do not use `-o' unless necessary: it is only supported since Texinfo 4.1.
-?GENERIC? $(TEXI2DVI) %SOURCE%
-?!GENERIC? $(TEXI2DVI) -o $@ `test -f '%SOURCE%' || echo
'$(srcdir)/'`%SOURCE%
+## 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%
?GENERIC?%SOURCE_SUFFIX%.pdf:
?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(AM_V_TEXI2PDF)
+ $(AM_V_at)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS"
\
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)
%MAKEINFOFLAGS%' \
## Do not use `-o' unless necessary: it is only supported since Texinfo 4.1.
-?GENERIC? $(TEXI2PDF) %SOURCE%
-?!GENERIC? $(TEXI2PDF) -o $@ `test -f '%SOURCE%' || echo
'$(srcdir)/'`%SOURCE%
+## 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%
?GENERIC?%SOURCE_SUFFIX%.html:
?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
@@ -88,8 +95,9 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
## in the manual change, it may leave unused pages. Our fix
## is to build under a temporary name, and replace the target on
## success.
- rm -rf $(@:.html=.htp)
- if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS)
%MAKEINFOFLAGS% \
+ $(AM_V_MAKEINFOHTML)
+ $(AM_V_at)rm -rf $(@:.html=.htp)
+ $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS)
$(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
?GENERIC? -o $(@:.html=.htp) %SOURCE%; \
?!GENERIC? -o $(@:.html=.htp) `test -f '%SOURCE%' || echo
'$(srcdir)/'`%SOURCE%; \
then \
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index c9dcd9d..16e2218 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -55,8 +55,9 @@ endif %?LOCAL-TEXIS%
if %?LOCAL-TEXIS%
DVIPS = dvips
.dvi.ps:
- TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- $(DVIPS) -o $@ $<
+ $(AM_V_DVIPS)
+ $(AM_V_at)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS"
\
+ $(DVIPS) %TEXIQUIET% -o $@ $<
endif %?LOCAL-TEXIS%
.PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am
--
1.6.0.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: AM_SILENT_RULES doesn't silence texinfo rules,
Jack Kelly <=