Include the makefile in the tarball.
[dead/lwn-epub.git] / makefile
1 .PHONY : test dist
2
3 # There's onlt one '$' in the awk script, but we have to double-money
4 # it for make.
5 PN = $(shell grep 'name:' *.cabal | awk '{ print $$2 }')
6 BIN = dist/build/$(PN)/$(PN)
7 TESTSUITE_BIN = dist/build/testsuite/testsuite
8 SRCS = $(shell find src/ -name '*.hs')
9
10 $(BIN): $(SRCS)
11 runghc Setup.hs clean
12 runghc Setup.hs configure --user --flags=${FLAGS}
13 runghc Setup.hs build
14
15 $(TESTSUITE_BIN): src/*.hs test/TestSuite.hs
16 runghc Setup.hs configure --user --flags=${FLAGS} --enable-tests
17 runghc Setup.hs build
18
19 clean:
20 runghc Setup.hs clean
21 rm -f dist/
22 rm -f *.prof
23 rm -rf .hpc
24
25 install: $(BIN)
26 runghc Setup.hs install
27
28 dist:
29 runghc Setup.hs configure
30 runghc Setup.hs sdist
31
32 test: $(BIN) $(TESTSUITE_BIN)
33 runghc Setup.hs test