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