]> gitweb.michael.orlitzky.com - spline3.git/blob - makefile
Set cabal version to 0.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 \
13 --user \
14 --prefix=/ \
15 --flags=${FLAGS}
16 runghc Setup.hs build
17
18 $(DOCTESTS_BIN): $(SRCS) test/Doctests.hs
19 runghc Setup.hs configure \
20 --user \
21 --prefix=/ \
22 --flags=${FLAGS} \
23 --enable-tests
24 runghc Setup.hs build
25
26 $(TESTSUITE_BIN): $(SRCS) test/TestSuite.hs
27 runghc Setup.hs configure \
28 --user \
29 --prefix=/ \
30 --flags=${FLAGS} \
31 --enable-tests
32 runghc Setup.hs build
33
34 llvm: $(PN).cabal $(SRCS)
35 FLAGS="llvm" make
36
37 profile: $(SRCS)
38 runghc Setup.hs configure \
39 --user \
40 --prefix=/ \
41 --enable-executable-profiling
42 runghc Setup.hs build
43
44 hpc: $(PN).cabal $(SRCS)
45 FLAGS="hpc" make
46
47 clean:
48 runghc Setup.hs clean
49 rm -rf dist/
50 rm -f *.prof
51 rm -f .hpc
52
53 test: $(PN).cabal $(TESTSUITE_BIN) $(DOCTESTS_BIN) $(BIN)
54 runghc Setup.hs test
55
56 dist:
57 runghc Setup.hs configure --prefix=/
58 TAR_OPTIONS="--format=ustar" runghc Setup.hs sdist
59
60 doc: dist/doc
61
62 dist/doc: $(PN).cabal $(SRCS)
63 runghc Setup.hs configure --user --prefix=/ --flags=${FLAGS}
64 runghc Setup.hs hscolour --all
65 runghc Setup.hs haddock --all \
66 --hyperlink-source \
67 --haddock-options="--ignore-all-exports"
68
69 hlint:
70 hlint --ignore="Use camelCase" \
71 --ignore="Redundant bracket" \
72 --color \
73 src