]> gitweb.michael.orlitzky.com - hath.git/blobdiff - makefile
Remove useless --flags in makefile.
[hath.git] / makefile
index 50dda0fb4fc5a7c639a07373f0a35620d48e2855..5d42778f0942b95ef9a0266ed324f43ba470eadb 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,6 +1,9 @@
-.PHONY : test
+BIN           = dist/build/hath/hath
+TESTSUITE_BIN = dist/build/testsuite/testsuite
 
-hath: src/*.hs
+.PHONY : test dist hlint
+
+$(BIN): src/*.hs
        runghc Setup.hs clean
        runghc Setup.hs configure --user
        runghc Setup.hs build
@@ -10,12 +13,30 @@ profile: src/*.hs
        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:
        runghc Setup.hs clean
 
-test:
-       runghc -i"src" test/TestSuite.hs
+
+$(TESTSUITE_BIN): src/*.hs test/TestSuite.hs
+       runghc Setup.hs configure --user --enable-tests
+       runghc Setup.hs build
+
+test: $(BIN) $(TESTSUITE_BIN)
+       runghc Setup.hs test
 
 dist:
        runghc Setup.hs configure
        runghc Setup.hs sdist
+
+hlint:
+       hlint --ignore="Use camelCase"     \
+             --ignore="Redundant bracket" \
+             --color                      \
+             src