-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
61 lines (50 loc) · 1.54 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
SBCL_BIN=sbcl
SBCL_WORKSPACE?=2048
SBCL_OPTIONS=--noinform --no-userinit --no-sysinit --non-interactive
SBCL=$(SBCL_BIN) --dynamic-space-size $(SBCL_WORKSPACE) $(SBCL_OPTIONS)
# tell me where Quicklisp is
ifeq ($(HOME), /github/home)
# when running on GitHub Actions, use Docker filesystem location
QUICKLISP_HOME=/root/quicklisp
else
QUICKLISP_HOME=$(HOME)/quicklisp
endif
QUICKLISP_SETUP=$(QUICKLISP_HOME)/setup.lisp
# tell me where local projects are
ifeq ($(HOME), /github/home)
# when running on GitHub Actions, use Docker filesystem location
QUICKLISP_PROJECTS=/src
else
QUICKLISP_PROJECTS=../
endif
QUICKLISP=$(SBCL) --load $(QUICKLISP_SETUP) \
--eval '(push (truename ".") asdf:*central-registry*)' \
--eval "(push (truename \"$(QUICKLISP_PROJECTS)\") ql:*local-project-directories*)"
.PHONY: test
test:
$(QUICKLISP) \
--eval "(ql:quickload :anatevka-tests)" \
--eval "(asdf:test-system :anatevka)"
###
### clean targets, borrowed from QVM
###
# Clean the executables
clean:
rm -f qvm qvm-ng build-output.log system-index.txt
# Clean the Lisp cache, reindex local projects.
clean-cache:
@echo "Deleting $(LISP_CACHE)"
$(QUICKLISP) \
--eval "(ql:register-local-projects)"
rm -rf "$(LISP_CACHE)"
clean-qvm-cache:
@echo "Deleting $(QVM_LISP_CACHE)"
$(QUICKLISP) \
--eval "(ql:register-local-projects)"
rm -rf $(QVM_LISP_CACHE)
clean-quicklisp:
@echo "Cleaning up old projects in Quicklisp"
$(QUICKLISP) \
--eval '(ql-dist:clean (ql-dist:dist "quicklisp"))'
cleanall: clean clean-cache clean-quicklisp
@echo "All cleaned and reindexed."