blob: 978d2c09e0ac2091dbcb86a25b871569bc9d9100 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
## Process this file with automake to produce Makefile.in
DIST_SUBDIRS = m4
SUBDIRS = gidl girepository tools tests
ACLOCAL_AMFLAGS = -I m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = gobject-introspection.pc
EXTRA_DIST = $(pkgconfig_DATA)
if GI_GCOV_ENABLED
GCOV_DIRS = girepository tools
clean-gcov:
find -name "*.gcda" -o -name "*.gcov" -delete
clean-gcno:
find -name "*.gcno" -delete
.PHONEY: gcov-all
gcov-all:
@for dir in $(GCOV_DIRS); do \
cd $(abs_srcdir)/$$dir && \
for file in *.c; do \
gcov -f -p -o `find $(abs_builddir)/$$dir -newer $$file -name "*-$${file/.c/.gcda}" -print0 | sed -e 's/\.gcda/\.o/'` $$file > /dev/null; \
done \
done
.PHONEY: coverage-report.txt
coverage-report.txt: clean clean-gcov all check gcov-all
@rm -f $(top_builddir)/coverage-report.txt
@echo -e "=== Coverage Report ===\n" >> $(top_builddir)/coverage-report.txt
@for dir in $(GCOV_DIRS); do \
echo "Module '$$dir':" >> $(top_builddir)/coverage-report.txt; \
$(MAKE) -C $$dir coverage-report; \
done
check-coverage: coverage-report.txt
@cat $(top_builddir)/coverage-report.txt
else
check-coverage:
@echo "Need to reconfigure with --enable-gcov"
endif
|