aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac9
-rw-r--r--data/Makefile.am6
-rw-r--r--lib/Makefile.am6
4 files changed, 19 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index c0d4a471..94cd26da 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = po lib data tests
+
+include $(top_srcdir)/Makefile.am.coverage
diff --git a/configure.ac b/configure.ac
index 31640e6b..d0816254 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,6 +74,15 @@ PKG_CHECK_MODULES([BAMF], [libbamf3])
AC_SUBST([BAMF_CFLAGS])
AC_SUBST([BAMF_LIBS])
+m4_include([m4/gcov.m4])
+AC_TDD_GCOV
+AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes])
+AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes])
+AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes])
+AC_SUBST(COVERAGE_CFLAGS)
+AC_SUBST(COVERAGE_CXXFLAGS)
+AC_SUBST(COVERAGE_LDFLAGS)
+
AC_CONFIG_FILES([Makefile
data/Makefile
lib/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index a7f8d39c..9f9b46ff 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -22,13 +22,15 @@ indicator_keyboard_icon_generator_CFLAGS = $(AM_CFLAGS) \
$(PANGOFT2_CFLAGS) \
$(GTK_CFLAGS) \
$(GNOME_DESKTOP_CFLAGS) \
- $(LIBXKLAVIER_CFLAGS)
+ $(LIBXKLAVIER_CFLAGS) \
+ $(COVERAGE_CFLAGS)
indicator_keyboard_icon_generator_LDFLAGS = $(AM_LDFLAGS) \
$(GEE_LIBS) \
$(PANGOFT2_LIBS) \
$(GTK_LIBS) \
$(GNOME_DESKTOP_LIBS) \
- $(LIBXKLAVIER_LIBS)
+ $(LIBXKLAVIER_LIBS) \
+ $(COVERAGE_LDFLAGS)
dist_service_DATA = indicator-keyboard.service
servicedir = $(DBUS_SERVICE_DIR)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index cdf41ba2..2e257df0 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -28,7 +28,8 @@ indicator_keyboard_service_CFLAGS = $(AM_CFLAGS) \
$(LIBXKLAVIER_CFLAGS) \
$(LIBGNOMEKBD_CFLAGS) \
$(IBUS_CFLAGS) \
- $(BAMF_CFLAGS)
+ $(BAMF_CFLAGS) \
+ $(COVERAGE_CFLAGS)
indicator_keyboard_service_LDFLAGS = $(AM_LDFLAGS) \
$(GEE_LIBS) \
$(PANGOCAIRO_LIBS) \
@@ -37,4 +38,5 @@ indicator_keyboard_service_LDFLAGS = $(AM_LDFLAGS) \
$(LIBXKLAVIER_LIBS) \
$(LIBGNOMEKBD_LIBS) \
$(IBUS_LIBS) \
- $(BAMF_LIBS)
+ $(BAMF_LIBS) \
+ $(COVERAGE_LDFLAGS)