X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Flwn-epub.git;a=blobdiff_plain;f=makefile;h=ec658b07233d557c7bc4e2297927025376f6c5c0;hp=15a218731a0df652788f2621855f3f9532eb7ced;hb=35e0551101fa2267f28ff434a6006a3612ad54c9;hpb=14bff4a492037f8921a5993931d0fc4363207b20 diff --git a/makefile b/makefile index 15a2187..ec658b0 100644 --- a/makefile +++ b/makefile @@ -1,6 +1,11 @@ .PHONY : test publish_doc doc src_html hlint -lwn-epub: src/*.hs +# 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) + +$(BIN): src/*.hs runghc Setup.hs clean runghc Setup.hs configure --user --flags=${FLAGS} runghc Setup.hs build @@ -19,5 +24,8 @@ doc: src_html --executables \ --hyperlink-source -test: - runghc -i"src" test/TestSuite.hs +dist/build/autogen: $(BIN) + + +test: dist/build/autogen + runghc -i"src" -i"dist/build/autogen" test/TestSuite.hs