--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -37,9 +37,9 @@
 	$(top_srcdir)/substitute $(SED) "@sub_MRNET_HOME@" "@MRNET_HOME@" $@
     
 install-data-hook:
-	chmod u+x ${bindir}/$(SYNAPSE_CONFIG)
-	$(MKDIR_P) $(prefix)/etc
-	cp $(SOURCEME_SH) $(prefix)/etc
+	chmod u+x ${DESTDIR}${bindir}/$(SYNAPSE_CONFIG)
+	$(MKDIR_P) ${DESTDIR}/etc
+	cp $(SOURCEME_SH) ${DESTDIR}/etc
 
 clean-local:
 	rm -f $(SYNAPSE_CONFIG) $(SOURCEME_SH) $(MRNRUN)
