]> gitweb.michael.orlitzky.com - mailbox-count.git/blob - makefile
mailbox-count.cabal: bump to version 0.0.8
[mailbox-count.git] / makefile
1 PN = mailbox-count
2 BIN = dist/build/$(PN)/$(PN)
3 SRCS = $(shell find src/ -type f -name '*.hs')
4
5 HCFLAGS += -Weverything \
6 -Wno-implicit-prelude \
7 -Wno-safe \
8 -Wno-unsafe \
9 -Wno-all-missed-specialisations \
10 -Wno-prepositive-qualified-module \
11 -Wno-missing-safe-haskell-mode \
12 -Wno-missing-deriving-strategies \
13 -Wno-missing-kind-signatures \
14 -rtsopts \
15 -threaded
16
17
18 .PHONY : dist hlint
19
20 $(BIN): $(PN).cabal $(SRCS)
21 runghc Setup.hs configure --user
22 runghc Setup.hs build --ghc-options="${HCFLAGS}"
23
24 doc: $(PN).cabal $(SRCS)
25 runghc Setup.hs haddock --all \
26 --hyperlink-source \
27 --haddock-options="--ignore-all-exports"
28
29
30 #
31 # Tests
32 #
33 TESTSUITE_BIN = dist/build/testsuite/testsuite
34 DOCTESTS_BIN = dist/build/doctests/doctests
35 TEST_SRCS := $(shell find test/ -type f -name '*.hs')
36
37 $(TESTSUITE_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
38 runghc Setup.hs configure --user --enable-tests --prefix=/
39 runghc Setup.hs build --ghc-options="${HCFLAGS}"
40
41
42 $(DOCTESTS_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
43 runghc Setup.hs configure --user --enable-tests
44 runghc Setup.hs build --ghc-options="${HCFLAGS}"
45
46 check: $(BIN) $(TESTSUITE_BIN) $(DOCTESTS_BIN)
47 runghc Setup.hs test
48
49
50 #
51 # Misc
52 #
53
54 dist:
55 runghc Setup.hs configure
56 TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
57
58 hlint:
59 hlint --ignore="Use camelCase" \
60 --ignore="Redundant bracket" \
61 --color \
62 src
63
64 clean:
65 runghc Setup.hs clean
66 find ./ -type f -name '*.prof' -delete
67 find ./ -type f -name '*.o' -delete
68 find ./ -type f -name '*.hi' -delete