X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dead%2Flwn-epub.git;a=blobdiff_plain;f=makefile;h=3ae65f2b7d4f7973445e7cf2d80ecc3f631354b2;hp=1528ed3ad58404d9f2abf6c7fcff25012ff83db7;hb=2953924e2016393a1ffb9e2e82b4c90c8c57dfd3;hpb=44549423b80c9bf8edf5e942bc8ac457d9817195 diff --git a/makefile b/makefile index 1528ed3..3ae65f2 100644 --- a/makefile +++ b/makefile @@ -1,6 +1,12 @@ .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) +SRCS = $(shell find src/ -name '*.hs') + +$(BIN): $(SRCS) runghc Setup.hs clean runghc Setup.hs configure --user --flags=${FLAGS} runghc Setup.hs build @@ -18,3 +24,9 @@ doc: src_html runghc Setup.hs haddock --internal \ --executables \ --hyperlink-source + +dist/build/autogen: $(BIN) + + +test: dist/build/autogen + runghc -i"src" -i"dist/build/autogen" test/TestSuite.hs