--- templates/default/all/Makefile.in.org	2014-06-21 19:51:31.487457236 +0900
+++ templates/default/all/Makefile.in	2014-06-21 19:51:46.935435015 +0900
@@ -369,9 +369,9 @@
 	| sh
 
 install-data-local:
-	mkdir -p $(templatesdir)
-	cp -p *.html.* $(templatesdir)
-	cp -p *.js.* $(templatesdir)
+	mkdir -p $(DESTDIR)$(templatesdir)
+	cp -p *.html.* $(DESTDIR)$(templatesdir)
+	cp -p *.js.* $(DESTDIR)$(templatesdir)
 
 clean:
 	rm -f zphoto.css .photo.html *.html.* *.js.* *.txt