]> gitweb.michael.orlitzky.com - spline3.git/blob - makefile
spline3.cabal: update to v1.0.1.
[spline3.git] / makefile
1 PN = spline3
2 BIN = dist/build/$(PN)/$(PN)
3 SRCS := $(shell find src/ -type f -name '*.hs')
4
5 BIN = dist/build/spline3/spline3
6 DOCTESTS_BIN = dist/build/doctests/doctests
7 TESTSUITE_BIN = dist/build/testsuite/testsuite
8
9 .PHONY : test doc dist hlint
10
11 $(BIN): $(PN).cabal $(SRCS)
12 runghc Setup.hs configure --user --prefix=/
13 runghc Setup.hs build
14
15 $(DOCTESTS_BIN): $(SRCS) test/Doctests.hs
16 runghc Setup.hs configure --user --prefix=/ --enable-tests
17 runghc Setup.hs build
18
19 $(TESTSUITE_BIN): $(SRCS) test/TestSuite.hs
20 runghc Setup.hs configure --user --prefix=/ --enable-tests
21 runghc Setup.hs build
22
23 clean:
24 runghc Setup.hs clean
25 rm -rf dist/
26 rm -f *.prof
27 rm -f .hpc
28
29 test: $(PN).cabal $(TESTSUITE_BIN) $(DOCTESTS_BIN) $(BIN)
30 runghc Setup.hs test
31
32 dist:
33 runghc Setup.hs configure --prefix=/
34 TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
35
36 doc: dist/doc
37
38 dist/doc: $(PN).cabal $(SRCS)
39 runghc Setup.hs configure --user --prefix=/
40 runghc Setup.hs haddock --all \
41 --hyperlink-source \
42 --haddock-options="--ignore-all-exports"
43
44 hlint:
45 hlint --ignore="Use camelCase" \
46 --ignore="Redundant bracket" \
47 --color \
48 src