1 DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-docbook
3 if BUILD_TESTS
4 ## SUBDIRS_TESTS = tests testsuite
5 ## FIXME: write tests from scratch
6 SUBDIRS_TESTS =
7 if HAVE_CHECK
8 SUBDIRS_CHECK = check
9 else
10 SUBDIRS_CHECK =
11 endif
12 else
13 SUBDIRS_TESTS =
14 SUBDIRS_CHECK =
15 endif
17 if BUILD_EXAMPLES
18 ## FIXME: write examples from scratch
19 # SUBDIRS_EXAMPLES = examples
20 SUBDIRS_EXAMPLES =
21 else
22 SUBDIRS_EXAMPLES =
23 endif
25 all-local: gst-element-check-@GST_MAJORMINOR@.m4
27 gst-element-check-@GST_MAJORMINOR@.m4: gst-element-check.m4
28 cp $(srcdir)/gst-element-check.m4 gst-element-check-@GST_MAJORMINOR@.m4
30 ACLOCAL_AMFLAGS = -I common/m4
32 aclocaldir = $(datadir)/aclocal
33 aclocal_DATA = gst-element-check-@GST_MAJORMINOR@.m4
35 SUBDIRS = \
36 gst libs tools \
37 $(SUBDIRS_CHECK) \
38 $(SUBDIRS_TESTS) \
39 $(SUBDIRS_EXAMPLES) \
40 docs \
41 pkgconfig po \
42 common
44 # These are all the possible subdirs
45 DIST_SUBDIRS = \
46 gst libs tools \
47 check \
48 tests testsuite \
49 examples \
50 docs \
51 pkgconfig po \
52 common
54 win32 = $(shell cat $(top_srcdir)/win32/MANIFEST)
56 debug:
57 echo $(win32)
58 EXTRA_DIST = \
59 gstreamer.spec gstreamer.spec.in gst-element-check.m4 \
60 configure.ac autogen.sh depcomp \
61 REQUIREMENTS ABOUT-NLS DOCBUILDING DEVEL RELEASE \
62 $(win32)
64 CLEANFILES = gst-element-check-@GST_MAJORMINOR@.m4
66 include $(top_srcdir)/common/release.mak
67 include $(top_srcdir)/common/po.mak
70 if GST_GCOV_ENABLED
71 clean-gcov:
72 find -name "*.da" -o -name "*.gcov" | xargs rm || true
74 clean-bbg:
75 find -name "*.bbg" -o -name "*.bb" | xargs rm || true
77 GCOV_DIRS=gst libs
79 ## .PHONY so it always rebuilds it
80 .PHONY: coverage-report.txt test-coverage-report.html
82 coverage-report.txt:
83 BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ; \
84 C_FILES= ; \
85 for F in $$BBG_FILES ; do \
86 F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ; \
87 C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ; \
88 B=`basename $$F .bbg` ; \
89 D=`dirname $$F` ; \
90 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ; \
91 DA_libs=`echo $$D/.libs/$$B/.da` ; \
92 if test -e $$DA || test -e $$DA_libs; then \
93 C_FILES="$$C_FILES $$C" ; \
94 fi ; \
95 done ; \
96 echo $$C_FILES ; \
97 $(top_builddir)/testsuite/decode-gcov --report $$C_FILES > coverage-report.txt
99 test-coverage-report.html:
100 mkdir -p ./coverage
101 lcov --directory . --zerocounters
102 -$(MAKE) check
103 lcov --directory . --capture --output-file ./coverage/$(PACKAGE).info
104 genhtml -o ./coverage --num-spaces 2 ./coverage/$(PACKAGE).info
106 check-coverage: clean-gcov all check coverage-report.txt
107 cat coverage-report.txt
109 else
110 coverage-report.txt:
111 echo "Need to reconfigure with --enable-gcov"
113 test-coverage-report.html:
114 echo "Need to reconfigure with --enable-gcov"
116 check-coverage:
117 echo "Need to reconfigure with --enable-gcov"
118 endif
120 if HAVE_CHECK
121 check-valgrind:
122 cd check && make check-valgrind
124 check-torture:
125 cd check && make torture
126 else
127 check-valgrind:
128 echo "You need to install the 'check' library"
129 exit 1
131 check-torture:
132 echo "You need to install the 'check' library"
133 exit 1
134 endif
136 win32-update:
137 for f in gstversion.h gstenumtypes.c gstenumtypes.h; do \
138 cp $(top_builddir)/gst/$$f win32/common; done