-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (51 loc) · 1.14 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
.PHONY: build
build: hasch
hasch: src/* app/*
@ cabal install \
--ghc \
--install-method=copy \
--installdir=dist \
--enable-optimization=2 \
--disable-debug-info \
--disable-library-for-ghci \
--enable-executable-stripping \
--enable-library-stripping \
--enable-relocatable \
--overwrite-policy=always
@ cp dist/hasch .
@ rm -rf dist
.PHONY: test
test: unit-test integration-test
.PHONY: unit-test
unit-test:
@ cabal test \
--verbose=1 \
--test-show-details=always
.PHONY: integration-test
integration-test: hasch
cd examples/the-little-schemer && ../../hasch run-all.scm
.PHONY: run
run:
cabal run hasch
.PHONY: lines
lines:
@ find . -type f \( -name "*.hs" -not -path "./tests/*" -not -path "./dist-*/*" \) \
-exec cat {} \; | grep . | wc -l
.PHONY: clean
clean:
rm -f ./hasch
rm -rf dist-newstyle
rm -rf dist
cabal clean
.PHONY: repl
repl: hasch
@ ./hasch
.PHONY: benchmark
benchmark: hasch
cd examples/the-little-schemer && \
hyperfine -m 100 --warmup 10 \
'gosch run-all.scm' \
'scheme --quiet < run-all.scm' \
'loco run-all.scm' \
'../../../rusch/rusch run-all.scm' \
'../../hasch run-all.scm'