X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Flwn-epub.git;a=blobdiff_plain;f=makefile;fp=makefile;h=69ab48da868135449a441e044dbc5511ba0bf570;hp=a848bcc9e227bed5f264de15f287829d98eda6bc;hb=7b567f5bc275be3212d485e2fe537949c921df3d;hpb=ac752b19d20e01771664ce50528d7f306bd2de9e diff --git a/makefile b/makefile index a848bcc..69ab48d 100644 --- a/makefile +++ b/makefile @@ -1,9 +1,10 @@ -.PHONY : test publish_doc doc src_html hlint +.PHONY : test dist # There's onlt one '$' in the awk script, but we have to double-money # 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/ @@ -20,15 +25,9 @@ clean: install: $(BIN) runghc Setup.hs install -# Neither 'haddock' nor 'hscolour' seem to work properly. -doc: src_html - runghc Setup.hs hscolour --executables - runghc Setup.hs haddock --internal \ - --executables \ - --hyperlink-source - -dist/build/autogen: $(BIN) - +dist: + runghc Setup.hs configure + runghc Setup.hs sdist -test: dist/build/autogen - runghc -i"src" -i"dist/build/autogen" test/TestSuite.hs +test: $(BIN) $(TESTSUITE_BIN) + runghc Setup.hs test