Improve Makefile - clic - Clic is an command line interactive client for gopher written in Common LISP HTML git clone git://bitreich.org/clic/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/clic/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 9a5c85ae756c444f96fe5dede84271de155dfe0d DIR parent 123b5d235718046abcc402afd0b50790ca5c6c87 HTML Author: Quentin Rameau <quinq@fifth.space> Date: Fri, 3 Nov 2017 18:35:53 +0100 Improve Makefile Diffstat: M Makefile | 37 ++++++++++++++++--------------- 1 file changed, 19 insertions(+), 18 deletions(-) --- DIR diff --git a/Makefile b/Makefile @@ -1,32 +1,33 @@ # clic – a simple gopher client in lisp # See the LICENSE file for copyright and license details. -NAME = clic +.POSIX: -LISP ?= ecl -PREFIX ?= /usr -BINDIR ?= ${PREFIX}/bin -MANDIR ?= ${PREFIX}/share/man/man1 +BIN = clic +LISP = ecl +PREFIX = /usr +BINDIR = ${PREFIX}/bin +MANDIR = ${PREFIX}/share/man/man1 -all: bin +all: ${BIN} -bin: - ecl --load make-binary.lisp +${BIN}: clic.lisp + ${LISP} --load make-binary.lisp -sbcl-bin: - sbcl --load make-binary.lisp +standalone: clic.lisp + ${MAKE} -e LISP=sbcl -install: all - @echo installing executable to ${DESTDIR}${PREFIX}/bin - @mkdir -p ${DESTDIR}${BINDIR} - @cp -f ${NAME} ${DESTDIR}${BINDIR} - @chmod 755 ${DESTDIR}${BINDIR}/${NAME} +install: ${BIN} + @echo installing executable to "${DESTDIR}${PREFIX}/bin" + @mkdir -p "${DESTDIR}${BINDIR}" + @cp -f clic "${DESTDIR}${BINDIR}/${BIN}" + @chmod 755 "${DESTDIR}${BINDIR}/${BIN}" uninstall: - @echo removing executable file from ${DESTDIR}${PREFIX}/bin - @rm -f ${DESTDIR}${BINDIR}/${NAME} + @echo removing executable file from "${DESTDIR}${PREFIX}/bin" + @rm -f "${DESTDIR}${BINDIR}/${BIN}" clean: - rm -f clic clic.o clic.eclh clic.cxx + rm -f "${BIN}" clic.o clic.eclh clic.cxx test: ${LISP} --load clic.lisp --load test.lisp