Clean up object files in `make clean`.
[haeredes.git] / makefile
1 BIN = dist/build/haeredes/haeredes
2 TESTSUITE_BIN = dist/build/testsuite/testsuite
3 DOCTESTS_BIN = dist/build/doctests/doctests
4
5 .PHONY : dist doc test
6
7 $(BIN): src/*.hs
8 runghc Setup.hs clean
9 runghc Setup.hs configure --user
10 runghc Setup.hs build
11
12 $(TESTSUITE_BIN): src/*.hs test/TestSuite.hs
13 runghc Setup.hs configure --user --enable-tests
14 runghc Setup.hs build
15
16 $(DOCTESTS_BIN): src/*.hs test/Doctests.hs
17 runghc Setup.hs configure --user --enable-tests
18 runghc Setup.hs build
19
20 clean:
21 runghc Setup.hs clean
22 rm -f src/*.hi
23 rm -f src/*.o
24
25 test: $(BIN) $(TESTSUITE_BIN) $(DOCTESTS_BIN)
26 runghc Setup.hs test
27
28 doc:
29 runghc Setup.hs hscolour --executables
30 runghc Setup.hs haddock --internal \
31 --executables \
32 --hyperlink-source
33
34 hlint:
35 hlint --ignore="Use camelCase" \
36 --ignore="Redundant bracket" \
37 --color \
38 src
39
40 dist:
41 runghc Setup.hs configure
42 runghc Setup.hs sdist