php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #52718
Patch make_lcov.diff revision 2010-08-27 11:40 UTC by hartmut dot holzgraefe at gmail dot com

Patch make_lcov.diff for Unknown/Other Function Bug #52718

Patch version 2010-08-27 11:40 UTC

Return to Bug #52718 | Download this patch
Patch Revisions:

Developer: hartmut.holzgraefe@gmail.com

Index: Makefile.gcov
===================================================================
--- Makefile.gcov	(revision 302821)
+++ Makefile.gcov	(working copy)
@@ -8,48 +8,14 @@
 lcov-test: lcov-clean-data test
 
 php_lcov.info: lcov-test
-	@echo "Generating data for $@"
-	@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 \
-		echo -n . ;\
-		y=`echo $$x | sed -e 's!\.libs/!!'`; \
-		dir=lcov_data/`dirname $$x`; \
-		test -d "$$dir" || $(mkinstalldirs) "$$dir"; \
-		if test -f "$(top_srcdir)/$$y.c"; then \
-			ln -f -s $(top_srcdir)/$$y.c lcov_data/$$y.c; \
-		fi; \
-		if test -f "$(top_srcdir)/$$y.h"; then \
-			ln -f -s $(top_srcdir)/$$y.h lcov_data/$$y.h; \
-		fi; \
-		if test -f "$(top_srcdir)/$$y.re"; then \
-			ln -f -s $(top_srcdir)/$$y.re lcov_data/$$y.re; \
-		fi; \
-		if test -f "$(top_srcdir)/$$y.y"; then \
-		        ln -f -s $(top_srcdir)/$$y.y lcov_data/$$y.y; \
-		fi; \
-		if test -f "$(top_srcdir)/$$y.l"; then \
-		        ln -f -s $(top_srcdir)/$$y.l lcov_data/$$y.l; \
-		fi; \
-		if test -f "$(top_srcdir)/$$y"; then \
-		        ln -f -s $(top_srcdir)/$$y lcov_data/$$y; \
-		fi; \
-		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
-	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 ; \
-	done
-	@echo 
 	@echo "Generating $@"
-	@$(LTP) --directory lcov_data/ --capture --base-directory=lcov_data --output-file $@
+	@$(LTP) --directory . --capture --base-directory . --output-file $@
+	@echo "Stripping bundled libraries from $@"
+	@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 \
+		echo "... removing $$dir"; \
+		$(LTP) --remove $@ $$dir/\* --output-file $@ ; \
+	done
+	@echo
 
 lcov-html: php_lcov.info
 	@echo "Generating lcov HTML"
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 18:01:24 2019 UTC