--- Makefile~	2005-07-10 22:20:33.000000000 -0700
+++ Makefile	2005-07-10 22:38:27.000000000 -0700
@@ -43,14 +43,14 @@
 ## Install needs to find the erlang directory
 ERL_DIR := $(shell echo 'io:format("~s~n",[code:root_dir()]),halt().' | erl | sed 's,^[0-9]*> *,,g' | tail +2)
 
-INSTALLDIR = $(ERL_DIR)/lib/$(ESDL_VSN)
+INSTALLDIR = $(DPORTSDIR)/$(ERL_DIR)/lib/$(ESDL_VSN)
 
 ## I assume that make install are only made on unixes... :-)
 install: 
 	@echo Found erlang at $(ERL_DIR)
 	@echo Installing $(ESDL_VSN) in $(INSTALLDIR)
 	@if test ! -d $(INSTALLDIR) ; then \
-		mkdir $(INSTALLDIR) ; \
+		mkdir -p $(INSTALLDIR) ; \
 	else \
 		rm -rf $(INSTALLDIR)/* ; \
 	fi ;
@@ -71,7 +71,7 @@
 	cp include/*.hrl $(INSTALLDIR)/include
 	cp doc/*.html $(INSTALLDIR)/doc
 	cp ebin/*beam $(INSTALLDIR)/ebin
-	cp priv/*.* $(INSTALLDIR)/priv
+	cp -r priv/* $(INSTALLDIR)/priv
 
 
 ## This is used by me only for making a new release...
