[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH 14/26] [ng] texi: adjust names of vars used for sil
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH 14/26] [ng] texi: adjust names of vars used for silent rules support |
Date: |
Sat, 16 Jun 2012 23:30:01 +0200 |
* lib/am/texibuild.am, automake.in (define_verbose_texinfo): Modify
so that the variables $(AV_texinfo) and $(AM_texidevnull) get renamed
with the much clearer and more proper names $(AM_TEXI_QUIETOPTS) and
$(AM_TEXI_DEVNULL_REDIRECT).
* t/silent8.sh: Enhance.
Signed-off-by: Stefano Lattarini <address@hidden>
---
automake.in | 4 ++--
lib/am/texibuild.am | 10 +++++-----
t/silent8.sh | 38 +++++++++++++++++++++++---------------
3 files changed, 30 insertions(+), 22 deletions(-)
diff --git a/automake.in b/automake.in
index a0cbb93..b52ba60 100644
--- a/automake.in
+++ b/automake.in
@@ -1197,8 +1197,8 @@ sub define_verbose_texinfo ()
{
define_verbose_tagvar($tag);
}
- define_verbose_var('texinfo', '-q');
- define_verbose_var('texidevnull', '> /dev/null');
+ define_verbose_var('TEXI_QUIETOPTS', '-q');
+ define_verbose_var('TEXI_DEVNULL_REDIRECT', '> /dev/null');
}
# define_verbose_libtool
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index b8e0655..c5a50a0 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -28,11 +28,11 @@ define am__texibuild_dvi_or_pdf
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS)
$(am__makeinfoflags)' \
## texi2dvi and texi2pdf don't silence everything with -q, redirect to
## /dev/null instead.
-## We still want -q ($(AM_V_texinfo)) because it turns on batch mode.
-## Use '--clean' to avoid leaving auxiliary files behind cluttering the
-## build directory (see automake bug#11146). We should start using
+## We still want -q ($(AM_V_TEXI_QUIETOPTS)) because it turns on batch
+## mode. 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.
- $2 $(AM_V_texinfo) --clean -o $@ $< $(AM_V_texidevnull)
+ $2 $(AM_V_TEXI_QUIETOPTS) --clean -o $@ $< $(AM_V_TEXI_DEVNULL_REDIRECT)
endef
define am__texibuild_info
@@ -113,4 +113,4 @@ $(foreach s,txi texi texinfo,$(eval $(call
am__texi_rules_for_suffix,$s)))
## The way to make PostScript, for those who want it.
%.ps: %.dvi
$(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- $(DVIPS) $(AM_V_texinfo) -o $@ $<
+ $(DVIPS) $(AM_V_TEXI_QUIETOPTS) -o $@ $<
diff --git a/t/silent8.sh b/t/silent8.sh
index 1254f9f..244b18d 100755
--- a/t/silent8.sh
+++ b/t/silent8.sh
@@ -40,23 +40,31 @@ $AUTOCONF
./configure --disable-silent-rules
-# Make sure that all labels work in silent-mode.
-$MAKE V=0 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
+# Silent mode output.
+st=0
+$MAKE V=0 dvi html info ps pdf >stdout 2>stderr || st=$?
cat stdout
-grep 'DVIPS foo.ps' stdout || Exit 1
-grep 'MAKEINFO foo.html' stdout || Exit 1
-grep 'MAKEINFO foo.info' stdout || Exit 1
-grep 'TEXI2DVI foo.dvi' stdout || Exit 1
-grep 'TEXI2PDF foo.pdf' stdout || Exit 1
+cat stderr >&2
+test $st -eq 0
+grep '^ DVIPS foo\.ps$' stdout
+grep '^ MAKEINFO foo\.html$' stdout
+grep '^ MAKEINFO foo\.info$' stdout
+grep '^ TEXI2DVI foo\.dvi$' stdout
+grep '^ TEXI2PDF foo\.pdf$' stdout
+# No make recipe is displayed before being executed.
+$EGREP 'texi2(dvi|pdf)|dvips|makeinfo|(rm|mv) ' stdout stderr && Exit 1
+# No verbose output from TeX nor dvips.
+$EGREP 'foo\.log|3\.14|Copyright|This is|[Oo]utput ' output && Exit 1
-# Now make sure the labels don't appear in verbose mode.
+# Verbose mode output.
$MAKE clean || Exit 1
-$MAKE V=1 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
-cat stdout
-grep 'DVIPS foo.ps' stdout && Exit 1
-grep 'MAKEINFO foo.html' stdout && Exit 1
-grep 'MAKEINFO foo.info' stdout && Exit 1
-grep 'TEXI2DVI foo.dvi' stdout && Exit 1
-grep 'TEXI2PDF foo.pdf' stdout && Exit 1
+$MAKE V=1 dvi html info ps pdf >output 2>&1 || { cat output; Exit 1; }
+cat output
+$EGREP '(DVIPS|MAKEINFO|TEXI2(PDF|DVI)) ' output && Exit 1
+# Verbose output from TeX.
+grep '[Oo]utput .*foo\.pdf' output
+$FGREP 'foo.log' output
+# Verbose output from dvips.
+$FGREP ' dvips' output
:
--
1.7.9.5
- Re: [Automake-NG] [PATCH 10/26] [ng] texi: reduce code duplication in output Makefile, (continued)
- [Automake-NG] [PATCH 11/26] [ng] texi: reorganize '.am' fragments a bit, Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 12/26] [ng] texi: reorganize '.am' fragments even more, Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 13/26] [ng] texi: drop transforms when reading texibuild.am, Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 14/26] [ng] texi: adjust names of vars used for silent rules support,
Stefano Lattarini <=
- [Automake-NG] [PATCH 15/26] [ng] texi: drop a useless transform when processing texinfos.am, Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 16/26] [ng] refactor: more proper name for a subroutine in automake, Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 17/26] [ng] texi: always look for mdate-sh in the build-aux directory ..., Stefano Lattarini, 2012/06/16
- [Automake-NG] [PATCH 18/26] [ng] coverage: texinfo input files using @include directives, Stefano Lattarini, 2012/06/16