forked from coalton-lang/coalton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (63 loc) · 2.41 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
66
67
68
69
70
71
72
73
74
75
LISP_CACHE ?= $(HOME)/.cache/common-lisp
SBCL_BIN=sbcl
SBCL=$(SBCL_BIN) --noinform --no-userinit --no-sysinit --non-interactive
QUICKLISP_HOME=$(HOME)/quicklisp
QUICKLISP_SETUP=$(QUICKLISP_HOME)/setup.lisp
QUICKLISP=$(SBCL) --load $(QUICKLISP_HOME)/setup.lisp \
--eval '(push (truename ".") asdf:*central-registry*)' \
--eval "(push (truename \"../\") ql:*local-project-directories*)"
.PHONY: test test-safe
test:
sbcl --noinform \
--non-interactive \
--eval "(asdf:test-system :coalton)"
test-safe:
sbcl --noinform \
--non-interactive \
--eval "(sb-ext:restrict-compiler-policy 'safety 3)" \
--eval "(asdf:test-system :coalton)"
.PHONY: docs
docs:
sbcl --noinform \
--non-interactive \
--eval "(ql:quickload :coalton/doc :silent t)" \
--eval "(coalton-doc:write-stdlib-documentation-to-file \"docs/reference.md\")"
.PHONY: web-docs
web-docs:
sbcl --noinform \
--non-interactive \
--eval "(ql:quickload :coalton/doc :silent t)" \
--eval "(coalton-doc:write-stdlib-documentation-to-file \"../coalton-website/content/reference.md\" :backend :hugo)"
.PHONY: bench
bench:
COALTON_ENV=release sbcl --noinform \
--non-interactive \
--eval "(ql:quickload :coalton/benchmarks :silent t)" \
--eval "(sb-ext::without-gcing (coalton-benchmarks:run-benchmarks))"
.PHONY: parser-coverage
parser-coverage:
mkdir coverage-report || true
sbcl --noinform \
--non-interactive \
--eval "(require :sb-cover)" \
--eval "(declaim (optimize sb-cover:store-coverage-data))" \
--eval "(asdf:test-system :coalton :force '(:coalton :coalton/tests))" \
--eval "(sb-cover:report \
\"coverage-report/\" \
:if-matches (lambda (pathname) \
(string= (directory-namestring pathname) \
(directory-namestring (merge-pathnames \"src/parser/\" (asdf:system-source-directory \"coalton\"))))))"
open coverage-report/cover-index.html
###############################################################################
# CLEAN
###############################################################################
.PHONY: clean-quicklisp clean-cache cleanall
clean-quicklisp:
@echo "Cleaning up old projects in Quicklisp"
$(QUICKLISP) \
--eval '(ql-dist:clean (ql-dist:dist "quicklisp"))'
clean-cache:
@echo "Deleting $(LISP_CACHE)"
rm -rf "$(LISP_CACHE)"
cleanall: clean-cache clean-quicklisp
@echo "All cleaned and reindexed."