Annotation of embedaddon/php/Makefile.gcov, revision 1.1.1.1
1.1 misho 1:
2: #
3: # LCOV
4: #
5:
6: lcov: lcov-html
7:
8: lcov-test: lcov-clean-data test
9:
10: php_lcov.info: lcov-test
11: @echo "Generating data for $@"
12: @rm -rf lcov_data/
13: @$(mkinstalldirs) lcov_data/
14: @echo
15: -@find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq | while read x; do \
16: echo -n . ;\
17: y=`echo $$x | sed -e 's!\.libs/!!'`; \
18: dir=lcov_data/`dirname $$x`; \
19: test -d "$$dir" || $(mkinstalldirs) "$$dir"; \
20: if test -f "$(top_srcdir)/$$y.c"; then \
21: ln -f -s $(top_srcdir)/$$y.c lcov_data/$$y.c; \
22: fi; \
23: if test -f "$(top_srcdir)/$$y.h"; then \
24: ln -f -s $(top_srcdir)/$$y.h lcov_data/$$y.h; \
25: fi; \
26: if test -f "$(top_srcdir)/$$y.re"; then \
27: ln -f -s $(top_srcdir)/$$y.re lcov_data/$$y.re; \
28: fi; \
29: if test -f "$(top_srcdir)/$$y.y"; then \
30: ln -f -s $(top_srcdir)/$$y.y lcov_data/$$y.y; \
31: fi; \
32: if test -f "$(top_srcdir)/$$y.l"; then \
33: ln -f -s $(top_srcdir)/$$y.l lcov_data/$$y.l; \
34: fi; \
35: if test -f "$(top_srcdir)/$$y"; then \
36: ln -f -s $(top_srcdir)/$$y lcov_data/$$y; \
37: fi; \
38: if test -f "$(top_builddir)/$$y.c"; then \
39: ln -f -s $(top_builddir)/$$y.c lcov_data/$$y.c; \
40: fi; \
41: test -f "$$x.gcno" && cp $$x.gcno lcov_data/$$y.gcno ; \
42: test -f "$$x.gcda" && cp $$x.gcda lcov_data/$$y.gcda ; \
43: test -f "$$x.da" && cp $$x.da lcov_data/$$y.da ; \
44: test -f "$$x.bb" && cp $$x.bb lcov_data/$$y.bb ; \
45: test -f "$$x.bbg" && cp $$x.bbg lcov_data/$$y.bbg ; \
46: done
47: for dir in ext/bcmath/libbcmath ext/fileinfo/libmagic ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite ext/xmlrpc/libxmlrpc ext/zip/lib; do \
48: test -d lcov_data/$$dir && rm -rf lcov_data/$$dir ; \
49: done
50: @echo
51: @echo "Generating $@"
52: @$(LTP) --directory lcov_data/ --capture --base-directory=lcov_data --output-file $@
53:
54: lcov-html: php_lcov.info
55: @echo "Generating lcov HTML"
56: @$(LTP_GENHTML) --legend --output-directory lcov_html/ --title "PHP Code Coverage" php_lcov.info
57:
58: lcov-clean:
59: rm -f php_lcov.info
60: rm -rf lcov_data/
61: rm -rf lcov_html/
62:
63: lcov-clean-data:
64: @find . -name \*.gcda -o -name \*.da -o -name \*.bbg? | xargs rm -f
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>