]> gitweb.michael.orlitzky.com - spline3.git/blob - makefile
Define an export list in Misc, clean up imports.
[spline3.git] / makefile
1 BIN = dist/build/spline3/spline3
2 DOCTESTS_BIN = dist/build/doctests/doctests
3 TESTSUITE_BIN = dist/build/testsuite/testsuite
4
5 .PHONY : test publish_doc doc dist hlint
6
7 $(BIN): src/*.hs
8 runghc Setup.hs clean
9 runghc Setup.hs configure --user --flags=${FLAGS}
10 runghc Setup.hs build
11
12 $(DOCTESTS_BIN): src/*.hs test/Doctests.hs
13 runghc Setup.hs configure --user --flags=${FLAGS} --enable-tests
14 runghc Setup.hs build
15
16 $(TESTSUITE_BIN): src/*.hs test/TestSuite.hs
17 runghc Setup.hs configure --user --flags=${FLAGS} --enable-tests
18 runghc Setup.hs build
19
20 llvm: src/*.hs
21 FLAGS="llvm" make
22
23 profile: src/*.hs
24 runghc Setup.hs configure --user --enable-executable-profiling
25 runghc Setup.hs build
26
27 hpc: src/*.hs
28 FLAGS="hpc" make
29
30 clean:
31 runghc Setup.hs clean
32 rm -f dist/
33 rm -f *.prof
34 rm -rf .hpc
35
36 test: $(BIN) $(DOCTESTS_BIN) $(TESTSUITE_BIN)
37 runghc Setup.hs test
38
39 dist:
40 runghc Setup.hs configure
41 runghc Setup.hs sdist
42
43 # Neither 'haddock' nor 'hscolour' seem to work properly.
44 doc: src/*.hs
45 runghc Setup.hs configure --user --flags=${FLAGS}
46 runghc Setup.hs hscolour --executables
47 runghc Setup.hs haddock --internal \
48 --executables \
49 --hyperlink-source
50
51 SSH_USER=root@michael.orlitzky.com
52 PUBLIC_DOCDIR=/var/www/orlitzky.com/michael/public/spline3/
53 publish_doc: doc
54 rsync -avz -e ssh \
55 ./dist/doc/html/spline3/spline3 \
56 $(SSH_USER):$(PUBLIC_DOCDIR)
57
58 hlint:
59 hlint --ignore="Use camelCase" \
60 --ignore="Redundant bracket" \
61 --color \
62 src