-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
48 lines (36 loc) · 1.13 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
.PHONY: all test clean
SBCL=$(shell which sbcl)
ECL=$(shell which ecl)
CLISP=$(shell which clisp)
CCL=$(shell which ccl)
ifeq ($(LISP),SBCL) # if compiler is sbcl
BUILD = $(SBCL) --control-stack-size 100000 --noprint --quit --load cli.lisp
TEST = $(SBCL) --disable-debugger --eval
endif
ifeq ($(LISP),ECL) # else if compiler is ecl
BUILD = $(ECL) -load cli.lisp
TEST = $(ECL) -q -eval
endif
ifeq ($(LISP),CLISP) # else if compiler is clisp
BUILD = $(CLISP) -x '(load "cli.lisp")'
TEST = $(CLISP) -x
endif
ifeq ($(LISP),CCL) # else if compiler is ccl
BUILD = $(CCL) -l cli.lisp
TEST = $(CCL) -e
endif
ifndef LISP
BUILD = $(SBCL) --control-stack-size 100000 --quit --noprint --load cli.lisp
TEST = $(SBCL) --quit --eval
endif
erudite: ## Build erudite executable
$(BUILD)
install: ## Install erudite executable in /usr/local/bin
cp erudite /usr/local/bin
test: ## Run tests
$(TEST) '(progn (asdf:test-system :erudite)(uiop/image:quit))'
clean: ## Clean
rm erudite
all: erudite ## Build erudite
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'