]> gitweb.michael.orlitzky.com - dead/halcyon.git/blob - makefile
db0ec3363a675c660ffc12671d1ef9f7464b7a80
[dead/halcyon.git] / makefile
1 PN = halcyon
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 --prefix=/
9 runghc Setup.hs build
10
11 doc: $(PN).cabal $(SRCS)
12 runghc Setup.hs configure --user --prefix=/
13 runghc Setup.hs hscolour --all
14 runghc Setup.hs haddock --all \
15 --hyperlink-source \
16 --haddock-options="--ignore-all-exports"
17
18
19 #
20 # Testing.
21 #
22
23 TESTSUITE_BIN = dist/build/testsuite/testsuite
24 TEST_SRCS := $(shell find test/ -type f -name '*.hs')
25
26 $(TESTSUITE_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
27 runghc Setup.hs configure --user --enable-tests --prefix=/
28 runghc Setup.hs build
29
30 test: $(BIN) $(TESTSUITE_BIN)
31 runghc Setup.hs test
32
33
34 #
35 # Misc.
36 #
37
38 dist:
39 runghc Setup.hs configure --prefix=/
40 TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
41
42 hlint:
43 hlint --ignore="Use camelCase" \
44 --ignore="Redundant bracket" \
45 --color \
46 src
47
48 clean:
49 runghc Setup.hs clean
50 find ./ -name '*.prof' -delete
51 find ./ -name '*.o' -delete
52 find ./ -name '*.hi' -delete