--- Makefile.in.2	2007-03-22 02:40:10.000000000 +0100
+++ Makefile.in	2007-03-22 02:47:19.000000000 +0100
@@ -20,7 +20,11 @@
 
 TARGETS=	nefu
 
-CREATE_DIRS=	${bindir} ${html_dir} ${script_dir}
+CREATE_DIRS_OLD=${bindir} ${html_dir} ${script_dir}
+CREATE_DIRS=	
+for i in ${CREATE_DIRS_OLD}; do \
+	CREATE_DIRS=${CREATE_DIRS} $(DESTDIR)$$i; \
+done
 MAN1TARGETS=	nefu.1
 MAN4TARGETS=	nefu.conf.4
 
@@ -46,17 +50,17 @@
 	for i in ${CREATE_DIRS}; do \
 	    mkdir -p $$i; \
 	done
-	${INSTALL} -m 0444 -c small_nefu_logo.png ${html_dir}
+	${INSTALL} -m 0444 -c small_nefu_logo.png $(DESTDIR)${html_dir}
 	for i in ${TARGETS}; do \
-	    ${INSTALL} -m 0755 -c $$i ${bindir}/; \
+	    ${INSTALL} -m 0755 -c $$i $(DESTDIR)${bindir}/; \
 	done
-	-mkdir -p ${mandir}/man1
+	-mkdir -p $(DESTDIR)${mandir}/man1
 	for i in ${MAN1TARGETS}; do \
-	    ${INSTALL} -m 0644 -c $$i ${mandir}/man1/; \
+	    ${INSTALL} -m 0644 -c $$i $(DESTDIR)${mandir}/man1/; \
 	done
-	-mkdir -p ${mandir}/man4
+	-mkdir -p $(DESTDIR)${mandir}/man4
 	for i in ${MAN4TARGETS}; do \
-	    ${INSTALL} -m 0644 -c $$i ${mandir}/man4/; \
+	    ${INSTALL} -m 0644 -c $$i $(DESTDIR)${mandir}/man4/; \
 	done
 
 nefu : ${OBJ} libtest/libtest.a libsnet/libsnet.la
