[cairo-commit] configure.in Makefile.am
Chris Wilson
ickle at kemper.freedesktop.org
Sun Dec 2 10:46:44 PST 2007
Makefile.am | 17 ++++++++++++-----
configure.in | 4 ++++
2 files changed, 16 insertions(+), 5 deletions(-)
New commits:
commit 9c732594039b164a1e08125c35ec9d04278f0cbf
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Dec 2 17:55:35 2007 +0000
[Makefile.am] Wrap lcov make targets within an AM_CONDITIONAL.
Hide 'make lcov' and friends unless the user has actually enabled lcov
supported during configure.
diff --git a/Makefile.am b/Makefile.am
index a47920f..30d6c1c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,7 @@ check-valgrind: all
perf: all
cd perf && $(MAKE) $(AM_MAKEFLAGS) perf
-.PHONY: lcov lcov-perf genlcov lcov-clean
+if CAIRO_HAS_LCOV
# use recursive makes in order to ignore errors during check/perf
lcov:
-$(MAKE) $(AM_MAKEFLAGS) check
@@ -38,12 +38,19 @@ genlcov:
$(LTP) --directory $(top_builddir) --capture --output-file cairo-lcov.info --test-name CAIRO_PERF --no-checksum
$(SED) -e 's#.libs/##' < cairo-lcov.info > cairo-lcov.info.tmp
LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory cairo-lcov --title "Cairo Code Coverage" --show-details cairo-lcov.info.tmp
- rm -f cairo-lcov.info.tmp
+ $(RM) cairo-lcov.info.tmp
+else
+lcov lcov-perf genlcov:
+ @echo You need to configure Cairo with support for gcov enabled.
+ @echo e.g, ./configure --enable-gcov
+endif
lcov-clean:
+if CAIRO_HAS_LCOV
-$(LTP) --directory $(top_builddir) -z
- -$(RM) -rf cairo-lcov.info cairo-lcov
- -$(FIND) -name '*.gcda' -print | ${XARGS} ${RM}
+endif
+ -$(RM) -r cairo-lcov.info cairo-lcov
+ -$(FIND) -name '*.gcda' -print | $(XARGS) $(RM)
EXTRA_DIST = \
AUTHORS \
@@ -227,4 +234,4 @@ doc-publish: doc
scp $(MANUAL_TAR_FILE) $(RELEASE_UPLOAD_HOST):$(MANUAL_UPLOAD_DIR)
ssh $(RELEASE_UPLOAD_HOST) "cd $(MANUAL_UPLOAD_DIR) && tar xzf $(MANUAL_TAR_FILE) && rm -f manual && ln -s $(MANUAL_DATED) manual && ln -sf $(MANUAL_TAR_FILE) cairo-manual.tar.gz"
-.PHONY: release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky release-check release-upload release-publish docs-publish lcov lcov-perf lcov-clean
+.PHONY: release-verify-even-micro release-verify-newer release-remove-old release-cleanup-group-sticky release-check release-upload release-publish docs-publish lcov lcov-perf lcov-clean genlcov
diff --git a/configure.in b/configure.in
index 6fcda8c..374de44 100644
--- a/configure.in
+++ b/configure.in
@@ -821,6 +821,7 @@ AC_MSG_RESULT($have_mmx_intrinsics)
dnl ===========================================================================
+cairo_has_lcov=no
AC_ARG_ENABLE(gcov,
AS_HELP_STRING([--enable-gcov],
[Enable gcov]),
@@ -868,6 +869,8 @@ if test "x$use_gcov" = "xyes"; then
AC_MSG_ERROR([$ltp_msg])
LTP="exit 0;"
;;
+ *)
+ cairo_has_lcov=yes
esac
if test -z "$LTP_GENHTML"; then
@@ -887,6 +890,7 @@ dnl PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.gcov, $abs_srcdir)
CAIRO_CFLAGS="$CAIRO_CFLAGS -O0 -fprofile-arcs -ftest-coverage"
CAIRO_LDADD="$CAIRO_LDADD -lgcov"
fi
+AM_CONDITIONAL(CAIRO_HAS_LCOV, test "x$cairo_has_lcov" = "xyes")
dnl ===========================================================================
More information about the cairo-commit
mailing list