# HG changeset patch # User John Schneiderman # Date 1268842208 0 # Node ID 9cf2ae57efb9a70cbbcdf625f90d9188602b8d13 # Parent 94d705d506f9d358e59bbdac689751f250fd7784 Enhancement: adds support for DISTDIR. diff -r 94d705d506f9 -r 9cf2ae57efb9 Makefile --- a/Makefile Wed Mar 17 16:06:24 2010 +0000 +++ b/Makefile Wed Mar 17 16:10:08 2010 +0000 @@ -18,6 +18,7 @@ bindir = "/usr/bin" datadir = "/usr/share" mandir = "/usr/share/man" +DESTDIR = "" ufpm: ufpm.sh @mv ufpm.sh ufpm @@ -28,20 +29,20 @@ .PHONY:install install: - @echo We are going to install to ${bindir}... - @mkdir --parent ${bindir} - @cp ufpm ${bindir} - @chown ${USER}:${USER} ${bindir}/ufpm - @chmod 775 ${bindir}/ufpm - @mkdir --parent ${mandir}/man1 - @cp ufpm.1 ${mandir}/man1 - @chmod 664 ${mandir}/man1/ufpm.1 + @echo We are going to install to ${DESTDIR}${bindir}... + @mkdir --parent ${DESTDIR}${bindir} + @cp ufpm ${DESTDIR}${bindir} + @chown ${USER}:${USER} ${DESTDIR}${bindir}/ufpm + @chmod 775 ${DESTDIR}${bindir}/ufpm + @mkdir --parent ${DESTDIR}${mandir}/man1 + @cp ufpm.1 ${DESTDIR}${mandir}/man1 + @chmod 664 ${DESTDIR}${mandir}/man1/ufpm.1 @echo We have installed ufpm. .PHONY:uninstall uninstall: - @rm -f ${bindir}/ufpm - @rm -f ${mandir}/man1/ufpm.1* + @rm -f ${DESTDIR}${bindir}/ufpm + @rm -f ${DESTDIR}${mandir}/man1/ufpm.1* @echo We have removed ufpm. .PHONY:clean