This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] be more robust when `make stage' fails


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}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]