]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - makefile
spline3.cabal: bump version to 1.0.2
[spline3.git] / makefile
index 5f586a7012b099fddf1155fa92e61e2dde7fe171..9fdfc33ef76b81490f9851f87112e72349278571 100644 (file)
--- a/makefile
+++ b/makefile
@@ -6,30 +6,34 @@ BIN           = dist/build/spline3/spline3
 DOCTESTS_BIN  = dist/build/doctests/doctests
 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 \
+           -Wno-missing-kind-signatures \
+           -rtsopts \
+           -threaded
+
 .PHONY : test doc dist hlint
 
 $(BIN): $(PN).cabal $(SRCS)
-       runghc Setup.hs configure \
-                        --user \
-                        --prefix=/ \
-                        --flags=${FLAGS}
-       runghc Setup.hs build
+       runghc Setup.hs configure --user --prefix=/
+       runghc Setup.hs build --ghc-options="${HCFLAGS}"
 
 $(DOCTESTS_BIN): $(SRCS) test/Doctests.hs
-       runghc Setup.hs configure \
-                        --user \
-                        --prefix=/ \
-                        --flags=${FLAGS} \
-                        --enable-tests
-       runghc Setup.hs build
+       runghc Setup.hs configure --user --prefix=/ --enable-tests
+       runghc Setup.hs build --ghc-options="${HCFLAGS}"
 
 $(TESTSUITE_BIN): $(SRCS) test/TestSuite.hs
-       runghc Setup.hs configure \
-                        --user \
-                        --prefix=/ \
-                        --flags=${FLAGS} \
-                        --enable-tests
-       runghc Setup.hs build
+       runghc Setup.hs configure --user --prefix=/ --enable-tests
+       runghc Setup.hs build --ghc-options="${HCFLAGS}"
 
 clean:
        runghc Setup.hs clean
@@ -37,7 +41,7 @@ clean:
        rm -f *.prof
        rm -f .hpc
 
-test:  $(PN).cabal $(TESTSUITE_BIN) $(DOCTESTS_BIN) $(BIN)
+check:  $(PN).cabal $(TESTSUITE_BIN) $(DOCTESTS_BIN) $(BIN)
        runghc Setup.hs test
 
 dist:
@@ -47,8 +51,7 @@ dist:
 doc: dist/doc
 
 dist/doc: $(PN).cabal $(SRCS)
-       runghc Setup.hs configure --user --prefix=/ --flags=${FLAGS}
-       runghc Setup.hs hscolour --all
+       runghc Setup.hs configure --user --prefix=/
        runghc Setup.hs haddock --all \
                                 --hyperlink-source \
                                 --haddock-options="--ignore-all-exports"