diff options
| -rw-r--r-- | Makefile.gcov | 30 | ||||
| -rw-r--r-- | configure.in | 2 |
2 files changed, 23 insertions, 9 deletions
diff --git a/Makefile.gcov b/Makefile.gcov index e499c833bb..db9169b896 100644 --- a/Makefile.gcov +++ b/Makefile.gcov @@ -3,6 +3,8 @@ # LCOV # +LCOV_INCLUDE="." + lcov: lcov-html lcov-test: lcov-clean-data test @@ -12,7 +14,7 @@ php_lcov.info: lcov-test @rm -rf lcov_data/ @$(mkinstalldirs) lcov_data/ @echo - -@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 \ + -@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' | $(EGREP) $(LCOV_INCLUDE) | uniq | while read x; do \ echo -n . ;\ y=`echo $$x | sed -e 's!\.libs/!!'`; \ dir=lcov_data/`dirname $$x`; \ @@ -38,14 +40,26 @@ php_lcov.info: lcov-test if test -f "$(top_builddir)/$$y.c"; then \ ln -f -s $(top_builddir)/$$y.c lcov_data/$$y.c; \ fi; \ - test -f "$$x.gcno" && cp $$x.gcno lcov_data/$$y.gcno ; \ - test -f "$$x.gcda" && cp $$x.gcda lcov_data/$$y.gcda ; \ - test -f "$$x.da" && cp $$x.da lcov_data/$$y.da ; \ - test -f "$$x.bb" && cp $$x.bb lcov_data/$$y.bb ; \ - test -f "$$x.bbg" && cp $$x.bbg lcov_data/$$y.bbg ; \ - done + if test -f "$$x.gcno"; then \ + cp $$x.gcno lcov_data/$$y.gcno ; \ + fi; \ + if test -f "$$x.gcda"; then \ + cp $$x.gcda lcov_data/$$y.gcda ; \ + fi; \ + if test -f "$$x.da"; then \ + cp $$x.da lcov_data/$$y.da ; \ + fi; \ + if test -f "$$x.bb"; then \ + cp $$x.bb lcov_data/$$y.bb ; \ + fi; \ + if test -f "$$x.bbg"; then \ + cp $$x.bbg lcov_data/$$y.bbg ; \ + fi; \ + done; \ 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 \ - test -d lcov_data/$$dir && rm -rf lcov_data/$$dir ; \ + if test -d lcov_data/$$dir; then \ + rm -rf lcov_data/$$dir ; \ + fi; \ done @echo @echo "Generating $@" diff --git a/configure.in b/configure.in index a64a500220..8e599aa1c7 100644 --- a/configure.in +++ b/configure.in @@ -784,7 +784,7 @@ if test "$PHP_GCOV" = "yes"; then AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.]) fi - ltp_version_list="1.5 1.6 1.7" + ltp_version_list="1.5 1.6 1.7 1.9" AC_CHECK_PROG(LTP, lcov, lcov) AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml) |
