X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=makefile;h=12779b2d5b595087246cfcd8d425333d5a879d6d;hb=refs%2Fheads%2Fmaster;hp=3862b333e3dbf6fd4de745e560814c56554969bf;hpb=ca495d22b5c5e7dcd6dfc0b21c2fa5e605eae2c6;p=spline3.git diff --git a/makefile b/makefile index 3862b33..9fdfc33 100644 --- a/makefile +++ b/makefile @@ -6,40 +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 - -llvm: $(PN).cabal $(SRCS) - FLAGS="llvm" make - -profile: $(SRCS) - runghc Setup.hs configure \ - --user \ - --prefix=/ \ - --enable-executable-profiling - runghc Setup.hs build + runghc Setup.hs configure --user --prefix=/ --enable-tests + runghc Setup.hs build --ghc-options="${HCFLAGS}" clean: runghc Setup.hs clean @@ -47,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: @@ -57,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"