Makefile (774B)
1 # drist – a simple hosts deployment tool 2 # See the LICENSE file for copyright and license details. 3 .POSIX: 4 5 BIN = drist 6 PREFIX ?= /usr/local 7 BINDIR ?= ${PREFIX}/bin 8 MANDIR ?= ${PREFIX}/share/man 9 10 all: 11 12 install: 13 @echo installing executable to "${DESTDIR}${PREFIX}/bin" 14 @mkdir -p "${DESTDIR}${BINDIR}" 15 @install -m 0755 "${BIN}" "${DESTDIR}${BINDIR}/${BIN}" 16 @echo installing manual page to ${DESTDIR}${MANDIR}/man1 17 @mkdir -p "${DESTDIR}${MANDIR}/man1" 18 @install -m 0644 "${BIN}.1" "${DESTDIR}${MANDIR}/man1/${BIN}.1" 19 20 uninstall: 21 @echo removing executable file from "${DESTDIR}${PREFIX}/bin" 22 @rm -f "${DESTDIR}${BINDIR}/${BIN}" 23 @echo removing manual page from ${DESTDIR}${MANDIR}/man1 24 @rm -f ${DESTDIR}${MANDIR}/man1/${BIN}.1 25 26 .PHONY: all install uninstall clean