Index: espresso/install/make.inc.in
===================================================================
--- espresso.orig/install/make.inc.in
+++ espresso/install/make.inc.in
@@ -189,4 +189,6 @@ QELIBS         = $(BEEF_LIBS) $(LIBXC_LI
 WGET = @wget@
 
 # Install directory - "make install" copies *.x executables there
-PREFIX = @prefix@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
Index: espresso/Makefile
===================================================================
--- espresso.orig/Makefile
+++ espresso/Makefile
@@ -261,10 +261,10 @@ links : bindir
 #############################################################
 
 install : 
-	mkdir -p $(PREFIX)/bin ; \
+	mkdir -p $(DESTDIR)$(bindir) ; \
 	for x in `find * ! -path "test-suite/*" -name *.x -type f` ; do \
-		cp -v $$x $(PREFIX)/bin/ ; done
-	@echo -e '\nQuantum ESPRESSO binaries are installed in $(PREFIX)/bin\n'
+		cp -v $$x $(DESTDIR)$(bindir)/ ; done
+	@echo -e '\nQuantum ESPRESSO binaries are installed in $(DESTDIR)$(bindir)\n'
 
 #########################################################
 # Other targets: clean up
