diff options
author | Johan Dahlin <johan@gnome.org> | 2010-05-28 20:49:54 -0300 |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2010-05-28 20:49:54 -0300 |
commit | b2fd4f54883cd701a0c280655c93e20b04897ed2 (patch) | |
tree | 207cfeec2e4db60be013c0f5faa78668360f30fe | |
parent | dfd218e4d488a64947fd2ae088cbff055b289599 (diff) | |
download | gobject-introspection-b2fd4f54883cd701a0c280655c93e20b04897ed2.tar.gz |
[build] Remove gcov support
It's been broken for some time, remove it instead of letting
it bitrot.
-rw-r--r-- | Makefile.am | 17 | ||||
-rw-r--r-- | gcov.mak | 45 | ||||
-rw-r--r-- | girepository/Makefile.am | 4 | ||||
-rw-r--r-- | giscanner/Makefile.am | 4 | ||||
-rw-r--r-- | m4/Makefile.am | 2 | ||||
-rw-r--r-- | m4/gcov.m4 | 47 | ||||
-rw-r--r-- | tools/Makefile.am | 2 |
7 files changed, 1 insertions, 120 deletions
diff --git a/Makefile.am b/Makefile.am index 22f9812d..98016cd4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,21 +1,4 @@ ## Process this file with automake to produce Makefile.in -include $(top_srcdir)/gcov.mak - -GCOVSOURCES = - -if GI_GCOV_ENABLED -GCOV_DIRS = girepository tools - -check-coverage: coverage-report.txt - @cat $(top_builddir)/coverage-report.txt - -else - -check-coverage: - @echo "ERROR: Need to reconfigure with --enable-gcov to run make check-coverage" - -endif - ACLOCAL_AMFLAGS = -I m4 SUBDIRS = girepository giscanner tools gir docs tests examples diff --git a/gcov.mak b/gcov.mak deleted file mode 100644 index 848039b6..00000000 --- a/gcov.mak +++ /dev/null @@ -1,45 +0,0 @@ -# -*- Mode: makefile -*- -if GI_GCOV_ENABLED - -clean-gcov: - find . -name "*.gcda" -o -name "*.gcov" -delete - -clean-gcno: - find . -name "*.gcno" -delete - -gcov-all: - @for dir in $(GCOV_DIRS); do \ - cd $(abs_srcdir)/$$dir && \ - for file in *.c; do \ - gcov -f -p -o `find $(abs_builddir)/$$dir -newer $$file -name "*-$${file/.c/.gcda}" -print0 | sed -e 's/\.gcda/\.o/'` $$file > /dev/null; \ - done \ - done - -coverage-report.txt: clean clean-gcov all check gcov-all - @rm -f $(top_builddir)/coverage-report.txt - @echo -e "=== Coverage Report ===\n" >> $(top_builddir)/coverage-report.txt - @for dir in $(GCOV_DIRS); do \ - echo "Module '$$dir':" >> $(top_builddir)/coverage-report.txt; \ - $(MAKE) -C $$dir coverage-report; \ - done - -coverage-report: - @total_covered=0; total_lines=0; \ - for file in $(GCOVSOURCES); do \ - if test -f $$file.gcov; then \ - covered=`grep -e '[0-9]\+:' $$file.gcov | wc -l` ; \ - uncovered=`grep '#####:' $$file.gcov | wc -l`; \ - lines=$$(($$covered + $$uncovered)); \ - total_covered=$$((total_covered + covered)); \ - total_lines=$$((total_lines + lines)); \ - echo -n " $$file: $$covered / $$lines"; \ - echo " ($$((($$covered * 100) / $$lines))%)"; \ - fi \ - done >> $(top_builddir)/coverage-report.txt; \ - echo -e " Total coverage:"\ - "$$((($$total_covered * 100) / $$total_lines))%\n" \ - >> $(top_builddir)/coverage-report.txt - -.PHONEY: coverage-report gcov-all coverage-report.txt - -endif diff --git a/girepository/Makefile.am b/girepository/Makefile.am index 770dceb7..b7b1a975 100644 --- a/girepository/Makefile.am +++ b/girepository/Makefile.am @@ -1,7 +1,3 @@ -include $(top_srcdir)/gcov.mak - -GCOVSOURCES = $(libgirepository_1_0_la_SOURCES) - girepodir = $(includedir)/gobject-introspection-1.0/ girepo_HEADERS = girepository.h girffi.h diff --git a/giscanner/Makefile.am b/giscanner/Makefile.am index 098235b4..642bcbc5 100644 --- a/giscanner/Makefile.am +++ b/giscanner/Makefile.am @@ -28,8 +28,6 @@ libgiscanner_la_SOURCES = \ libgiscanner_la_LIBADD = $(GOBJECT_LIBS) libgiscanner_la_CFLAGS = $(GOBJECT_CFLAGS) -GCOVSOURCES = $(libgiscanner_la_SOURCES) - # Python module pkgpyexecdir = $(pkglibdir)/giscanner pkgpyexec_LTLIBRARIES = _giscanner.la @@ -83,5 +81,3 @@ install-exec-hook: rm $(pkgpyexecdir)/_giscanner.dll.a rm $(pkgpyexecdir)/_giscanner.la endif - -include $(top_srcdir)/gcov.mak diff --git a/m4/Makefile.am b/m4/Makefile.am index d53e7c88..31484fa4 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -1 +1 @@ -EXTRA_DIST=gcov.m4 as-compiler-flag.m4 +EXTRA_DIST=as-compiler-flag.m4 diff --git a/m4/gcov.m4 b/m4/gcov.m4 deleted file mode 100644 index c96eddac..00000000 --- a/m4/gcov.m4 +++ /dev/null @@ -1,47 +0,0 @@ -AC_DEFUN([GI_ENABLE_GCOV], -[ - AC_ARG_ENABLE(gcov, - AC_HELP_STRING([--enable-gcov], - [compile with coverage profiling instrumentation (gcc only)]), - enable_gcov=$enableval, - enable_gcov=no) - if test x$enable_gcov = xyes ; then - if test "x$GCC" != "xyes" - then - AC_MSG_ERROR([gcov only works if gcc is used]) - fi - - AS_COMPILER_FLAG(["-fprofile-arcs"], - [GCOV_CFLAGS="$GCOV_CFLAGS -fprofile-arcs"], - true) - AS_COMPILER_FLAG(["-ftest-coverage"], - [GCOV_CFLAGS="$GCOV_CFLAGS -ftest-coverage"], - true) - dnl libtool 1.5.22 and lower strip -fprofile-arcs from the flags - dnl passed to the linker, which is a bug; -fprofile-arcs implicitly - dnl links in -lgcov, so we do it explicitly here for the same effect - GCOV_LIBS=-lgcov - AC_SUBST(GCOV_CFLAGS) - AC_SUBST(GCOV_LIBS) - GCOV=`echo $CC | sed s/gcc/gcov/g` - AC_SUBST(GCOV) - - GI_GCOV_ENABLED=yes - AC_DEFINE_UNQUOTED(GI_GCOV_ENABLED, 1, - [Defined if gcov is enabled to force a rebuild due to config.h changing]) - dnl if gcov is used, we do not want default -O2 CFLAGS - if test "x$GI_GCOV_ENABLED" = "xyes" - then - CFLAGS="-g -O0" - AC_SUBST(CFLAGS) - CXXFLAGS="-g -O0" - AC_SUBST(CXXFLAGS) - FFLAGS="-g -O0" - AC_SUBST(FFLAGS) - CCASFLAGS="-g -O0" - AC_SUBST(CCASFLAGS) - AC_MSG_NOTICE([gcov enabled, setting CFLAGS and friends to $CFLAGS]) - fi - fi - AM_CONDITIONAL(GI_GCOV_ENABLED, test x$enable_gcov = xyes) -]) diff --git a/tools/Makefile.am b/tools/Makefile.am index c31963cd..ba0fa9f7 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,5 +1,3 @@ -include $(top_srcdir)/gcov.mak - INCLUDES = \ -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \ -I$(top_srcdir)/girepository |