Add missing cabal fields.
[dead/lwn-epub.git] / makefile
index a848bcc9e227bed5f264de15f287829d98eda6bc..9a1337225a32b22b7e4f2fe014495b56271c2c45 100644 (file)
--- a/makefile
+++ b/makefile
@@ -4,6 +4,7 @@
 # it for make.
 PN   = $(shell grep 'name:' *.cabal | awk '{ print $$2 }')
 BIN  = dist/build/$(PN)/$(PN)
+TESTSUITE_BIN = dist/build/testsuite/testsuite
 SRCS = $(shell find src/ -name '*.hs')
 
 $(BIN): $(SRCS)
@@ -11,6 +12,10 @@ $(BIN): $(SRCS)
        runghc Setup.hs configure --user --flags=${FLAGS}
        runghc Setup.hs build
 
+$(TESTSUITE_BIN): src/*.hs test/TestSuite.hs
+       runghc Setup.hs configure --user --flags=${FLAGS} --enable-tests
+       runghc Setup.hs build
+
 clean:
        runghc Setup.hs clean
        rm -f dist/
@@ -27,8 +32,5 @@ doc: src_html
                                --executables \
                                --hyperlink-source
 
-dist/build/autogen: $(BIN)
-
-
-test: dist/build/autogen
-       runghc -i"src" -i"dist/build/autogen" test/TestSuite.hs
+test: $(BIN) $(TESTSUITE_BIN)
+       runghc Setup.hs test