aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-gtk
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-04-03 21:33:03 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-04-03 21:33:03 -0500
commit72c1f1c6b9f169dff5f70be3c7fcaac570254508 (patch)
treeb2fe38f07b9d0acc16636d9e12a82ee93bd41b83 /libdbusmenu-gtk
parent5c3834907b18b2c9230d39767ab9092e80c5c849 (diff)
parentc54e02d80857bd08071e2311f456ef992a9d7a01 (diff)
downloadlibdbusmenu-72c1f1c6b9f169dff5f70be3c7fcaac570254508.tar.gz
libdbusmenu-72c1f1c6b9f169dff5f70be3c7fcaac570254508.tar.bz2
libdbusmenu-72c1f1c6b9f169dff5f70be3c7fcaac570254508.zip
Merge lp:~allanlesage/dbusmenu/TDD to add gcov targets to autotools build for code-coverage reporting. For more information, see this blog post: http://qualityhour.wordpress.com/2012/01/29/test-coverage-tutorial-for-cc-autotools-projects/ .
To compile with coverage tooling, ./autogen.sh --enable-gcov, then make coverage-html . Note that you'll need lcov to autoconf. Also note that you'll get an error on make if you have no tests, as there are no coverage artifacts to generate the html report. For review, please pay special attention to flags added in the project's makefiles.
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r--libdbusmenu-gtk/Makefile.am10
1 files changed, 9 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/Makefile.am b/libdbusmenu-gtk/Makefile.am
index fcebd04..b52098f 100644
--- a/libdbusmenu-gtk/Makefile.am
+++ b/libdbusmenu-gtk/Makefile.am
@@ -57,12 +57,14 @@ libdbusmenu_gtk_la_SOURCES = \
parser.c
libdbusmenu_gtk_la_LDFLAGS = \
+ $(COVERAGE_LDFLAGS) \
-version-info $(LIBDBUSMENU_CURRENT):$(LIBDBUSMENU_REVISION):$(LIBDBUSMENU_AGE) \
-no-undefined \
-export-symbols-regex "^[^_].*"
libdbusmenu_gtk_la_CFLAGS = \
$(DBUSMENUGTK_CFLAGS) \
+ $(COVERAGE_CFLAGS) \
-I$(top_srcdir) \
-Wall -Werror -Wno-error=deprecated-declarations \
-DG_LOG_DOMAIN="\"LIBDBUSMENU-GTK\""
@@ -117,7 +119,12 @@ DbusmenuGtk_0_4_gir_INCLUDES = \
GObject-2.0 \
$(GTKGIR) \
Dbusmenu-0.4
-DbusmenuGtk_0_4_gir_CFLAGS = $(DBUSMENUGTK_CFLAGS) -I$(top_srcdir)
+DbusmenuGtk_0_4_gir_CFLAGS = \
+ $(DBUSMENUGTK_CFLAGS) \
+ $(COVERAGE_CFLAGS) \
+ -I$(top_srcdir)
+DbusmenuGtk_0_4_gir_LDFLAGS = \
+ $(COVERAGE_LDFLAGS)
DbusmenuGtk_0_4_gir_LIBS = libdbusmenu-gtk$(VER).la \
$(top_builddir)/libdbusmenu-glib/libdbusmenu-glib.la
DbusmenuGtk_0_4_gir_FILES = $(addprefix $(srcdir)/, $(introspection_sources))
@@ -127,6 +134,7 @@ DbusmenuGtk_0_4_gir_EXPORT_PACKAGES = dbusmenu-gtk$(VER)-0.4
# We duplicate these for the same reason as libdbusmenu_gtk3includedir above
DbusmenuGtk3_0_4_gir_INCLUDES = $(DbusmenuGtk_0_4_gir_INCLUDES)
DbusmenuGtk3_0_4_gir_CFLAGS = $(DbusmenuGtk_0_4_gir_CFLAGS)
+DbusmenuGtk3_0_4_gir_LDFLAGS = $(DbusmenuGtk_0_4_gir_LDFLAGS)
DbusmenuGtk3_0_4_gir_LIBS = $(DbusmenuGtk_0_4_gir_LIBS)
DbusmenuGtk3_0_4_gir_FILES = $(DbusmenuGtk_0_4_gir_FILES)
DbusmenuGtk3_0_4_gir_NAMESPACE = $(DbusmenuGtk_0_4_gir_NAMESPACE)