$OpenBSD: patch-Makefile_in,v 1.5 2006/08/02 17:21:19 steven Exp $
--- Makefile.in.orig	Fri May 12 16:43:44 2006
+++ Makefile.in	Tue Aug  1 12:12:53 2006
@@ -49,8 +49,7 @@ exec_prefix = @exec_prefix@
 # useful e.g. when installing on a server that stores the files with a
 # different path from where the clients access them. Or when building
 # rpms.
-#INSTALL_PREFIX =
-# Naah...override `prefix' instead.
+INSTALL_PREFIX = $(DESTDIR)
 
 # The directory in which user executables (ERL_BASE_PUB_FILES) are put
 BINDIR      = $(INSTALL_PREFIX)@bindir@
@@ -539,7 +538,7 @@ else
 endif
 
 install.Install:
-	cd $(ERLANG_LIBDIR) && ./Install -minimal $(ERLANG_LIBDIR)
+	cd $(ERLANG_LIBDIR) && ./Install -minimal $(ERLANG_ILIBDIR)
 
 #
 # Install erlang base public files
@@ -547,7 +546,7 @@ install.Install:
 install.bin:
 	for file in $(ERL_BASE_PUB_FILES); do \
 		rm -f $(BINDIR)/$$file; \
-		${LN_S} $(ERLANG_BINDIR)/$$file $(BINDIR)/$$file; \
+		${LN_S} $(ERLANG_ILIBDIR)/bin/$$file $(BINDIR)/$$file; \
 	done
 
 #
