Initial commit of a big mess that sort of looks like it works.
[dead/harbl.git] / makefile
1 PN = harbl
2 BIN = dist/build/$(PN)/$(PN)
3 SRCS := $(shell find src/ -type f -name '*.hs')
4
5 .PHONY : dist doc hlint
6
7 $(BIN): $(PN).cabal $(SRCS)
8 runghc Setup.hs clean
9 runghc Setup.hs configure --user --prefix=/
10 runghc Setup.hs build
11
12 profile: $(PN).cabal $(SRCS)
13 runghc Setup.hs clean
14 runghc Setup.hs configure --user \
15 --enable-executable-profiling \
16 --prefix=/
17 runghc Setup.hs build
18
19 doc:
20 runghc Setup.hs configure --user --prefix=/
21 runghc Setup.hs hscolour --all
22 runghc Setup.hs haddock --all \
23 --hyperlink-source \
24 --haddock-options="--ignore-all-exports"
25
26 clean:
27 runghc Setup.hs clean
28 rm -f *.log
29 rm -f *.xml
30 rm -rf tmp
31
32 dist:
33 runghc Setup.hs configure --prefix=/
34 TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
35
36 hlint:
37 hlint --ignore="Use camelCase" \
38 --ignore="Redundant bracket" \
39 --color \
40 src