on master help sign in
Generate hpc coverage reports.

--HG-- extra : convert_revision : 4fe172818f42d7441e07e7214e979a9fe259c28b

commit0dd6f4911129c1bcc8b17b371f361113a3beadaf authorBryan O'Sullivan <bos@serpentine.com> dateFri 14 Aug 2009, 22:23 (17 years ago) parent3b20601
1 file changed+9−3
tests/Makefile+9−3
tests/Makefile+9−3
@@ -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