[libgdata] [build] Limit gcov profiling to the library itself



commit c1c5fba2869847a30558130defeff6eda0c470e1
Author: Philip Withnall <philip tecnocode co uk>
Date:   Tue Dec 29 20:46:22 2009 +0000

    [build] Limit gcov profiling to the library itself
    
    Profiling was being done on the documentation scanner and test files before,
    which was less than desirable. Now only the main libgdata library is compiled
    with profiling support if it's enabled.

 Makefile.am  |    2 ++
 configure.ac |    7 +++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 5083c1c..325def8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -341,12 +341,14 @@ gdata_libgdata_la_CPPFLAGS = \
 gdata_libgdata_la_CFLAGS = \
 	$(GDATA_CFLAGS)	\
 	$(GNOME_CFLAGS)	\
+	$(GCOV_CFLAGS)	\
 	$(WARN_CFLAGS)	\
 	$(AM_CFLAGS)
 
 gdata_libgdata_la_LIBADD = \
 	$(GDATA_LIBS)	\
 	$(GNOME_LIBS)	\
+	$(GCOV_LIBS)	\
 	$(AM_LIBADD)
 
 gdata_libgdata_la_LDFLAGS = \
diff --git a/configure.ac b/configure.ac
index e6a63b3..5240ca9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,8 +90,11 @@ if test "x$enable_gcov" = "xyes"; then
 		AC_MSG_ERROR(not compiling with gcc, which is required for gcov testing)
 	fi
 
-	CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
-	LDFLAGS="$LDFLAGS -fprofile-arcs -ftest-coverage"
+	GCOV_CFLAGS="-fprofile-arcs -ftest-coverage"
+	GCOV_LIBS="-lgcov"
+
+	AC_SUBST(GCOV_CFLAGS)
+	AC_SUBST(GCOV_LIBS)
 fi
 
 AM_CONDITIONAL(GCOV_ENABLED, test x$enable_gcov = xyes)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]