-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
85 lines (70 loc) · 2.68 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
76
77
78
79
80
81
82
83
84
85
lisps := $(shell find . -follow -type f \( -iname \*.asd -o -iname \*.lisp \) ! -path "./vendor/*")
SBCL_BIN ?= sbclw
SBCL_ARGS ?= --noinform --dynamic-space-size 4096
all: vendor
# Vendor ----------------------------------------------------------------------
.PHONY: vendor
vendor: quickutils
.PHONY: mlsyntax
mlsyntax:
mkdir -p vendor/mlsyntax
cp ~/Workspace/mlutils/mlsyntax.lisp vendor/mlsyntax/
.PHONY: quickutils
quickutils:
cd vendor && sbclw --noinform --load "make-quickutils.lisp" --non-interactive
.PHONY: cl-classified
cl-classified:
mkdir -p vendor/cl-classified
cp ~/Workspace/cl-encrypted/classified.asd vendor/cl-classified/
cp ~/Workspace/cl-encrypted/encrypted.lisp vendor/cl-classified/
cp ~/Workspace/cl-encrypted/vendor/ml/mlsyntax.lisp vendor/cl-classified/vendor/ml/
cp ~/Workspace/cl-encrypted/vendor/ml/mlutils-package.lisp vendor/cl-classified/vendor/ml/
cp ~/Workspace/cl-encrypted/vendor/ml/mlutils.lisp vendor/cl-classified/vendor/ml/
cp ~/Workspace/cl-encrypted/vendor/ml/net.matteolandi.utils.asd vendor/cl-classified/vendor/ml/
# Start -----------------------------------------------------------------------
.PHONY: start
start:
sbcl-vlime ${SBCL_ARGS} \
--eval "(ql:quickload :cl-dotenv)" \
--eval "(.env:load-env #P\"./.env\")" \
--eval "(pushnew '*default-pathname-defaults* asdf:*central-registry*)" \
--eval "(ql:quickload \"AOC\")"
# Info ------------------------------------------------------------------------
.PHONY: lisp-info
lisp-info:
sbclw --noinform --quit \
--load "build/info.lisp"
.PHONY: lisp-info-ros
lisp-info-ros:
ros \
--load "build/info.lisp" \
# Tests -----------------------------------------------------------------------
.PHONY: test
test: test-sbcl
.PHONY: test-sbcl
test-sbcl: $(lisps)
sbclw ${SBCL_ARGS} --quit \
--eval "(ql:quickload :cl-dotenv)" \
--eval "(if (probe-file #P\"./.env\") (.env:load-env #P\"./.env\"))" \
--load "build/setup.lisp" \
--load "build/test.lisp"
.PHONY: test-ros
test-ros: $(lisps)
ros run -- ${SBCL_ARGS} --quit \
--eval "(ql:quickload :cl-dotenv)" \
--eval "(if (probe-file #P\"./.env\") (.env:load-env #P\"./.env\"))" \
--load "build/setup.lisp" \
--load "build/test.lisp"
# Report warnings ------------------------------------------------------------
.PHONY: report-warnings
report-warnings: report-warnings-sbcl
.PHONY: report-warnings-sbcl
report-warnings-sbcl: $(lisps)
sbclw --noinform --quit \
--load "build/setup.lisp" \
--load "build/report-warnings.lisp"
.PHONY: report-warnings-ros
report-warnings-ros: $(lisps)
ros run \
--load "build/setup.lisp" \
--load "build/report-warnings.lisp"