]> gitweb.michael.orlitzky.com - dead/halcyon.git/blobdiff - makefile
Add an OptionalConfiguration type and parse one from ~/.twatrc.
[dead/halcyon.git] / makefile
index 8bd7248952ed1c4f53cf4f2eeb92460be6c5b7b1..6ef9b5779c5e75b53be88d7d386e31bd16f88119 100644 (file)
--- a/makefile
+++ b/makefile
@@ -1,15 +1,22 @@
+BIN           = dist/build/twat/twat
+TESTSUITE_BIN = dist/build/testsuite/testsuite
+
 .PHONY : doc test
 
-twat: src/*.hs src/Twitter/*.hs
+$(BIN): src/*.hs src/Twitter/*.hs
        runghc Setup.hs clean
        runghc Setup.hs configure --user
        runghc Setup.hs build
 
+$(TESTSUITE_BIN): src/*.hs test/TestSuite.hs
+       runghc Setup.hs configure --user --enable-tests
+       runghc Setup.hs build
+
 clean:
        runghc Setup.hs clean
 
-test:
-       runghc -i"src" test/TestSuite.hs
+test: $(BIN) $(TESTSUITE_BIN)
+       runghc Setup.hs test
 
 # Neither 'haddock' nor 'hscolour' seem to work properly.
 doc:
@@ -17,3 +24,9 @@ doc:
        runghc Setup.hs haddock --internal    \
                                --executables \
                                --hyperlink-source
+
+hlint:
+       hlint --ignore="Use camelCase"     \
+             --ignore="Redundant bracket" \
+             --color                      \
+             src