]> gitweb.michael.orlitzky.com - numerical-analysis.git/blob - makefile
Get determinants working.
[numerical-analysis.git] / makefile
1 # There's only one '$' in the awk script, but we have to double-money
2 # it for make.
3 PN = $(shell grep 'name:' *.cabal | awk '{ print $$2 }')
4 BIN = dist/build/$(PN)/$(PN)
5 DOCTESTS_BIN = dist/build/doctests/doctests
6 SRCS = $(shell find src/ -name '*.hs')
7
8 .PHONY : test publish_doc doc dist hlint
9
10 $(BIN): $(SRCS)
11 runghc Setup.hs clean
12 runghc Setup.hs configure --user --flags=${FLAGS}
13 runghc Setup.hs build
14
15 $(DOCTESTS_BIN): $(SRCS) test/Doctests.hs
16 runghc Setup.hs configure --user --flags=${FLAGS} --enable-tests
17 runghc Setup.hs build
18
19
20 profile: $(SRCS)
21 runghc Setup.hs configure --user --enable-executable-profiling
22 runghc Setup.hs build
23
24 hpc: $(SRCS)
25 FLAGS="hpc" make
26
27 clean:
28 runghc Setup.hs clean
29 rm -f dist/
30 rm -f *.prof
31 rm -rf .hpc
32
33
34 test: $(BIN) $(DOCTESTS_BIN)
35 runghc Setup.hs test
36
37 dist:
38 runghc Setup.hs configure
39 runghc Setup.hs sdist
40
41
42 doc: $(SRCS)
43 runghc Setup.hs configure --user --flags=${FLAGS}
44 runghc Setup.hs hscolour --executables
45 runghc Setup.hs haddock --internal \
46 --executables \
47 --hyperlink-source
48
49 hlint:
50 hlint --ignore="Use camelCase" \
51 --ignore="Redundant bracket" \
52 --color \
53 src