]> gitweb.michael.orlitzky.com - dead/lwn-epub.git/blob - makefile
Use 'find' to locate all source files in the makefile.
[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
21 # Neither 'haddock' nor 'hscolour' seem to work properly.
22 doc: src_html
23 runghc Setup.hs hscolour --executables
24 runghc Setup.hs haddock --internal \
25 --executables \
26 --hyperlink-source
27
28 dist/build/autogen: $(BIN)
29
30
31 test: dist/build/autogen
32 runghc -i"src" -i"dist/build/autogen" test/TestSuite.hs