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: Toplevel Makefile.tpl cleanup 2/n part two


On Mar  4, 2003, Bruce Korb <bkorb at veritas dot com> wrote:

>>               if [ -f Makefile ]; then \
[snip]
>> -             else \
>> -               true; \
>> +               $(MAKE) distclean || exit 1; \

>> Nope.  Some make&shell combinations will fail if an `if' test fails
>> and there's no `else true' clause.

> If the first clause is false, then the shell goes on without error-ing
> out.  If the second clause also fails, then the shell will error-exit
> because make sets the ``-e'' option.

I'm very well aware of this.  But the patch is dropping the `else
true' for `if [ -f Makefile ]' as well, and that's what breaks.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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