Update cabal description, and make minor documentation fixes.
[list-remote-forwards.git] / makefile
1 PN = list-remote-forwards
2 BIN = dist/build/$(PN)/$(PN)
3 SRCS = $(shell find src/ -type f -name '*.hs')
4
5 .PHONY : dist hlint
6
7 $(BIN): $(PN).cabal $(SRCS)
8 runghc Setup.hs configure --user
9 runghc Setup.hs build
10
11 doc: $(PN).cabal $(SRCS)
12 runghc Setup.hs hscolour --all
13 runghc Setup.hs haddock --all \
14 --hyperlink-source \
15 --haddock-options="--ignore-all-exports"
16
17
18 #
19 # Tests
20 #
21 TESTSUITE_BIN = dist/build/testsuite/testsuite
22 DOCTESTS_BIN = dist/build/doctests/doctests
23 TEST_SRCS := $(shell find test/ -type f -name '*.hs')
24
25 $(TESTSUITE_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
26 runghc Setup.hs configure --user --enable-tests --prefix=/
27 runghc Setup.hs build
28
29
30 $(DOCTESTS_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
31 runghc Setup.hs configure --user --enable-tests
32 runghc Setup.hs build
33
34 test: $(BIN) $(TESTSUITE_BIN) $(DOCTESTS_BIN)
35 runghc Setup.hs test
36
37
38 #
39 # Misc
40 #
41
42 dist:
43 runghc Setup.hs configure
44 TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
45
46 hlint:
47 hlint --ignore="Use camelCase" \
48 --ignore="Redundant bracket" \
49 --color \
50 src
51
52 clean:
53 runghc Setup.hs clean
54 find ./ -type f -name '*.prof' -delete
55 find ./ -type f -name '*.o' -delete
56 find ./ -type f -name '*.hi' -delete