libsodium: updated to 1.0.10
[tomato.git] / release / src / router / php / Makefile.gcov
blob37c1b4b44c29ce0a2a3b0471b7314bbfbf1a82ea
3 # LCOV
6 LCOV_INCLUDE="."
8 lcov: lcov-html
10 lcov-test: lcov-clean-data test
12 php_lcov.info: lcov-test
13         @echo "Generating data for $@"
14         @rm -rf lcov_data/
15         @$(mkinstalldirs) lcov_data/
16         @echo
17         -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.c -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
18         for x in $$files; do \
19                 echo -n . ;\
20                 y=`echo $$x | sed -e 's!\.libs/!!'`; \
21                 dir=lcov_data/`dirname $$x`; \
22                 test -d "$$dir" || $(mkinstalldirs) "$$dir"; \
23                 if test -f "$(top_srcdir)/$$y.c"; then \
24                         ln -f -s $(top_srcdir)/$$y.c lcov_data/$$y.c; \
25                 fi; \
26                 if test -f "$(top_srcdir)/$$y.h"; then \
27                         ln -f -s $(top_srcdir)/$$y.h lcov_data/$$y.h; \
28                 fi; \
29                 if test -f "$(top_srcdir)/$$y.re"; then \
30                         ln -f -s $(top_srcdir)/$$y.re lcov_data/$$y.re; \
31                 fi; \
32                 if test -f "$(top_srcdir)/$$y.y"; then \
33                         ln -f -s $(top_srcdir)/$$y.y lcov_data/$$y.y; \
34                 fi; \
35                 if test -f "$(top_srcdir)/$$y.l"; then \
36                         ln -f -s $(top_srcdir)/$$y.l lcov_data/$$y.l; \
37                 fi; \
38                 if test -f "$(top_srcdir)/$$y"; then \
39                         ln -f -s $(top_srcdir)/$$y lcov_data/$$y; \
40                 fi; \
41                 if test -f "$(top_builddir)/$$y.c"; then \
42                         ln -f -s $(top_builddir)/$$y.c lcov_data/$$y.c; \
43                 fi; \
44                 if test -f "$$x.gcno"; then \
45                         cp $$x.gcno lcov_data/$$y.gcno ; \
46                 fi; \
47                 if test -f "$$x.gcda"; then \
48                         cp $$x.gcda lcov_data/$$y.gcda ; \
49                 fi; \
50                 if test -f "$$x.da"; then \
51                         cp $$x.da   lcov_data/$$y.da ; \
52                 fi; \
53                 if test -f "$$x.bb"; then \
54                         cp $$x.bb   lcov_data/$$y.bb ; \
55                 fi; \
56                 if test -f "$$x.bbg"; then \
57                         cp $$x.bbg  lcov_data/$$y.bbg ; \
58                 fi; \
59         done; \
60         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 \
61                 if test -d lcov_data/$$dir; then \
62                         rm -rf lcov_data/$$dir ; \
63                 fi; \
64         done
65         @echo 
66         @echo "Generating $@"
67         @$(LTP) --directory lcov_data/ --capture --base-directory=lcov_data --output-file $@
69 lcov-html: php_lcov.info
70         @echo "Generating lcov HTML"
71         @$(LTP_GENHTML) --legend --output-directory lcov_html/ --title "PHP Code Coverage" php_lcov.info
73 lcov-clean:
74         rm -f php_lcov.info
75         rm -rf lcov_data/
76         rm -rf lcov_html/
78 lcov-clean-data:
79         @find . -name \*.gcda -o -name \*.da -o -name \*.bbg? | xargs rm -f