forked from runtimeverification/haskell-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (44 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
include include.mk
.PHONY: all clean docs haddock jenkins k-frontend \
test test-kore test-k \
kore-exec kore-repl
kore: kore-exec kore-repl
kore-exec: $(KORE_EXEC)
kore-repl: $(KORE_REPL)
k-frontend: $(K)
docs: haddock
haddock:
$(STACK_HADDOCK) haddock \
--fast \
>haddock.log 2>&1 \
|| ( cat haddock.log; exit 1; )
cat haddock.log
if grep -B 2 'Module header' haddock.log; then \
echo >&2 "Please fix the missing documentation!"; \
exit 1; \
else \
rm haddock.log; \
fi
haskell_documentation: haddock
cp -r $$($(STACK_HADDOCK) path --local-doc-root) haskell_documentation
all: kore k-frontend
test: test-kore test-k
test-kore:
$(STACK_TEST) $(STACK_BUILD) \
--coverage \
--test --bench --no-run-benchmarks \
--ta --xml=test-results.xml
coverage_report: test-kore
cp -r $$($(STACK_TEST) path --local-hpc-root) coverage_report
test-k:
$(MAKE) -C test test
clean:
$(STACK) clean --full
$(STACK_HADDOCK) clean --full
$(STACK_TEST) clean --full
find . -name '*.tix' -exec rm -f '{}' \;
rm -f kore/test-results.xml
rm -rf haskell_documentation
rm -rf coverage_report
rm -rf $(BUILD_DIR)
$(MAKE) -C test clean