]> gitweb.michael.orlitzky.com - hath.git/blob - makefile
makefile: disable -Wmissing-kind-signatures warnings
[hath.git] / makefile
1 PN = hath
2 BIN = dist/build/$(PN)/$(PN)
3 SRCS = $(shell find src/ -type f -name '*.hs')
4
5 # Append these warnings to the HCFLAGS environment variable that gets
6 # passed as options to GHC. We want to see the warnings while developing
7 # but don't want them hard-coded in the cabal file for end users.
8 HCFLAGS += -Weverything \
9 -Wno-implicit-prelude \
10 -Wno-safe \
11 -Wno-unsafe \
12 -Wno-all-missed-specialisations \
13 -Wno-prepositive-qualified-module \
14 -Wno-missing-safe-haskell-mode \
15 -Wno-missing-deriving-strategies \
16 -Wno-missing-kind-signatures \
17 -rtsopts \
18 -threaded
19
20 .PHONY : dist hlint
21
22 $(BIN): $(PN).cabal $(SRCS)
23 runghc Setup.hs configure --user
24 runghc Setup.hs build --ghc-options="${HCFLAGS}"
25
26 doc: $(PN).cabal $(SRCS)
27 runghc Setup.hs haddock --all \
28 --hyperlink-source \
29 --haddock-options="--ignore-all-exports"
30
31
32 #
33 # Tests
34 #
35 TESTSUITE_BIN = dist/build/testsuite/testsuite
36 TEST_SRCS := $(shell find test/ -type f -name '*.hs')
37
38 $(TESTSUITE_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
39 runghc Setup.hs configure --user --enable-tests --prefix=/
40 runghc Setup.hs build --ghc-options="${HCFLAGS}"
41
42
43 check: $(BIN) $(TESTSUITE_BIN)
44 runghc Setup.hs test
45
46
47 #
48 # Misc
49 #
50
51 clean:
52 runghc Setup.hs clean
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