-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (31 loc) · 1.01 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
MAIN_TEST_TARGET = gfs:test:gfs-test
.PHONY:
check: check-build check-test
# FIXME add check-hlint
.PHONY:
check-build:
stack --verbosity error build --fast
.PHONY:
check-test:
stack --verbosity error test --fast --ta='-f silent' $(MAIN_TEST_TARGET)
.PHONY:
testd:
@ghcid -c 'HSPEC_FORMAT=failed-examples stack ghci --test --main-is $(MAIN_TEST_TARGET) --ghci-options=-fobject-code' -T main
# run like this: `m testfw-ext MATCH=InputParser SEED=401874497`
# both variables are optional
.PHONY:
testd-ext:
@ghcid --command "stack ghci --test --main-is $(MAIN_TEST_TARGET) --ghci-options=-fobject-code" --test ":main $${MATCH:+--match \"$${MATCH}\"} $${SEED:+--seed $${SEED}}"
.PHONY:
testfw:
@stack test --fast --file-watch $(MAIN_TEST_TARGET) $${MATCH:+--ta="--match \"/$${MATCH}/\""}
.PHONY:
buildd:
@ghcid -c 'stack ghci'
.PHONY:
buildfw:
@stack build --fast --file-watch
.PHONY:
install-precommit-hook:
# GNU ln supports the `-r` option to create a relative symlink
gln -srv .git-pre-commit .git/hooks/pre-commit