-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (48 loc) · 1.63 KB
/
Makefile
File metadata and controls
68 lines (48 loc) · 1.63 KB
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
.PHONY : build install agda repl libHtml testContainers test succeed fail golden golden-succeed golden-fail clean docs fixWhitespace checkWhitespace have-bin-%
FILES = $(shell find src -type f)
build :
cabal build
install :
cabal install --overwrite-policy=always
agda :
cabal install Agda --program-suffix=-erased --overwrite-policy=always
repl :
cabal repl
libHtml :
cabal run agda2hs -- --html --include-path lib/base lib/base/Haskell/Prelude.agda
cp html/Haskell.Prelude.html html/index.html
testContainers:
cd ./lib/containers && ./generate-haskell.sh && cabal build containers-prop
# Run all tests
test : checkWhitespace test-on-CI
# Run all tests except for fix-whitespace
test-on-CI : succeed fail testContainers
# Run only successful tests
succeed :
cabal test agda2hs-test --test-options='-p Succeed'
# Run only failing tests
fail :
cabal test agda2hs-test --test-options='-p Fail'
# Update all golden values
golden : golden-succeed golden-fail
# Update golden values for successful tests
golden-succeed :
cabal test agda2hs-test --test-options='-p Succeed --accept'
# Update golden values for failing tests
golden-fail :
cabal test agda2hs-test --test-options='-p Fail --accept'
clean :
cabal clean
rm -rf test/_build/
docs :
make -C docs html
FIXW_BIN = fix-whitespace
## Fix the whitespace issue.
fixWhitespace : have-bin-$(FIXW_BIN) fix-whitespace.yaml
$(FIXW_BIN)
## Check the whitespace issue without fixing it.
checkWhitespace : have-bin-$(FIXW_BIN) fix-whitespace.yaml
$(FIXW_BIN) --check
## Installing binaries for developer services
have-bin-% :
@($* --help > /dev/null) || $(CABAL) install --ignore-project $*