-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (49 loc) · 1.47 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
SHELL = /bin/bash
HS = $(shell find app/ src/ test/ -name '*.hs')
.PHONY: test $(HS)
update-and-build: update build
update:
cabal sandbox init
cabal update
cabal install -ffast --only-dependencies --disable-optimization
test:
cabal configure --disable-optimization --enable-tests
cabal test --show-details=direct --test-option=--color=always
test-coverage:
cabal configure --disable-optimization --enable-coverage --enable-tests
cabal test --show-details=direct --test-option=--color=always
doc:
cabal haddock
build:
cabal configure --disable-optimization
cabal build
install:
cp dist/build/hamsql/hamsql /usr/local/bin/
hamsql --bash-completion-script hamsql > /etc/bash_completion.d/hamsql
dev-format-code: $(HS)
$(HS):
-@hindent --sort-imports $@
-@hlint -j --no-summary $@
# ununsual options
dev-rebuild:
cabal build --ghc-options="-fforce-recomp"
dev-build-optim:
cabal configure --enable-optimization
cabal build --ghc-options="-fforce-recomp"
dev-modules:
find src/ -name '*.hs' -printf ' %P\n' | sort | sed -e 's/\.hs//' -e 's/\//\./g' | sort
dev-lang-ext:
grep -h -r '# LANGUAGE' src/ | sort | uniq | sed -e 's/{-# LANGUAGE / /' | sed -e 's/ #-}/,/'
dev-package-status:
dpkg-query -l \
ghc \
cabal-install \
libghc-aeson-dev \
libghc-file-embed-dev \
libghc-network-uri-dev \
libghc-optparse-applicative-dev \
libghc-pandoc-dev \
libghc-postgresql-simple-dev \
libghc-text-dev \
libghc-unordered-containers-dev \
libghc-yaml-dev