Date: Monday, January 30, 2006 @ 11:53:42
Author: csaba
Path: /cvsroot/carob/libmysequoia
Modified: Makefile.am (1.3 -> 1.4) configure.ac (1.2 -> 1.3)
Define the lcov rules in the Makefile.am only if lcov whas enabled
at configure time with --enable-gcov.
--------------+
Makefile.am | 6 ++++++
configure.ac | 15 ++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
Index: libmysequoia/Makefile.am
diff -u libmysequoia/Makefile.am:1.3 libmysequoia/Makefile.am:1.4
--- libmysequoia/Makefile.am:1.3 Mon Jan 2 13:19:56 2006
+++ libmysequoia/Makefile.am Mon Jan 30 11:53:42 2006
@@ -47,6 +47,7 @@
$(DOC_HTML): $(DOXYFILE)
$(DOXYGEN) $(DOXYFILE)
+if GCOV
lcov: check
rm -rf $(LCOV_TMP)
$(mkinstalldirs) $(LCOV_TMP)
@@ -65,6 +66,11 @@
@echo ""
@echo "Type \"firefox $(LCOV_HTML)/index.html\" to see the results."
@echo ""
+else
+lcov: check
+ @echo ""
+ @echo "You must enable at configure time: ./configure --enable-gcov"
+endif
clean-local:
rm -rf $(DOC_OUT_HTML) $(DOC_OUT_PDF) $(LCOV_TMP) $(LCOV_HTML)
Index: libmysequoia/configure.ac
diff -u libmysequoia/configure.ac:1.2 libmysequoia/configure.ac:1.3
--- libmysequoia/configure.ac:1.2 Mon Jan 30 11:03:40 2006
+++ libmysequoia/configure.ac Mon Jan 30 11:53:42 2006
@@ -25,7 +25,8 @@
enable_tests=yes
-if test "x$enable_cppunit" = xno; then
+if test "x$enable_cppunit" = xno;
+then
enable_tests=no
else
AC_CHECK_PROG(CPPUNIT_CONFIG, cppunit-config, yes, no)
@@ -46,8 +47,13 @@
# Check for lcov
AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov], [turn on code coverage
analysis tools]))
-if test "x$enable_gcov" = "xyes";
+
+enable_code_coverage=yes
+
+if test "x$enable_gcov" = "xno";
then
+ enable_code_coverage=no
+else
AC_PATH_PROG(LCOV, lcov, no)
if test "x$LCOV" = "xno"; then
AC_MSG_ERROR([You need to install the lcov package])
@@ -55,12 +61,15 @@
AC_PATH_PROG(GENHTML, genhtml, no)
if test "x$GENHTML" = "xno"; then
- AC_MSG_ERROR([You need to install the lcov package])
+ AC_MSG_ERROR([You need to install the lcov package])
fi
GCOV_CFLAGS="-fprofile-arcs -ftest-coverage"
GCOV_LDADD="-lgcov"
fi
+
+AM_CONDITIONAL(GCOV, test x$enable_code_coverage = xyes)
+
AC_SUBST(LCOV)
AC_SUBST(GENHTML)
AC_SUBST(GCOV_CFLAGS)
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits