Added gst-plugins-base-subtitles0.10-0.10.34 for Meego Harmattan 1.2
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / common / coverage / lcov.mak
1 ## .PHONY so it always rebuilds it
2 .PHONY: lcov-reset lcov lcov-run lcov-report lcov-upload
3
4 # run lcov from scratch, always
5 lcov-reset:
6         $(MAKE) lcov-run
7         $(MAKE) lcov-report
8
9 # run lcov from scratch if the dir is not there
10 lcov:
11         $(MAKE) lcov-reset
12
13 if GST_GCOV_ENABLED
14 # reset run coverage tests
15 lcov-run:
16         @-rm -rf lcov
17         lcov --directory . --zerocounters
18         -if test -d tests/check; then $(MAKE) -C tests/check inspect; fi
19         -$(MAKE) check
20
21 # generate report based on current coverage data
22 lcov-report:
23         mkdir lcov
24         lcov --compat-libtool --directory . --capture --output-file lcov/lcov.info
25         lcov --list-full-path -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d\| -f1 > lcov/remove
26         lcov --list-full-path -l lcov/lcov.info | grep "tests/check/" | cut -d\| -f1 >> lcov/remove
27         lcov --list-full-path -l lcov/lcov.info | grep "docs/plugins/" | cut -d\| -f1 >> lcov/remove
28         lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info
29         rm lcov/remove
30         mv lcov/lcov.cleaned.info lcov/lcov.info
31         genhtml -t "$(PACKAGE_STRING)" -o lcov --num-spaces 2 lcov/lcov.info
32
33 lcov-upload: lcov
34         rsync -rvz -e ssh --delete lcov/* gstreamer.freedesktop.org:/srv/gstreamer.freedesktop.org/www/data/coverage/lcov/$(PACKAGE)
35
36 else
37 lcov-run:
38         echo "Need to reconfigure with --enable-gcov"
39
40 lcov-report:
41         echo "Need to reconfigure with --enable-gcov"
42 endif
43