This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] be more robust when `make stage' fails
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 16 Dec 2005 18:10:04 +0100
- Subject: [PATCH] be more robust when `make stage' fails
This patch avoids that the build goes on if `make stage' fails. Thee
`test -f && command || :' idiom is not ok if the command can fail,
because in that case you won't notice when that happens.
This hid the other bug I'm sending a patch for, on CodeSourcery's
testing system (reported by Dan and Joseph on IRC).
Paolo
Index: Makefile.tpl
===================================================================
--- Makefile.tpl (revision 108633)
+++ Makefile.tpl (working copy)
@@ -1212,7 +1212,7 @@ stage = :
@if gcc-bootstrap
unstage = [ -f stage_current ] || $(MAKE) `cat stage_last`-start
-stage = [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+stage = if [ -f stage_current ]; then $(MAKE) `cat stage_current`-end; else exit 1; fi
@endif gcc-bootstrap
.PHONY: unstage stage