--- Makefile.orig 2018-09-11 14:00:08.000000000 -0700 +++ Makefile 2018-09-11 19:41:22.000000000 -0700 @@ -70,6 +70,11 @@ # If "|| exit 1" is not present, the error code from make in subdirectories # is not returned and make goes on even if compilation has failed +all-j : + $(MAKE) pw && $(MAKE) pp && $(MAKE) ph && $(MAKE) ld1 && $(MAKE) xspectra && $(MAKE) cp && $(MAKE) neb + +.PHONY: install pw pp neb xspectra + pw : pwlibs if test -d PW ; then \ ( cd PW ; $(MAKE) TLDEPS= all || exit 1) ; fi @@ -80,8 +83,9 @@ ( cd CPV ; $(MAKE) TLDEPS= all || exit 1) ; fi ph : phlibs - if test -d PHonon; then \ - ( cd PHonon; $(MAKE) TLDEPS= all || exit 1) ; fi + ( cd PHonon/PH && $(MAKE) TLDEPS= all ; cd .. || exit 1 ) + ( cd PHonon/Gamma && $(MAKE) TLDEPS= all ; cd .. || exit 1 ) + ( cd PHonon/FD && $(MAKE) TLDEPS= all ; cd .. || exit 1 ) hp : hplibs if test -d HP; then \ @@ -296,10 +296,10 @@ ############################################################# install : - mkdir -p $(PREFIX)/bin ; \ + mkdir -p $(DESTDIR)$(PREFIX)/bin ; \ for x in `find * ! -path "test-suite/*" -name *.x -type f` ; do \ - cp -v $$x $(PREFIX)/bin/ ; done + cp -v $$x $(DESTDIR)$(PREFIX)/bin/ ; done - @echo -e '\nQuantum ESPRESSO binaries are installed in $(PREFIX)/bin\n' + @echo -e '\nQuantum ESPRESSO binaries installed in $(DESTDIR)$(PREFIX)/bin\n' ######################################################### # Run test-suite for numerical regression testing