X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Fhalcyon.git;a=blobdiff_plain;f=makefile;h=986de5c65e6fc0f1f92a71bf8353c8596516699c;hp=da8807630f2643dfeadcebd923d05ed5d63b6a45;hb=93577603f6df06e4627ca13a6f5fe412b28dc817;hpb=17dd116706c4a971e1f5c68daa1656af5eff5cd2 diff --git a/makefile b/makefile index da88076..986de5c 100644 --- a/makefile +++ b/makefile @@ -1,29 +1,35 @@ -GHC_WARNINGS := -Wall -GHC_WARNINGS += -fwarn-hi-shadowing -GHC_WARNINGS += -fwarn-missing-signatures -GHC_WARNINGS += -fwarn-name-shadowing -GHC_WARNINGS += -fwarn-orphans -GHC_WARNINGS += -fwarn-type-defaults +BIN = dist/build/twat/twat +TESTSUITE_BIN = dist/build/testsuite/testsuite -BIN=bin/twat +.PHONY : dist doc test -.PHONY : test +$(BIN): src/*.hs src/Twitter/*.hs + runghc Setup.hs clean + runghc Setup.hs configure --user + runghc Setup.hs build -all: $(BIN) +$(TESTSUITE_BIN): src/*.hs test/TestSuite.hs + runghc Setup.hs configure --user --enable-tests + runghc Setup.hs build -$(BIN): src/Twitter/*.hs src/*.hs - ghc -O2 $(GHC_WARNINGS) --make -o $(BIN) src/Twitter/*.hs src/*.hs +clean: + runghc Setup.hs clean -profile: src/Twitter/*.hs src/*.hs - ghc -O2 $(GHC_WARNINGS) -prof -auto-all --make -o $(BIN) src/Twitter/*.hs src/*.hs +test: $(BIN) $(TESTSUITE_BIN) + runghc Setup.hs test -clean: - rm -f $(BIN) - rm -f src/*.hi - rm -f src/Twitter/*.hi - rm -f src/*.o - rm -f src/Twitter/*.o - rm -f *.prof - -test: - runghc -i"src" test/TestSuite.hs +doc: + runghc Setup.hs hscolour --executables + runghc Setup.hs haddock --internal \ + --executables \ + --hyperlink-source + +hlint: + hlint --ignore="Use camelCase" \ + --ignore="Redundant bracket" \ + --color \ + src + +dist: + runghc Setup.hs configure + runghc Setup.hs sdist