From: Stefano Lattarini Date: Sun, 12 Aug 2012 09:47:58 +0000 (+0200) Subject: [ng] texi: be more aware of possible failures in recipes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81124853eb362772505a829bd959dc904a3ef1d4;p=thirdparty%2Fautomake.git [ng] texi: be more aware of possible failures in recipes * 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 --- diff --git a/lib/am/texibuild.mk b/lib/am/texibuild.mk index 48f2ea12c..876c788fd 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