]> gitweb.michael.orlitzky.com - hath.git/blob - makefile
hath.cabal: drop a word and a period from the synopsis
[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 -rtsopts \
17 -threaded
18
19 .PHONY : dist hlint
20
21 $(BIN): $(PN).cabal $(SRCS)
22 runghc Setup.hs configure --user
23 runghc Setup.hs build --ghc-options="${HCFLAGS}"
24
25 doc: $(PN).cabal $(SRCS)
26 runghc Setup.hs haddock --all \
27 --hyperlink-source \
28 --haddock-options="--ignore-all-exports"
29
30
31 #
32 # Tests
33 #
34 TESTSUITE_BIN = dist/build/testsuite/testsuite
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 check: $(BIN) $(TESTSUITE_BIN)
43 runghc Setup.hs test
44
45
46 #
47 # Misc
48 #
49
50 clean:
51 runghc Setup.hs clean
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