Add Makefile - notes - a console notes manager using git DIR Log DIR Files DIR Refs DIR Tags DIR LICENSE --- DIR commit 50c7e26a5acf0153960eb30d30316cb7be21d320 DIR parent 8dfecc9b710ba67a890e72a76f8059caada20c90 HTML Author: Solene Rapenne <solene@perso.pw> Date: Sat, 14 Jul 2018 12:08:37 +0200 Add Makefile Diffstat: A Makefile | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+), 0 deletions(-) --- DIR diff --git a/Makefile b/Makefile @@ -0,0 +1,30 @@ +# notes – a console notes manager using git +# See the LICENSE file for copyright and license details. +.POSIX: + +VERSION = 0.1 + +BIN = notes +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}" + @echo installing manual page to ${DESTDIR}${MANDIR}/man1 + @mkdir -p ${DESTDIR}${MANDIR}/man1 + @sed "s/VERSION/${VERSION}/g" < ${BIN}.1 > ${DESTDIR}${MANDIR}/man1/${BIN}.1 + @chmod 644 ${DESTDIR}${MANDIR}/man1/${BIN}.1 + +uninstall: + @echo removing executable file from "${DESTDIR}${PREFIX}/bin" + @rm -f "${DESTDIR}${BINDIR}/${BIN}" + @echo removing manual page from ${DESTDIR}${MANDIR}/man1 + @rm -f ${DESTDIR}${MANDIR}/man1/${BIN}.1 + +.PHONY: all install uninstall clean