-.PHONY : doc test
+BIN = dist/build/twat/twat
+TESTSUITE_BIN = dist/build/testsuite/testsuite
-twat: src/*.hs src/Twitter/*.hs
+.PHONY : dist doc test
+
+$(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:
runghc Setup.hs hscolour --executables
runghc Setup.hs haddock --internal \
--ignore="Redundant bracket" \
--color \
src
+
+dist:
+ runghc Setup.hs configure
+ runghc Setup.hs sdist