Chuck Houpt dixit: >> 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. >> >> Use >>> - -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.
> Apologies, I should have re-tested. The pattern used in the uninstall targets > uses Make's "-" to suppress the error. So another possibility is: > > -test -e $(BINDIR)/lynx$x && mv -f $(BINDIR)/lynx$x $(BINDIR)/lynx.old (I assume you mean test -f, not test -e) I'd still use the || syntax here, with or without a prefixing -, to make it clear to people that you don't normally use && in a Makefile. //mirabile -- 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 _______________________________________________ Lynx-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lynx-dev
