]> gitweb.michael.orlitzky.com - email-validator.git/blobdiff - makefile
makefile,email-validator.cabal: move ghc-options to the makefile.
[email-validator.git] / makefile
index 904739deb212ff93d74f26610d977453cd4b3f5a..41b916c8eeba2c7c5ff2c35f00410cd6e9bacc71 100644 (file)
--- a/makefile
+++ b/makefile
@@ -2,21 +2,29 @@ PN            = email-validator
 BIN           = dist/build/$(PN)/$(PN)
 TESTSUITE_BIN = dist/build/testsuite/testsuite
 
+# Append these warnings to the HCFLAGS environment variable that gets
+# passed as options to GHC. We want to see the warnings while developing
+# but don't want them hard-coded in the cabal file for end users.
+HCFLAGS += -Weverything \
+           -Wno-implicit-prelude \
+           -Wno-safe \
+           -Wno-unsafe \
+           -Wno-all-missed-specialisations \
+           -Wno-prepositive-qualified-module \
+           -Wno-missing-safe-haskell-mode \
+           -Wno-missing-deriving-strategies \
+           -rtsopts \
+           -threaded
+
 .PHONY : test dist hlint
 
 $(BIN): $(PN).cabal src/*.hs
        runghc Setup.hs clean
        runghc Setup.hs configure --user
-       runghc Setup.hs build
-
-profile: $(PN).cabal src/*.hs
-       runghc Setup.hs clean
-       runghc Setup.hs configure --user --enable-executable-profiling
-       runghc Setup.hs build
+       runghc Setup.hs build --ghc-options="${HCFLAGS}"
 
 doc: src/*.hs
        runghc Setup.hs configure --user
-       runghc Setup.hs hscolour --all
        runghc Setup.hs haddock --all \
                                --hyperlink-source \
                                 --haddock-options="--ignore-all-exports"
@@ -27,9 +35,9 @@ clean:
 
 $(TESTSUITE_BIN): $(PN).cabal src/*.hs test/*.hs
        runghc Setup.hs configure --user --enable-tests
-       runghc Setup.hs build
+       runghc Setup.hs build --ghc-options="${HCFLAGS}"
 
-test: $(BIN) $(TESTSUITE_BIN)
+check: $(BIN) $(TESTSUITE_BIN)
        runghc Setup.hs test
 
 dist: