Add “install” and “uninstall” tasks to Makefile
This commit is contained in:
parent
b3a6062127
commit
17762ad3e4
19
Makefile
19
Makefile
|
@ -1,6 +1,11 @@
|
|||
LISP ?= sbcl
|
||||
|
||||
all: clean build
|
||||
PREFIX ?= /usr/local
|
||||
BINDIR ?= ${PREFIX}/bin
|
||||
MANDIR ?= ${PREFIX}/share/man
|
||||
MAN1DIR ?= ${MANDIR}/man1
|
||||
|
||||
all: build
|
||||
|
||||
clean:
|
||||
-rm mirror-img
|
||||
|
@ -12,13 +17,23 @@ quicklisp:
|
|||
--eval '(ql:add-to-init-file)' \
|
||||
--eval '(quit)'
|
||||
|
||||
build:
|
||||
mirror-img:
|
||||
$(LISP) --load mirror-img.asd \
|
||||
--eval '(ql:quickload :mirror-img)' \
|
||||
--eval '(ql:quickload :mirror-img/unix)' \
|
||||
--eval '(asdf:make :mirror-img/unix)' \
|
||||
--eval '(quit)'
|
||||
|
||||
build: mirror-img
|
||||
|
||||
install: build
|
||||
install -m 775 mirror-img ${BINDIR}
|
||||
install -m 444 mirror-img.1 ${MAN1DIR}
|
||||
|
||||
uninstall:
|
||||
rm ${BINDIR}/mirror-img
|
||||
rm ${MAN1DIR}/mirror-img.1
|
||||
|
||||
test:
|
||||
$(LISP) --load mirror-img.asd \
|
||||
--eval '(ql:quickload :mirror-img)' \
|
||||
|
|
Ŝarĝante…
Reference in New Issue