automake-ng
[Top][All Lists]
Advanced

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

[Automake-NG] [PATCH 08/10] [ng] texi: be more aware of possible failure


From: Stefano Lattarini
Subject: [Automake-NG] [PATCH 08/10] [ng] texi: be more aware of possible failures in recipes
Date: Sun, 12 Aug 2012 13:19:30 +0200

* lib/am/texibuild.mk: Here, mostly by using "cmd1 && cmd2" or
"cmd1 || exit $?; cmd2" rather than "cmd1; cmd2" in some places.

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

diff --git a/lib/am/texibuild.mk b/lib/am/texibuild.mk
index 48f2ea1..876c788 100644
--- a/lib/am/texibuild.mk
+++ b/lib/am/texibuild.mk
@@ -66,12 +66,12 @@ define am.texi.build.info
                       -I $(@D) -I $(srcdir)/$(@D) -o $@ $<; \
        then \
          rc=0; \
-         $(if $(am__info_insrc),cd $(srcdir);) \
+         $(if $(am__info_insrc),cd $(srcdir) || exit 1;) \
        else \
          rc=$$?; \
 ## Beware that backup info files might come from a subdirectory.
          $(if $(am__info_insrc),cd $(srcdir) &&) \
-         $$restore $$backupdir/* $(@D); \
+         $$restore $$backupdir/* $(@D) || exit 1; \
        fi; \
        rm -rf $$backupdir; exit $$rc
 endef
@@ -90,12 +90,10 @@ define am.texi.build.html
                            -I $(@D) -I $(srcdir)/$(@D) \
                            -o $(@:.html=.htp) $<; \
        then \
-         rm -rf $@; \
-         mv $(@:.html=.htp) $@; \
+         rm -rf $@ && mv $(@:.html=.htp) $@; \
        else \
 ## on failure, remove the temporary directory before exiting.
-         rm -rf $(@:.html=.htp) $@; \
-         exit 1; \
+         rm -rf $(@:.html=.htp) $@; exit 1; \
        fi
 endef
 
-- 
1.7.12.rc0




reply via email to

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