Improve makefile, thanks to Thomas - drist - a remote deployment tool HTML git clone git://bitreich.org/drist/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/drist/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 9131a56282d056474e4d59233dcf3ad2ec9b24cc DIR parent 62e58cb8b7d58738fe0863272d84883d78a7043a HTML Author: Solene Rapenne <solene@perso.pw> Date: Thu, 6 Dec 2018 09:18:22 +0100 Improve makefile, thanks to Thomas Diffstat: M Makefile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) --- DIR diff --git a/Makefile b/Makefile @@ -3,20 +3,17 @@ .POSIX: BIN = drist -PREFIX = /usr -BINDIR = ${PREFIX}/bin -MANDIR = ${PREFIX}/share/man +PREFIX ?= /usr +BINDIR ?= ${PREFIX}/bin +MANDIR ?= ${PREFIX}/share/man all: install: @echo installing executable to "${DESTDIR}${PREFIX}/bin" - @mkdir -p "${DESTDIR}${BINDIR}" - @cp -f "${BIN}" "${DESTDIR}${BINDIR}/${BIN}" - @chmod 755 "${DESTDIR}${BINDIR}/${BIN}" + @install -D "${BIN}" "${DESTDIR}${BINDIR}/${BIN}" @echo installing manual page to ${DESTDIR}${MANDIR}/man1 - @mkdir -p ${DESTDIR}${MANDIR}/man1 - @chmod 644 ${DESTDIR}${MANDIR}/man1/${BIN}.1 + @install -D "${BIN}.1" "${DESTDIR}${MANDIR}/man1/${BIN}.1" uninstall: @echo removing executable file from "${DESTDIR}${PREFIX}/bin"