More import/export cleanup.
[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 #
27 # Testing.
28 #
29
30 TESTSUITE_BIN = dist/build/testsuite/testsuite
31 TEST_SRCS := $(shell find test/ -type f -name '*.hs')
32 $(TESTSUITE_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
33 runghc Setup.hs configure --user --enable-tests --prefix=/
34 runghc Setup.hs build
35
36 test: $(BIN) $(TESTSUITE_BIN)
37 runghc Setup.hs test
38
39
40 #
41 # Miscellaneous
42 #
43
44 clean:
45 runghc Setup.hs clean
46 rm -f *.log
47 rm -f *.xml
48 rm -rf tmp
49
50 dist:
51 runghc Setup.hs configure --prefix=/
52 TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
53
54 hlint:
55 hlint --ignore="Use camelCase" \
56 --ignore="Redundant bracket" \
57 --color \
58 src