summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-12-11 11:01:25 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-12-12 12:24:10 -0200
commit6a56b171b6c4a8bdc3db47ce5b9627db68ac468b (patch)
tree96c443ae9ee91af93be211cf26fc4004a41b7b79 /acinclude.m4
parentb1b312d4ec0ec4123e96ddb2719933120a09ea00 (diff)
downloadbluez-6a56b171b6c4a8bdc3db47ce5b9627db68ac468b.tar.gz
build: Add coverage support
Coverage is enabled with --enable-maintainer-mode, 2 new targets are added 'coverage' and 'clean-coverage', the first generate the reports using lcov and depend on the second to cleanup previous generated reports and .gcda files.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m44
1 files changed, 4 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 4c241bf0b..4cfc80a0d 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -52,6 +52,10 @@ AC_DEFUN([MISC_FLAGS], [
misc_ldflags="$misc_ldflags -pie"
fi
])
+ if (test "$USE_MAINTAINER_MODE" = "yes"); then
+ misc_cflags="$misc_cflags --coverage"
+ misc_ldflags="$misc_ldflags --coverage"
+ fi
AC_SUBST([MISC_CFLAGS], $misc_cflags)
AC_SUBST([MISC_LDFLAGS], $misc_ldflags)
])