Add some tests for the article URL construction.
[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
8 $(BIN): src/*.hs
9 runghc Setup.hs clean
10 runghc Setup.hs configure --user --flags=${FLAGS}
11 runghc Setup.hs build
12
13 clean:
14 runghc Setup.hs clean
15 rm -f dist/
16 rm -f *.prof
17 rm -rf .hpc
18
19
20 # Neither 'haddock' nor 'hscolour' seem to work properly.
21 doc: src_html
22 runghc Setup.hs hscolour --executables
23 runghc Setup.hs haddock --internal \
24 --executables \
25 --hyperlink-source
26
27 dist/build/autogen: $(BIN)
28
29
30 test: dist/build/autogen
31 runghc -i"src" -i"dist/build/autogen" test/TestSuite.hs