forked from Nike-Inc/bartlett
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (28 loc) · 997 Bytes
/
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
.PHONY: hlint_install, hlint, hlint_apply_refact, hlint_refactor
.PHONY: stylish_haskell_install, stylish_haskell_check
build: clean
@stack install
watch: build
@stack build --test --coverage --haddock --copy-bins --file-watch
static-build: clean
@stack install && strip "${HOME}/.local/bin/bartlett"
package-bin: static-build
@tar czvf bartlett.tar.gz \
-C "${HOME}/.local/bin/" bartlett
clean:
@stack clean
# The following tasks cribbed from: https://lwm.github.io/haskell-static/
hlint_install:
@stack install hlint
hlint: hlint_install
@hlint test/ src/ app/
hlint_apply_refact: hlint_install
@stack install apply-refact
HLINT=hlint --refactor --refactor-options -i {} \;
hlint_refactor: hlint_apply_refact
@find src/ test/ app/ -name "*.hs" -exec $(HLINT)
stylish_haskell_install:
@stack install stylish-haskell
STYLISH=stylish-haskell -i {} \;
stylish_haskell_check: stylish_haskell_install
@find test/ app/ src/ -name "*.hs" -exec $(STYLISH) && git diff --exit-code