]> gitweb.michael.orlitzky.com - dead/htsn-import.git/blob - makefile
Don't call clean before every compile (they're getting slow).
[dead/htsn-import.git] / makefile
1 PN = htsn-import
2 BIN = dist/build/$(PN)/$(PN)
3 TESTSUITE_BIN = dist/build/testsuite/testsuite
4 SRCS := $(shell find src/ -type f -name '*.hs')
5 TEST_SRCS := $(shell find test/ -type f -name '*.hs')
6
7 .PHONY : dist hlint
8
9 $(BIN): $(PN).cabal $(SRCS)
10 runghc Setup.hs configure --user --prefix=/
11 runghc Setup.hs build
12
13 profile: $(PN).cabal $(SRCS)
14 runghc Setup.hs configure --user --enable-executable-profiling --prefix=/
15 runghc Setup.hs build
16
17 doc: $(PN).cabal $(SRCS)
18 runghc Setup.hs configure --user --prefix=/
19 runghc Setup.hs hscolour --executables
20 runghc Setup.hs haddock --internal \
21 --executables \
22 --hyperlink-source
23
24 clean:
25 runghc Setup.hs clean
26 rm -f *.log
27 rm -f *.xml
28 rm -rf tmp
29
30 $(TESTSUITE_BIN): $(PN).cabal $(SRCS) $(TEST_SRCS)
31 runghc Setup.hs configure --user --enable-tests --prefix=/
32 runghc Setup.hs build
33
34 test: $(BIN) $(TESTSUITE_BIN)
35 runghc Setup.hs test
36
37 dist:
38 runghc Setup.hs configure --prefix=/
39 runghc Setup.hs sdist
40
41 hlint:
42 hlint --ignore="Use camelCase" \
43 --ignore="Redundant bracket" \
44 --color \
45 src