[hitori] build: Use AX_CODE_COVERAGE



commit 3c04bf889c5d99303f71213367eeca8b3962800b
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Wed Mar 11 12:42:20 2015 +0000

    build: Use AX_CODE_COVERAGE
    
    Port the existing code coverage support to AX_CODE_COVERAGE. It is now
    controlled by --enable-code-coverage, rather than --enable-debug.
    
    https://wiki.gnome.org/Projects/GnomeCommon/Migration

 Makefile.am  |   12 ++++++------
 configure.ac |    3 +++
 2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 588b3b2..b418ab7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,15 +29,15 @@ src_hitori_CPPFLAGS = \
 src_hitori_LDADD = $(GENERAL_LIBS)
 src_hitori_CFLAGS = \
        $(GENERAL_CFLAGS) \
+       $(CODE_COVERAGE_CFLAGS) \
        $(WARN_CFLAGS) \
        $(NULL)
-
-if DEBUG
-src_hitori_CFLAGS += \
-       -fprofile-arcs \
-       -ftest-coverage \
+src_hitori_LDFLAGS = \
+       $(CODE_COVERAGE_LDFLAGS) \
        $(NULL)
-endif
+
+# Code coverage
+ CODE_COVERAGE_RULES@
 
 # Icons
 icon_dir = $(datadir)/icons/hicolor
diff --git a/configure.ac b/configure.ac
index abffa16..b29137b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,9 @@ GNOME_MAINTAINER_MODE_DEFINES
 AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[Enable debugging]),[debug=$enableval],[debug=no])
 AM_CONDITIONAL([DEBUG],[test "$debug" = "yes"])
 
+# Code coverage
+AX_CODE_COVERAGE()
+
 # GResources
 AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources])
 


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