-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (35 loc) · 933 Bytes
/
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
SHELL := /bin/bash
.PHONY: all deps build test run lint clean
all: build
deps:
cabal install --only-dependencies --enable-tests
sudo cabal install --global graphmod
apt-get install -y xdot
build:
@cabal build --ghc-options=$(GHC_OPTS)
test:
@cabal test --show-details=always --test-options="--color"
test-loop:
@res=0; while [[ $$res == 0 ]]; do echo "=== Test ==="; make test; res=$$?; sleep 1; done
run:
@cabal run main
lint:
@hlint . \
--ignore="Eta reduce" \
--ignore="Reduce duplication" \
--ignore="Use camelCase"
graphmod:
@find src -name '*.hs' | xargs graphmod -a -q | xdot
graphmod-all:
@find . -name '*.hs' | xargs graphmod -a -q | xdot
todo:
@find . -name '*.hs' \
| xargs grep -i \
"todo\|fixme\|not implemented" \
--color=always -n \
|| exit 0
clean:
@find . -name "*.o" -type f -delete
@find . -name "*.hi" -type f -delete
@find . -name "*.tix" -type f -delete
@cabal clean