-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (39 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
COMPILE_FLAGS = --pedantic --coverage --haddock
.PHONY: all
all: bali
.PHONY: clean
clean:
stack clean --allow-different-user --full
@rm -f bali.tix
.PHONY: build
build:
stack --allow-different-user build $(COMPILE_FLAGS)
.PHONY: report
report:
stack --allow-different-user hpc report bali.tix
bali: build
@rm -f bali
@rm -f bali.tix
@ln -s .stack-work/*/*/*/*/bin/bali $@
# Continuous build, builds at every file modification, for development purposes only
.PHONY: cbuild
cbuild:
stack build --allow-different-user --file-watch $(COMPILE_FLAGS)
# Generate test resources
.PHONY: gen
gen:
git submodule update --init --recursive
python3 "scripts/init_test_resources.py"
# Run hspec tests
.PHONY: test
test: gen
@rm -f bali.tix
stack test --allow-different-user $(COMPILE_FLAGS)
.PHONY: ctest
ctest:
@rm -f bali.tix
stack test --allow-different-user --file-watch $(COMPILE_FLAGS)
# Refactor code using hlint, hindent and stylish-haskell
.PHONY: refactor
refactor:
@find . -name "*.hs" -not -path "./out/*" -not -path "./.stack-work/*" -exec hlint --refactor --refactor-options="--inplace" {} \; -exec hindent {} \; -exec stylish-haskell -i {} \;