]> gitweb.michael.orlitzky.com - email-validator.git/blob - makefile
src/Main.hs: support NULLMX fully
[email-validator.git] / makefile
1 PN = email-validator
2 BIN = dist/build/$(PN)/$(PN)
3 TESTSUITE_BIN = dist/build/testsuite/testsuite
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 : doc test dist hlint
21
22 $(BIN): $(PN).cabal src/*.hs
23 runghc Setup.hs clean
24 runghc Setup.hs configure --user
25 runghc Setup.hs build --ghc-options="${HCFLAGS}"
26
27 doc: src/*.hs
28 runghc Setup.hs configure --user
29 runghc Setup.hs haddock --all \
30 --hyperlink-source \
31 --haddock-options="--ignore-all-exports"
32
33 clean:
34 runghc Setup.hs clean
35
36
37 $(TESTSUITE_BIN): $(PN).cabal src/*.hs test/*.hs
38 runghc Setup.hs configure --user --enable-tests
39 runghc Setup.hs build --ghc-options="${HCFLAGS}"
40
41 check: $(BIN) $(TESTSUITE_BIN)
42 runghc Setup.hs test
43
44 dist:
45 runghc Setup.hs configure
46 runghc Setup.hs sdist
47
48 hlint:
49 hlint --ignore="Use camelCase" \
50 --ignore="Redundant bracket" \
51 --color \
52 src