]> xenbits.xensource.com Git - libvirt.git/commitdiff
Tell gcov to look in .libs to find coverage data
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 29 Apr 2008 15:38:13 +0000 (15:38 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 29 Apr 2008 15:38:13 +0000 (15:38 +0000)
src/Makefile.am

index 2898a8e1987ec4f3e6f744a8f7add88c2778fd47..a41f70151dc53808c0f52032aef86ef81d29f6ab 100644 (file)
@@ -148,16 +148,18 @@ EXTRA_DIST += parthelper.c
 endif
 
 cov: clean-cov
-       for i in $(CLIENT_SOURCES); do                  \
-         case $$i in *.c) ;; *) continue;; esac;       \
-         b=$$(basename $$i .c);                        \
-         o_files=;                                     \
-         for i in '' _test; do                         \
+       for i in $(CLIENT_SOURCES); do                          \
+         case $$i in *.c) ;; *) continue;; esac;               \
+         b=$$(basename $$i .c);                                \
+         o_files=;                                             \
+         for i in '' _test; do                                 \
+           g="$(LV_LIBTOOL_OBJDIR)/libvirt$${i}_la-$$b.gcda";  \
            o="$(LV_LIBTOOL_OBJDIR)/libvirt$${i}_la-$$b.o";     \
-           test -f "$$o"                               \
-             && o_files="$$o_files $$o";               \
-         done;                                         \
-         gcov -b -f $$o_files > $$b.cov;               \
+           test -f "$$o" -a -f "$$g"                           \
+             && o_files="$$o_files $$o";                       \
+         done;                                                 \
+         test -n "$$o_files"                                   \
+              && gcov -o $(LV_LIBTOOL_OBJDIR) -b -f $$o_files > $$b.cov;       \
        done
 
 clean-cov: