-
-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathMakefile
69 lines (53 loc) · 1.34 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
.PHONY: build build-fast clean dump-th ghci ghcid haddock haddock-server hlint install run run-fast test upload watch watch-test
all: build
build:
stack build
build-fast:
stack build --fast
# Clean up the built packages.
clean:
stack clean
# Dump template haskell splices.
dump-th:
-stack build --ghc-options="-ddump-splices"
@echo
@echo "Splice files:"
@echo
@find "$$(stack path --dist-dir)" -name "*.dump-splices" | sort
# Generate the documentation.
haddock:
stack build --haddock
# Install to ~/.local/bin/.
install:
stack install
# Build while watching for changes. Rebuild when change is detected.
watch:
stack build --file-watch --fast .
# Run tests while watching for changes, rebuild and rerun tests when change is
# detected.
watch-test:
stack test --file-watch --fast .
run: build
stack exec -- termonad
run-fast: build-fast
stack exec -- termonad
# Run ghci (REPL).
ghci:
stack ghci
ghcid:
ghcid -c 'stack ghci'
# Run the tests.
test:
stack test
# Run hlint.
hlint:
hlint src/
# This runs a small python websever on port 8001 serving up haddocks for
# packages you have installed.
#
# In order to run this, you need to have run `make build-haddock`.
haddock-server:
cd "$$(stack path --local-doc-root)" && (python -m http.server 8001 || python3 -m http.server 8001)
# Upload this package to hackage.
upload:
stack upload .