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



commit 0d130f18428404db1f8189405980d6dca6da3569
Author: Milan Crha <mcrha redhat com>
Date:   Tue Mar 25 12:08:51 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                    |    2 ++
 src/addressbook/Makefile.am     |    5 +++--
 src/calendar/Makefile.am        |    7 ++++---
 src/camel/Makefile.am           |    4 +++-
 src/collection/Makefile.am      |    3 ++-
 src/configuration/Makefile.am   |    3 ++-
 src/libexchangemapi/Makefile.am |    5 +++--
 8 files changed, 21 insertions(+), 10 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 3e30a14..59524ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,8 @@
 SUBDIRS = src po
 DIST_SUBDIRS= src po
 
+ GNOME_CODE_COVERAGE_RULES@
+
 EXTRA_DIST =                   \
        ChangeLog               \
        intltool-merge.in       \
diff --git a/configure.ac b/configure.ac
index e37d5e5..581ca82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -137,6 +137,8 @@ AC_PROG_LIBTOOL
 
 PKG_PROG_PKG_CONFIG
 
+GNOME_CODE_COVERAGE
+
 dnl *****************************
 dnl Check for GNOME Platform
 dnl *****************************
diff --git a/src/addressbook/Makefile.am b/src/addressbook/Makefile.am
index de1bd46..569631a 100644
--- a/src/addressbook/Makefile.am
+++ b/src/addressbook/Makefile.am
@@ -6,7 +6,8 @@ AM_CPPFLAGS =                                   \
        $(LIBEBACKEND_CFLAGS)                   \
        $(LIBEBOOK_CFLAGS)                      \
        $(LIBEDATABOOK_CFLAGS)                  \
-       $(LIBMAPI_CFLAGS)
+       $(LIBMAPI_CFLAGS)                       \
+       $(CODE_COVERAGE_CFLAGS)
 
 ebook_backend_LTLIBRARIES = libebookbackendmapi.la
 
@@ -27,6 +28,6 @@ libebookbackendmapi_la_LIBADD =                       \
        $(LIBMAPI_LIBS)
 
 libebookbackendmapi_la_LDFLAGS =               \
-       -module -avoid-version $(NO_UNDEFINED)
+       -module -avoid-version $(NO_UNDEFINED) $(CODE_COVERAGE_LDFLAGS)
 
 -include $(top_srcdir)/git.mk
diff --git a/src/calendar/Makefile.am b/src/calendar/Makefile.am
index 00930bb..fb128aa 100644
--- a/src/calendar/Makefile.am
+++ b/src/calendar/Makefile.am
@@ -6,8 +6,9 @@ AM_CPPFLAGS =                                   \
        $(LIBEBACKEND_CFLAGS)                   \
        $(LIBECAL_CFLAGS)                       \
        $(LIBEDATACAL_CFLAGS)                   \
-       $(LIBMAPI_CFLAGS) \
-       $(CAMEL_CFLAGS)
+       $(LIBMAPI_CFLAGS)                       \
+       $(CAMEL_CFLAGS)                         \
+       $(CODE_COVERAGE_CFLAGS)
 
 ecal_backend_LTLIBRARIES = libecalbackendmapi.la
 
@@ -25,7 +26,7 @@ libecalbackendmapi_la_LIBADD =                        \
        $(CAMEL_LIBS)
 
 libecalbackendmapi_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 f7bb93a..1e01e72 100644
--- a/src/camel/Makefile.am
+++ b/src/camel/Makefile.am
@@ -11,6 +11,7 @@ AM_CPPFLAGS = -I..                            \
        $(CAMEL_CFLAGS)                         \
        $(LIBECAL_CFLAGS)                       \
         $(LIBMAPI_CFLAGS)                       \
+       $(CODE_COVERAGE_CFLAGS)                 \
        -DEXCHANGE_MAPI_LOCALEDIR=\"$(localedir)\" \
        -DG_LOG_DOMAIN=\"camel-mapi-provider\"
 
@@ -31,7 +32,8 @@ noinst_HEADERS =                              \
        camel-mapi-store-summary.h              \
        camel-mapi-transport.h
 
-libcamelmapi_la_LDFLAGS = -avoid-version -module $(NO_UNDEFINED)
+libcamelmapi_la_LDFLAGS = -avoid-version -module $(NO_UNDEFINED) $(CODE_COVERAGE_LDFLAGS)
+
 libcamelmapi_la_LIBADD =                       \
        $(top_builddir)/src/libexchangemapi/libexchangemapi-1.0.la \
        $(EVOLUTION_MAIL_LIBS)                  \
diff --git a/src/collection/Makefile.am b/src/collection/Makefile.am
index 0798b8e..63df59a 100644
--- a/src/collection/Makefile.am
+++ b/src/collection/Makefile.am
@@ -11,6 +11,7 @@ module_mapi_backend_la_CPPFLAGS =             \
        $(LIBEBACKEND_CFLAGS)                   \
        $(LIBMAPI_CFLAGS)                       \
        $(CAMEL_CFLAGS)                         \
+       $(CODE_COVERAGE_CFLAGS)                 \
        $(NULL)
 
 module_mapi_backend_la_SOURCES =       \
@@ -32,7 +33,7 @@ module_mapi_backend_la_LIBADD =               \
        $(NULL)
 
 module_mapi_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 6d65dde..170eb75 100644
--- a/src/configuration/Makefile.am
+++ b/src/configuration/Makefile.am
@@ -14,6 +14,7 @@ module_mapi_configuration_la_CPPFLAGS =                       \
        $(EVOLUTION_MAIL_CFLAGS)                        \
        $(EVOLUTION_SHELL_CFLAGS)                       \
        $(LIBMAPI_CFLAGS)                               \
+       $(CODE_COVERAGE_CFLAGS)                         \
        $(NULL)
 
 module_mapi_configuration_la_SOURCES =         \
@@ -53,6 +54,6 @@ module_mapi_configuration_la_LIBADD =         \
        $(NULL)
 
 module_mapi_configuration_la_LDFLAGS = \
-       -module -avoid-version $(NO_UNDEFINED)
+       -module -avoid-version $(NO_UNDEFINED) $(CODE_COVERAGE_LDFLAGS)
 
 -include $(top_srcdir)/git.mk
diff --git a/src/libexchangemapi/Makefile.am b/src/libexchangemapi/Makefile.am
index d6efaba..5fb16cb 100644
--- a/src/libexchangemapi/Makefile.am
+++ b/src/libexchangemapi/Makefile.am
@@ -8,7 +8,8 @@ AM_CPPFLAGS =                                           \
        $(LIBEBOOK_CFLAGS)                              \
        $(LIBECAL_CFLAGS)                               \
        $(LIBMAPI_CFLAGS)                               \
-       $(CAMEL_CFLAGS)
+       $(CAMEL_CFLAGS)                                 \
+       $(CODE_COVERAGE_CFLAGS)
 
 
 lib_LTLIBRARIES = libexchangemapi-1.0.la
@@ -55,7 +56,7 @@ libexchangemapi_1_0_la_LIBADD =                       \
        $(LIBMAPI_LIBS)                         \
        $(CAMEL_LIBS)
 
-libexchangemapi_1_0_la_LDFLAGS = $(NO_UNDEFINED)
+libexchangemapi_1_0_la_LDFLAGS = $(NO_UNDEFINED) $(CODE_COVERAGE_LDFLAGS)
 
 libexchangemapiincludedir = $(edataserver_privincludedir)/mapi
 


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