[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lynx-dev] Patch to fix error messages during fresh install

From: Thorsten Glaser
Subject: Re: [Lynx-dev] Patch to fix error messages during fresh install
Date: Thu, 26 Apr 2007 12:16:33 +0000 (UTC)

Chuck Houpt dixit:

> By private email, address@hidden suggested an improvement to this patch -
> switching from if-statement to &&

No, in make you do *not* use && unless you also have an || case.

This will abort(!) the make if $(BINDIR)/lynx$x does not exist.

> -     -mv -f $(BINDIR)/lynx$x $(BINDIR)/lynx.old
  -     test -e $(BINDIR)/lynx$x && mv -f $(BINDIR)/lynx$x $(BINDIR)/lynx.old
  +     test ! -f $(BINDIR)/lynx$x || mv -f $(BINDIR)/lynx$x $(BINDIR)/lynx.old
instead. *(autoconf)Limitations of Builtins:: says that test ! is safe
(if ! test isn't), and -e doesn't exist e.g. on Solaris, but -f does.

> -     -mv -f $(SYSCONFDIR)/lynx.lss $(SYSCONFDIR)/lynx.oldlss
  -     test -e $(SYSCONFDIR)/lynx.lss && mv -f $(SYSCONFDIR)/lynx.lss
  +     test ! -f $(SYSCONFDIR)/lynx.lss || mv -f $(SYSCONFDIR)/lynx.lss

Untested, but should work like that.

I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence.              -- Coywolf Qi Hunt

reply via email to

[Prev in Thread] Current Thread [Next in Thread]