X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=makefile;h=2061f444e91d607cb8ef8f8d5bb98c66422dd353;hb=ea257ba2e191df27cf23feb98a8110157987bfb9;hp=8605a8920e23cb967fa940229ba8301e32623328;hpb=e47dd37f1757c8ada0c1e25f41af5fa83952c91f;p=hath.git diff --git a/makefile b/makefile index 8605a89..2061f44 100644 --- a/makefile +++ b/makefile @@ -1,27 +1,36 @@ -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/hath/hath +TESTSUITE_BIN = dist/build/testsuite/testsuite -BIN=hath - -.PHONY : test - -all: $(BIN) +.PHONY : test dist $(BIN): src/*.hs - ghc -O2 $(GHC_WARNINGS) --make -o bin/${BIN} src/*.hs + runghc Setup.hs clean + runghc Setup.hs configure --user + runghc Setup.hs build profile: src/*.hs - ghc -O2 $(GHC_WARNINGS) -prof -auto-all --make -o bin/$(BIN) src/*.hs + runghc Setup.hs clean + runghc Setup.hs configure --user --enable-executable-profiling + runghc Setup.hs build + +doc: src/*.hs + runghc Setup.hs configure --user + runghc Setup.hs hscolour --executables + runghc Setup.hs haddock --internal \ + --executables \ + --hyperlink-source clean: - rm -f bin/$(BIN) - rm -f src/*.hi - rm -f src/*.o - rm -f *.prof + runghc Setup.hs clean + + +$(TESTSUITE_BIN): src/*.hs test/TestSuite.hs + runghc Setup.hs configure --user --flags=${FLAGS} --enable-tests + runghc Setup.hs build + +test: $(BIN) $(TESTSUITE_BIN) + runghc Setup.hs test -test: - runghc -i"src" test/TestSuite.hs +dist: + runghc Setup.hs configure + runghc Setup.hs sdist