[evolution-ews] Add an --enable-code-coverage configure option to enable gcov support



commit 6d9a1f332ff05610880c98a81b158bdf9e4efbbb
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 25 12:06:34 2014 +0100

    Add an --enable-code-coverage configure option to enable gcov support
    
    When enabled, this will compile all libraries/binaries with the necessary
    gcc and ld flags to enable code coverage support using gcov.

 Makefile.am                   |    2 ++
 configure.ac                  |    9 ++++++---
 src/addressbook/Makefile.am   |    3 ++-
 src/calendar/Makefile.am      |    3 ++-
 src/camel/Makefile.am         |    5 +++--
 src/collection/Makefile.am    |    3 ++-
 src/configuration/Makefile.am |    3 ++-
 src/server/Makefile.am        |    3 ++-
 src/utils/Makefile.am         |    3 ++-
 tests/Makefile.am             |    2 ++
 10 files changed, 25 insertions(+), 11 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index d6b5232..0dc4a59 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,6 +4,8 @@ endif
 
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
+ GNOME_CODE_COVERAGE_RULES@
+
 NULL =
 
 SUBDIRS = src po $(TESTS_DIR)
diff --git a/configure.ac b/configure.ac
index d2cdc24..a6dcd82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -196,6 +196,8 @@ AC_PROG_LIBTOOL
 
 PKG_PROG_PKG_CONFIG
 
+GNOME_CODE_COVERAGE
+
 dnl ********************************
 dnl Check for evolution-data-server
 dnl ********************************
@@ -376,8 +378,9 @@ tests/Makefile
 AC_OUTPUT
 
 AC_MSG_NOTICE([
-       Strict building : $enable_strict
-       Use libmspack   : $have_mspack
-       Enable tests    : $enable_tests
+       Strict building :       $enable_strict
+       Use libmspack :         $have_mspack
+       Enable tests :          $enable_tests
+       Code coverage (gcov) :  $enable_code_coverage
 ])
 
diff --git a/src/addressbook/Makefile.am b/src/addressbook/Makefile.am
index c1a694c..81cd8bd 100644
--- a/src/addressbook/Makefile.am
+++ b/src/addressbook/Makefile.am
@@ -26,6 +26,7 @@ libebookbackendews_la_CPPFLAGS = \
        $(EVOLUTION_ADDRESSBOOK_CFLAGS) \
        $(SQLITE3_CFLAGS) \
        $(SOUP_CFLAGS) \
+       $(CODE_COVERAGE_CFLAGS) \
        $(NULL)
 
 libebookbackendews_la_SOURCES = \
@@ -55,7 +56,7 @@ libebookbackendews_la_LIBADD = \
        $(NULL)
 
 libebookbackendews_la_LDFLAGS = \
-       -module -avoid-version $(NO_UNDEFINED)
+       -module -avoid-version $(NO_UNDEFINED) $(CODE_COVERAGE_LDFLAGS)
 
 noinst_PROGRAMS = gal-lzx-decompress-test oab-decode-test
 
diff --git a/src/calendar/Makefile.am b/src/calendar/Makefile.am
index 5cbdf06..0412f0c 100644
--- a/src/calendar/Makefile.am
+++ b/src/calendar/Makefile.am
@@ -19,6 +19,7 @@ libecalbackendews_la_CPPFLAGS = \
        $(SOUP_CFLAGS) \
        $(CAMEL_CFLAGS) \
        $(DEBUG_CFLAGS) \
+       $(CODE_COVERAGE_CFLAGS) \
        $(NULL)
 
 libecalbackendews_la_SOURCES = \
@@ -41,7 +42,7 @@ libecalbackendews_la_LIBADD = \
        $(NULL)
 
 libecalbackendews_la_LDFLAGS = \
-       -module -avoid-version $(NO_UNDEFINED)
+       -module -avoid-version $(NO_UNDEFINED) $(CODE_COVERAGE_LDFLAGS)
 
 -include $(top_srcdir)/git.mk
 
diff --git a/src/camel/Makefile.am b/src/camel/Makefile.am
index 794d438..d57a49b 100644
--- a/src/camel/Makefile.am
+++ b/src/camel/Makefile.am
@@ -26,6 +26,7 @@ libcamelews_la_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/src \
        -DEXCHANGE_EWS_LOCALEDIR=\"$(localedir)\" \
+       -DG_LOG_DOMAIN=\"camel-ews-provider\" \
        $(CAMEL_CFLAGS) \
        $(LIBEDATASERVER_CFLAGS) \
        $(LIBECAL_CFLAGS) \
@@ -34,7 +35,7 @@ libcamelews_la_CPPFLAGS = \
        $(SOUP_CFLAGS) \
        $(LIBEBACKEND_CFLAGS) \
        $(E_DATA_SERVER_CFLAGS) \
-       -DG_LOG_DOMAIN=\"camel-ews-provider\" \
+       $(CODE_COVERAGE_CFLAGS) \
        $(NULL)
 
 libcamelews_la_SOURCES = \
@@ -60,7 +61,7 @@ noinst_HEADERS = \
        camel-ews-transport.h \
        $(NULL)
 
-libcamelews_la_LDFLAGS = -avoid-version $(NO_UNDEFINED)
+libcamelews_la_LDFLAGS = -avoid-version $(NO_UNDEFINED) $(CODE_COVERAGE_LDFLAGS)
 
 libcamelews_la_LIBADD = \
        $(top_builddir)/src/server/libeews-1.2.la  \
diff --git a/src/collection/Makefile.am b/src/collection/Makefile.am
index 7120c90..125ca44 100644
--- a/src/collection/Makefile.am
+++ b/src/collection/Makefile.am
@@ -10,6 +10,7 @@ module_ews_backend_la_CPPFLAGS = \
        $(LIBEDATASERVER_CFLAGS) \
        $(LIBEBACKEND_CFLAGS) \
        $(SOUP_CFLAGS) \
+       $(CODE_COVERAGE_CFLAGS) \
        $(NULL)
 
 module_ews_backend_la_SOURCES = \
@@ -29,7 +30,7 @@ module_ews_backend_la_LIBADD = \
        $(NULL)
 
 module_ews_backend_la_LDFLAGS = \
-       -module -avoid-version $(NO_UNDEFINED) \
+       -module -avoid-version $(NO_UNDEFINED) $(CODE_COVERAGE_LDFLAGS) \
        $(NULL)
 
 -include $(top_srcdir)/git.mk
diff --git a/src/configuration/Makefile.am b/src/configuration/Makefile.am
index 44914eb..2aa408b 100644
--- a/src/configuration/Makefile.am
+++ b/src/configuration/Makefile.am
@@ -10,6 +10,7 @@ module_ews_configuration_la_CPPFLAGS = \
        $(EVOLUTION_MAIL_CFLAGS) \
        $(EVOLUTION_SHELL_CFLAGS) \
        $(LIBECAL_CFLAGS) \
+       $(CODE_COVERAGE_CFLAGS) \
        $(NULL)
 
 module_ews_configuration_la_SOURCES = \
@@ -58,7 +59,7 @@ module_ews_configuration_la_LIBADD = \
        $(NULL)
 
 module_ews_configuration_la_LDFLAGS = \
-       -module -avoid-version $(NO_UNDEFINED)
+       -module -avoid-version $(NO_UNDEFINED) $(CODE_COVERAGE_LDFLAGS)
 
 error_DATA = module-ews-configuration.error
 
diff --git a/src/server/Makefile.am b/src/server/Makefile.am
index 826ce77..6b90322 100644
--- a/src/server/Makefile.am
+++ b/src/server/Makefile.am
@@ -32,6 +32,7 @@ libeews_1_2_la_CPPFLAGS = \
        $(LIBICAL_CFLAGS) \
        $(LIBEDATASERVER_CFLAGS) \
        $(DEBUG_CFLAGS) \
+       $(CODE_COVERAGE_CFLAGS) \
        $(NULL)
 
 libeews_1_2_la_SOURCES = \
@@ -69,7 +70,7 @@ libeews_1_2_la_LIBADD = \
        $(SOCKET_LIBS) \
        $(NULL)
 
-libeews_1_2_la_LDFLAGS = $(NO_UNDEFINED)
+libeews_1_2_la_LDFLAGS = $(NO_UNDEFINED) $(CODE_COVERAGE_LDFLAGS)
 
 libeewsincludedir = $(privincludedir)/ews
 
diff --git a/src/utils/Makefile.am b/src/utils/Makefile.am
index 2364ffc..39d96fe 100644
--- a/src/utils/Makefile.am
+++ b/src/utils/Makefile.am
@@ -14,6 +14,7 @@ libewsutils_la_CPPFLAGS = \
        $(DEBUG_CFLAGS) \
        $(CAMEL_CFLAGS) \
        $(LIBEDATACAL_CFLAGS) \
+       $(CODE_COVERAGE_CFLAGS) \
        $(NULL)
 
 libewsutils_la_SOURCES = \
@@ -33,6 +34,6 @@ libewsutils_la_LIBADD = \
        $(LIBEDATACAL_LIBS) \
        $(NULL)
 
-libewsutils_la_LDFLAGS = $(NO_UNDEFINED)
+libewsutils_la_LDFLAGS = $(NO_UNDEFINED) $(CODE_COVERAGE_LDFLAGS)
 
 -include $(top_srcdir)/git.mk
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7247785..864cfdc 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,7 @@
 include $(top_srcdir)/gtester.mk
 
+ GNOME_CODE_COVERAGE_RULES@
+
 AM_CPPFLAGS = \
        -I$(top_srcdir) \
        -I$(top_srcdir)/src \


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