automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-NG] [PATCH 02/26] [ng] texi: tweak rules for HTML generation t


From: Stefano Lattarini
Subject: [Automake-NG] [PATCH 02/26] [ng] texi: tweak rules for HTML generation to spawn only one shell
Date: Sat, 16 Jun 2012 23:29:49 +0200

* lib/am/texibuild.am: Rewrite the recipe for .texi -> .html conversion
to use only when shell invocation, mostly for consistency with the other
recipes (e.g., .texi -> .pdf).  This also offers a micro-optimization.
And while we are at it, throw in few other micro-optimizations, and fix
botched indentation.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 lib/am/texibuild.am |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index aef650a..30575fd 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -76,16 +76,17 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
        $(TEXI2PDF) %TEXIQUIET% --clean -o $@ $< %TEXIDEVNULL%
 
 %.html: %%SOURCE_SUFFIX%
-       %SILENT%$(am__ensure_target_dir_exists)
+       %AM_V_MAKEINFO%$(am__ensure_target_dir_exists) \
 ## When --split (the default) is used, makeinfo will output a
 ## directory.  However it will not update the time stamp of a
 ## previously existing directory, and when the names of the nodes
 ## in the manual change, it may leave unused pages.  Our fix
 ## is to build under a temporary name, and replace the target on
 ## success.
-       %AM_V_MAKEINFO%rm -rf $(@:.html=.htp)
-       %SILENT%if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
-                                  %MAKEINFOFLAGS% -o $(@:.html=.htp) $<; \
+         && { test ! -d $(@:.html=.htp) || rm -rf $(@:.html=.htp); } \
+         || exit 1; \
+       if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) \
+                          %MAKEINFOFLAGS% -o $(@:.html=.htp) $<; \
        then \
          rm -rf $@; \
 ## Work around a bug in Texinfo 4.1 (-o foo.html outputs files in foo/
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]