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