@@ -9,7 +9,7 @@ lib := ../dist/build/libHStext-$(version).a
99lib-srcs := $(shell grep '^ *Data' ../text.cabal | \
1010 sed -e 's,\.,/,g' -e 's,$$,.hs,')
1111
12−all: qc qc-hpc
12+all: qc coverage
1313
1414lib: $(lib)
1515
@@ -22,9 +22,15 @@ qc: $(lib) QuickCheckUtils.o Properties.o
2222
2323qc-hpc: Properties.hs QuickCheckUtils.hs $(lib-srcs:%=../%)
2424 -mkdir -p hpcdir
25− rm -f $@.tix
2625 $(ghc) $(ghc-hpc-flags) -ihpcdir --make -o $@ $<
2726
27+coverage: qc-hpc-html/hpc_index.html
28+
29+qc-hpc-html/hpc_index.html: qc-hpc
30+ ./qc-hpc
31+ hpc markup qc-hpc --exclude=Main --exclude=Properties \
32+ --exclude=QuickCheckUtils --srcdir=.. --srcdir=. --destdir=$(dir $@)
33+
2834%.o: %.hs
2935 $(ghc) $(ghc-flags) -c -o $@ $<
3036
@@ -38,4 +44,4 @@ text-testdata.tar.bz2:
3844 curl -O http://projects.haskell.org/text/text-testdata.tar.bz2
3945
4046clean:
41− -rm -rf *.o *.hi qc qc-hpc hpcdir .hpc
47+ -rm -rf *.o *.hi *.tix qc qc-hpc hpcdir .hpc qc-hpc-html