forked from jappeace/persistent-event-source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
66 lines (51 loc) · 1.33 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
OPTIMIZATION=-O0
build:
cabal new-build all -j --ghc-options $(OPTIMIZATION)
.PHONY: test
test:
cabal new-test -j --ghc-options $(OPTIMIZATION)
haddock:
cabal new-haddock all
haddock-hackage:
cabal new-haddock all --haddock-for-hackage --haddock-option=--hyperlinked-source
echo "the hackage ui doesn't accept the default format, use command instead"
cabal upload -d --publish ./dist-newstyle/*-docs.tar.gz
hpack:
nix-shell ./nix/hpack-shell.nix --run "make update-cabal"
ghcid: clean hpack
ghcid \
--test="main" \
--command="ghci" \
test/Test
ghcid-app: clean hpack
ghcid \
--main="main" \
--command="ghci" \
app/exe
ghci:
ghci app/exe
etags:
hasktags -e ./src
update-cabal: etags
hpack --force ./
clean:
rm -fR dist dist-*
find . -name '*.hi' -type f -delete
find . -name '*.o' -type f -delete
find . -name '*.dyn_hi' -type f -delete
find . -name '*.dyn_o' -type f -delete
find . -name 'autogen*' -type f -delete
.PHONY: test
sdist: hpack
nix-build . # ad-hoc proof it builds
cabal sdist
run:
cabal new-run exe --ghc-options $(OPTIMIZATION) -- \
brittany_:
$(shell set -x; for i in `fd hs`; do hlint --refactor --refactor-options=-i $$i; brittany --write-mode=inplace $$i; done)
brittany:
nix-shell ./nix/travis-shell.nix --run "make brittany_"
bundle:
rm -f result
nix-build nix/bundle.nix
mv result template