]> gitweb.michael.orlitzky.com - mailbox-count.git/blob - makefile
mailbox-count.cabal: update to v0.0.6.
[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 -rtsopts \
11 -threaded
12
13
14 .PHONY : dist hlint
15
16 $(BIN): $(PN).cabal $(SRCS)
17 runghc Setup.hs configure --user
18 runghc Setup.hs build --ghc-options="${HCFLAGS}"
19
20 doc: $(PN).cabal $(SRCS)
21 runghc Setup.hs hscolour --all
22 runghc Setup.hs haddock --all \
23 --hyperlink-source \
24 --haddock-options="--ignore-all-exports"
25
26
27 #
28 # Tests
29 #
30 TESTSUITE_BIN = dist/build/testsuite/testsuite
31 DOCTESTS_BIN = dist/build/doctests/doctests
32 TEST_SRCS := $(shell find test/ -type f -name '*.hs')
33
34 $(TESTSUITE_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
35 runghc Setup.hs configure --user --enable-tests --prefix=/
36 runghc Setup.hs build --ghc-options="${HCFLAGS}"
37
38
39 $(DOCTESTS_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
40 runghc Setup.hs configure --user --enable-tests
41 runghc Setup.hs build --ghc-options="${HCFLAGS}"
42
43 check: $(BIN) $(TESTSUITE_BIN) $(DOCTESTS_BIN)
44 runghc Setup.hs test
45
46
47 #
48 # Misc
49 #
50
51 dist:
52 runghc Setup.hs configure
53 TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
54
55 hlint:
56 hlint --ignore="Use camelCase" \
57 --ignore="Redundant bracket" \
58 --color \
59 src
60
61 clean:
62 runghc Setup.hs clean
63 find ./ -type f -name '*.prof' -delete
64 find ./ -type f -name '*.o' -delete
65 find ./ -type f -name '*.hi' -delete