File: Makefile.am

package info (click to toggle)
pigment 0.3.6-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,060 kB
  • ctags: 7,318
  • sloc: ansic: 34,269; xml: 11,990; sh: 9,155; makefile: 560; perl: 383
file content (62 lines) | stat: -rw-r--r-- 1,688 bytes parent folder | download | duplicates (2)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
EXTRA_DIST = README

SUBDIRS = check

DIST_SUBDIRS = \
	check \
	interactive

check-interactive:
	make -C interactive/ check

# coverage stuff

COVERAGE_DIRS = \
	pgm \
	plugins/boilerplate \
	plugins/opengl

COVERAGE_FILES = $(foreach dir,$(COVERAGE_DIRS),$(wildcard $(top_builddir)/$(dir)/*.gcov))
COVERAGE_FILES_REL = $(subst $(top_builddir)/,,$(COVERAGE_FILES))
COVERAGE_OUT_FILES = $(foreach dir,$(COVERAGE_DIRS),$(wildcard $(top_builddir)/$(dir)/*.gcov.out))
COVERAGE_OUT_FILES_REL = $(subst $(top_builddir)/,,$(COVERAGE_OUT_FILES))

debug:
	echo $(COVERAGE_FILES)
	echo $(COVERAGE_FILES_REL)

.PHONY: coverage
if GST_GCOV_ENABLED
coverage:
	for file in `find $(top_builddir) -name '*.gcda'`; do rm $$file; done
	make check
	make coverage-report
else
coverage:
	echo "You need to configure with --enable-gcov to get coverage data"
	exit 1
endif

coverage-report:
	rm -rf coverage
	for dir in $(COVERAGE_DIRS); do					\
	  mkdir -p coverage/$$dir;					\
	  make -C $(top_builddir)/$$dir gcov;				\
	done

	for dir in $(COVERAGE_DIRS); do					\
	  files="`ls $(top_builddir)/$$dir/*.gcov.out 2> /dev/null`";	\
          if test ! -z "$$files"; then					\
	    perl $(top_srcdir)/tests/tools/coverage/coverage-report.pl	\
	      $(top_builddir)/$$dir/*.gcov.out >			\
	      coverage/$$dir/index.xml;					\
	    xsltproc $(top_srcdir)/tests/tools/coverage/coverage-report.xsl	\
	      coverage/$$dir/index.xml > coverage/$$dir/index.html;	\
	  fi;								\
	done

	for file in $(COVERAGE_FILES_REL); do				\
	  echo Generating coverage/$$file.html;				\
	  perl $(top_srcdir)/tests/tools/coverage/coverage-report-entry.pl	\
	    $(top_builddir)/$$file > coverage/$$file.html;		\
	done