File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Makefile.gcov
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:34:34 2012 UTC (12 years, 6 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, HEAD
php 5.4.3+patches

    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: 	-@files=`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` ;\
   16: 	for x in $$files; do \
   17: 		echo -n . ;\
   18: 		y=`echo $$x | sed -e 's!\.libs/!!'`; \
   19: 		dir=lcov_data/`dirname $$x`; \
   20: 		test -d "$$dir" || $(mkinstalldirs) "$$dir"; \
   21: 		if test -f "$(top_srcdir)/$$y.c"; then \
   22: 			ln -f -s $(top_srcdir)/$$y.c lcov_data/$$y.c; \
   23: 		fi; \
   24: 		if test -f "$(top_srcdir)/$$y.h"; then \
   25: 			ln -f -s $(top_srcdir)/$$y.h lcov_data/$$y.h; \
   26: 		fi; \
   27: 		if test -f "$(top_srcdir)/$$y.re"; then \
   28: 			ln -f -s $(top_srcdir)/$$y.re lcov_data/$$y.re; \
   29: 		fi; \
   30: 		if test -f "$(top_srcdir)/$$y.y"; then \
   31: 		        ln -f -s $(top_srcdir)/$$y.y lcov_data/$$y.y; \
   32: 		fi; \
   33: 		if test -f "$(top_srcdir)/$$y.l"; then \
   34: 		        ln -f -s $(top_srcdir)/$$y.l lcov_data/$$y.l; \
   35: 		fi; \
   36: 		if test -f "$(top_srcdir)/$$y"; then \
   37: 		        ln -f -s $(top_srcdir)/$$y lcov_data/$$y; \
   38: 		fi; \
   39: 		if test -f "$(top_builddir)/$$y.c"; then \
   40: 			ln -f -s $(top_builddir)/$$y.c lcov_data/$$y.c; \
   41: 		fi; \
   42: 		test -f "$$x.gcno" && cp $$x.gcno lcov_data/$$y.gcno ; \
   43: 		test -f "$$x.gcda" && cp $$x.gcda lcov_data/$$y.gcda ; \
   44: 		test -f "$$x.da"   && cp $$x.da   lcov_data/$$y.da ; \
   45: 		test -f "$$x.bb"   && cp $$x.bb   lcov_data/$$y.bb ; \
   46: 		test -f "$$x.bbg"  && cp $$x.bbg  lcov_data/$$y.bbg ; \
   47: 	done
   48: 	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 \
   49: 		test -d lcov_data/$$dir && rm -rf lcov_data/$$dir ; \
   50: 	done
   51: 	@echo 
   52: 	@echo "Generating $@"
   53: 	@$(LTP) --directory lcov_data/ --capture --base-directory=lcov_data --output-file $@
   54: 
   55: lcov-html: php_lcov.info
   56: 	@echo "Generating lcov HTML"
   57: 	@$(LTP_GENHTML) --legend --output-directory lcov_html/ --title "PHP Code Coverage" php_lcov.info
   58: 
   59: lcov-clean:
   60: 	rm -f php_lcov.info
   61: 	rm -rf lcov_data/
   62: 	rm -rf lcov_html/
   63: 
   64: lcov-clean-data:
   65: 	@find . -name \*.gcda -o -name \*.da -o -name \*.bbg? | xargs rm -f

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>