@@ -9,7 +9,7 @@ lib := ../dist/build/libHStext-$(version).a
9lib-srcs := $(shell grep '^ *Data' ../text.cabal | \
9lib-srcs := $(shell grep '^ *Data' ../text.cabal | \
10 sed -e 's,\.,/,g' -e 's,$$,.hs,')
10 sed -e 's,\.,/,g' -e 's,$$,.hs,')
12−all: qc qc-hpc
12+all: qc coverage
14lib: $(lib)
14lib: $(lib)
@@ -22,9 +22,15 @@ qc: $(lib) QuickCheckUtils.o Properties.o
23qc-hpc: Properties.hs QuickCheckUtils.hs $(lib-srcs:%=../%)
23qc-hpc: Properties.hs QuickCheckUtils.hs $(lib-srcs:%=../%)
24 -mkdir -p hpcdir
24 -mkdir -p hpcdir
26 $(ghc) $(ghc-hpc-flags) -ihpcdir --make -o $@ $<
25 $(ghc) $(ghc-hpc-flags) -ihpcdir --make -o $@ $<
27+coverage: qc-hpc-html/hpc_index.html
29+qc-hpc-html/hpc_index.html: qc-hpc
31+ hpc markup qc-hpc --exclude=Main --exclude=Properties \
32+ --exclude=QuickCheckUtils --srcdir=.. --srcdir=. --destdir=$(dir $@)
29 $(ghc) $(ghc-flags) -c -o $@ $<
35 $(ghc) $(ghc-flags) -c -o $@ $<
@@ -38,4 +44,4 @@ text-testdata.tar.bz2:
38 curl -O http://projects.haskell.org/text/text-testdata.tar.bz2
44 curl -O http://projects.haskell.org/text/text-testdata.tar.bz2
41− -rm -rf *.o *.hi qc qc-hpc hpcdir .hpc
47+ -rm -rf *.o *.hi *.tix qc qc-hpc hpcdir .hpc qc-hpc-html