$NetBSD: patch-aa,v 1.5 2005/11/08 21:46:03 rillig Exp $

--- Makefile.orig	Sat Jan  3 15:22:47 2004
+++ Makefile	Tue Nov  8 22:41:34 2005
@@ -83,13 +83,15 @@
 BINDIR		= bin
 LIBEXECDIR	= libexec
 MANDIR		= man
-DESTDIR		= /usr/local
-PRESERVEDIR	= /var/preserve
+#DESTDIR	= /usr/local
+DESTDIR		= ${PREFIX}
+PRESERVEDIR	= /var/tmp/vi.recover
 
 #
 # A BSD-like install program. GNU install will fit well here, too.
 #
-INSTALL		= /usr/ucb/install
+#INSTALL	= /usr/ucb/install
+INSTALL		= ${BSD_INSTALL}
 
 #
 # Compiler and linker flags.
@@ -140,9 +142,9 @@
 # advanced multibyte character support etc. which might not be present
 # on your system.
 #
-REINC	= -I./libuxre -DUXRE
-RELIB	= -L./libuxre -luxre
-RETGT	= uxre
+#REINC	= -I./libuxre -DUXRE
+#RELIB	= -L./libuxre -luxre
+#RETGT	= uxre
 
 #
 # These settings should be correct for any modern Unix.
@@ -182,7 +184,7 @@
 # On System V, the terminfo library may be more accurate than the termcap
 # file. To use it, link against the curses library.
 #
-#TERMLIB	= curses
+TERMLIB	= curses
 #
 # You may also get terminfo access by using the ncurses library.
 #
@@ -191,7 +193,7 @@
 # The preferred choice for ex on Linux and other systems that provide a good
 # termcap file is the 2.11BSD termcap library included here.
 #
-TERMLIB	= termlib
+#TERMLIB	= termlib
 
 #
 # Since ex uses sbrk() internally, a conflict with the libc's version of
@@ -297,7 +299,7 @@
 		mv $(DESTDIR)/$(BINDIR)/ex $(DESTDIR)/$(BINDIR)/ex.old.$$$$; \
 		rm -f $(DESTDIR)/$(BINDIR)/ex.old.$$$$; \
 	fi
-	$(INSTALL) -c -s -m 1755 ex $(DESTDIR)/$(BINDIR)/ex
+	$(INSTALL) -c -s -m 755 ex $(DESTDIR)/$(BINDIR)/ex
 	test -d $(DESTDIR)/$(LIBEXECDIR) || mkdir $(DESTDIR)/$(LIBEXECDIR)
 	$(INSTALL) -c -s exrecover $(DESTDIR)/$(LIBEXECDIR)/exrecover
 	$(INSTALL) -c -s expreserve $(DESTDIR)/$(LIBEXECDIR)/expreserve
