This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] be more robust when `make stage' fails
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 13 Jan 2006 19:16:02 -0500
- Subject: Re: [PATCH] be more robust when `make stage' fails
- References: <43A2F4EC.5010300@lu.unisi.ch>
On Dec 16, 2005, Paolo Bonzini <paolo.bonzini@lu.unisi.ch> wrote:
> `test -f && command || :' idiom is not ok if the command can fail,
`test ! -f || command' is generally a better idea anyway.
> Index: Makefile.tpl
> -stage = [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
> +stage = if [ -f stage_current ]; then $(MAKE) `cat stage_current`-end; else exit 1; fi
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}