-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
72 lines (56 loc) · 1.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
SHELL := /bin/bash
output_dir = /tmp/online_atps
tests_path = test/basics
OnlineATPs = dist/build/online-atps/online-atps
.PHONY: TAGS
TAGS :
fast-tags -R -e src/
.PHONY : errors
errors :
shelltest --color --execdir --precise --extension=.test $(tests_path)/
@echo "$@ succeeded!"
# Hlint test
# Requires HLint >= 1.9.36 and run `cabal build` or `cabal install`
# before.
.PHONY : hlint
hlint :
hlint --color=never Setup.hs
hlint --color=never \
--cpp-file=dist/build/online-atps/autogen/cabal_macros.h \
--cpp-include=src/OnlineATPs/ \
src/
@echo "$@ succeeded!"
.PHONY : haddock
haddock :
cabal configure
cabal haddock --executables \
--haddock-option=--use-unicode \
--hyperlink-source
@echo "$@ succeeded!"
.PHONY : install-bin
install-bin :
cabal install --disable-documentation
.PHONY : install-fix-whitespace
install-fix-whitespace :
cd src/fix-whitespace && cabal install
.PHONY : check-whitespace
check-whitespace :
fix-whitespace --check
.PHONY : TODO
TODO :
find . -type d \( -path './.git' -o -path './dist' \) -prune -o -print \
| xargs grep -I 'TODO' \
| sort
.PHONY : clean
clean :
find . -type f -name '*.hi' -delete
find . -type f -name '*.o' -delete
find . -type f -name 'atps.txt' -delete
rm -f -r $(output_dir)
.PHONY : tests
tests :
make errors
make hlint
make check-whitespace
make haddock
@echo "$@ succeeded!"