[build] Remove gcov support
authorJohan Dahlin <johan@gnome.org>
Fri, 28 May 2010 23:49:54 +0000 (20:49 -0300)
committerJohan Dahlin <johan@gnome.org>
Fri, 28 May 2010 23:49:54 +0000 (20:49 -0300)
It's been broken for some time, remove it instead of letting
it bitrot.

Makefile.am
gcov.mak [deleted file]
girepository/Makefile.am
giscanner/Makefile.am
m4/Makefile.am
m4/gcov.m4 [deleted file]
tools/Makefile.am

index 22f9812de14367cd4fc2baec2000db4e8d3f96ba..98016cd4d24ad0ebb9cec2235ca8bd8204b70a68 100644 (file)
@@ -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 (file)
index 848039b..0000000
--- 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
index 770dceb7f90065086796c002e54a23725b417e31..b7b1a9751a9d14dc87dd0deb47c9bad6a6a2ec0d 100644 (file)
@@ -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
 
index 098235b469db8acb16f99b99037b18777f9b2c65..642bcbc57fd45a51817575b3889bed746e8c39c0 100644 (file)
@@ -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
index d53e7c888115c31571671622fed44b82d71a23d0..31484fa44306237b54eaad034fc5492220437266 100644 (file)
@@ -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 (file)
index c96edda..0000000
+++ /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)
-])
index c31963cdd73bebfa1f49307576c380116dc912a6..ba0fa9f7c4b5d0e23ad654a1fabdff7b9b964288 100644 (file)
@@ -1,5 +1,3 @@
-include $(top_srcdir)/gcov.mak
-
 INCLUDES = \
        -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \
        -I$(top_srcdir)/girepository