]> gitweb.michael.orlitzky.com - haeredes.git/blob - makefile
Don't derive Typeable in Timeout.hs (GHC 8+).
[haeredes.git] / makefile
1 PN = haeredes
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 ./ -name '*.prof' -delete
55 find ./ -name '*.o' -delete
56 find ./ -name '*.hi' -delete