]> gitweb.michael.orlitzky.com - dead/lwn-epub.git/blob - makefile
Add LICENSE and README files.
[dead/lwn-epub.git] / makefile
1 .PHONY : test publish_doc doc src_html hlint
2
3 # There's onlt one '$' in the awk script, but we have to double-money
4 # it for make.
5 PN = $(shell grep 'name:' *.cabal | awk '{ print $$2 }')
6 BIN = dist/build/$(PN)/$(PN)
7 SRCS = $(shell find src/ -name '*.hs')
8
9 $(BIN): $(SRCS)
10 runghc Setup.hs clean
11 runghc Setup.hs configure --user --flags=${FLAGS}
12 runghc Setup.hs build
13
14 clean:
15 runghc Setup.hs clean
16 rm -f dist/
17 rm -f *.prof
18 rm -rf .hpc
19
20 install: $(BIN)
21 runghc Setup.hs install
22
23 # Neither 'haddock' nor 'hscolour' seem to work properly.
24 doc: src_html
25 runghc Setup.hs hscolour --executables
26 runghc Setup.hs haddock --internal \
27 --executables \
28 --hyperlink-source
29
30 dist/build/autogen: $(BIN)
31
32
33 test: dist/build/autogen
34 runghc -i"src" -i"dist/build/autogen" test/TestSuite.hs