X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Flwn-epub.git;a=blobdiff_plain;f=makefile;h=9a1337225a32b22b7e4f2fe014495b56271c2c45;hp=3ae65f2b7d4f7973445e7cf2d80ecc3f631354b2;hb=7992822de9d00f1a4c19bc2ef86e9deefc23da52;hpb=0ee39f7100c4f7184cded8441e27849f0a123dce diff --git a/makefile b/makefile index 3ae65f2..9a13372 100644 --- 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,12 +12,18 @@ $(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/ rm -f *.prof rm -rf .hpc +install: $(BIN) + runghc Setup.hs install # Neither 'haddock' nor 'hscolour' seem to work properly. doc: src_html @@ -25,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