-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (51 loc) · 1.69 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
prefix = /usr/local
bindir = $(prefix)/bin
libdir = $(prefix)/lib
sbcl = $(shell which sbcl)
gpg = gpg
src = src/*.asd src/*.lisp
prg = gpg-tofu gpg-graph gpg-cert-path gpg-count-steps
prgs = $(patsubst %,build/%,$(prg))
docs = $(patsubst %,doc/%.txt,$(prg))
-include config.mk
gpg-utilities: $(prgs)
doc: $(docs)
all: gpg-utilities doc
$(prgs): $(src) quicklisp/setup.lisp
$(sbcl) --script make.lisp $(patsubst build/%,%,$@) '$(gpg)' '$(libdir)/gpg-utilities/'
quicklisp/install.lisp:
mkdir -p quicklisp
wget -O $@ "http://beta.quicklisp.org/quicklisp.lisp"
quicklisp/setup.lisp: quicklisp/install.lisp
$(sbcl) --noinform --no-sysinit --no-userinit --non-interactive \
--load asdf.conf \
--load quicklisp/install.lisp \
--eval '(quicklisp-quickstart:install :path "quicklisp/")'
config.mk:
@echo "bindir = $(bindir)" > $@
@echo "libdir = $(libdir)" >> $@
@echo "sbcl = $(sbcl)" >> $@
@echo "gpg = $(gpg)" >> $@
@cat $@
$(docs): $(src) quicklisp/setup.lisp
$(sbcl) --script doc.lisp $@
install:
install -d -m 755 "$(bindir)" "$(libdir)/gpg-utilities"
install -m 755 build/gpg-tofu "$(bindir)"
install -m 755 build/gpg-graph "$(bindir)"
install -m 755 build/gpg-cert-path "$(bindir)"
install -m 755 build/gpg-count-steps "$(bindir)"
install -m 644 build/src/gpg-utilities.asd "$(libdir)/gpg-utilities"
install -m 644 build/src/gpg-utilities--all-systems.fasl "$(libdir)/gpg-utilities"
uninstall:
rm -f "$(bindir)/gpg-tofu"
rm -f "$(bindir)/gpg-graph"
rm -f "$(bindir)/gpg-cert-path"
rm -f "$(bindir)/gpg-count-steps"
rm -fr "$(libdir)/gpg-utilities"
clean:
rm -fr build
distclean: clean
rm -fr quicklisp
rm -f config.mk
.PHONY: gpg-utilities doc all install uninstall clean distclean