1 DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-docbook
3 all-local: gst-element-check-@GST_MAJORMINOR@.m4
5 gst-element-check-@GST_MAJORMINOR@.m4: gst-element-check.m4
6 cp gst-element-check.m4 gst-element-check-@GST_MAJORMINOR@.m4
8 # note: keep in sync with configure.ac
9 ACLOCAL_AMFLAGS = -I common/m4 -I .
11 aclocaldir = $(datadir)/aclocal
12 aclocal_DATA = gst-element-check-@GST_MAJORMINOR@.m4
14 SUBDIRS = pkgconfig \
15 gst libs plugins tools tests \
16 docs \
17 po \
18 common
20 # These are all the possible subdirs
21 DIST_SUBDIRS = pkgconfig \
22 gst libs plugins tools tests \
23 docs \
24 po \
25 common
27 # include before EXTRA_DIST for win32 assignment
28 include $(top_srcdir)/common/win32.mak
30 EXTRA_DIST = \
31 gstreamer.spec gstreamer.spec.in \
32 check-checks.m4 \
33 gst-element-check.m4.in \
34 configure.ac autogen.sh depcomp \
35 MAINTAINERS ABOUT-NLS RELEASE gstreamer.doap \
36 $(win32)
38 CLEANFILES = gst-element-check-@GST_MAJORMINOR@.m4
40 DISTCLEANFILES = _stdint.h
42 include $(top_srcdir)/common/release.mak
43 include $(top_srcdir)/common/po.mak
45 if GST_GCOV_ENABLED
46 clean-gcov:
47 find -name "*.da" -o -name "*.gcov" | xargs rm || true
49 clean-bbg:
50 find -name "*.bbg" -o -name "*.bb" | xargs rm || true
52 GCOV_DIRS=gst libs
54 ## .PHONY so it always rebuilds it
55 .PHONY: coverage-report.txt
57 coverage-report.txt:
58 BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ; \
59 C_FILES= ; \
60 for F in $$BBG_FILES ; do \
61 F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ; \
62 C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ; \
63 B=`basename $$F .bbg` ; \
64 D=`dirname $$F` ; \
65 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ; \
66 DA_libs=`echo $$D/.libs/$$B/.da` ; \
67 if test -e $$DA || test -e $$DA_libs; then \
68 C_FILES="$$C_FILES $$C" ; \
69 fi ; \
70 done ; \
71 echo $$C_FILES ; \
72 $(top_builddir)/testsuite/decode-gcov --report $$C_FILES > coverage-report.txt
74 check-coverage: clean-gcov all check coverage-report.txt
75 cat coverage-report.txt
77 else
78 coverage-report.txt:
79 echo "Need to reconfigure with --enable-gcov"
81 check-coverage:
82 echo "Need to reconfigure with --enable-gcov"
83 endif
85 if HAVE_CHECK
86 check-valgrind:
87 cd tests/check && make check-valgrind
89 check-torture:
90 cd tests/check && make torture
91 else
92 check-valgrind:
93 echo "'check' library not installed, skipping"
95 check-torture:
96 echo "'check' library not installed, skipping"
97 endif
99 # FIXME: this target should be run every time we do "make release"
100 # find a way of automating that
101 win32-update:
102 for f in gstversion.h gstenumtypes.c gstenumtypes.h; do \
103 cp $(top_builddir)/gst/$$f win32/common; done
104 $(top_srcdir)/tools/gst-indent win32/common/gstenumtypes.c
105 cp $(top_builddir)/win32/common/config.h-new \
106 $(top_srcdir)/win32/common/config.h
108 check-enum-gettypes: $(top_builddir)/gst/gstenumtypes.h
109 echo 'Checking if all enum and flag _get_type() funcs are inited in gst_init()'; \
110 FUNCS=`grep '_get_type (' gst/gstenumtypes.h | sed -e 's/^.*gst_/gst_/' -e 's/_get_type.*$$/_get_type/'`;\
111 MISSING_FUNCS=''; \
112 for f in $$FUNCS; do \
113 INIT_LINE=`grep $$f $(top_srcdir)/gst/*.c | grep g_type_class_ref`; \
114 if test "x$$INIT_LINE" = "x"; then \
115 MISSING_FUNCS="$$MISSING_FUNCS $$f"; \
116 fi; \
117 done; \
118 if test "x$$MISSING_FUNCS" != "x"; then \
119 echo "FIXME: please add to the following to gst/gst.c init_post():"; \
120 for f in $$MISSING_FUNCS; do \
121 echo " g_type_class_ref ($$f ());"; \
122 done; \
123 exit 1; \
124 fi; \
125 echo 'Checking if all enum and flag _get_type() funcs are deinited in gst_deinit()'; \
126 MISSING_FUNCS=''; \
127 for f in $$FUNCS; do \
128 INIT_LINE=`grep $$f $(top_srcdir)/gst/*.c | grep g_type_class_unref`; \
129 if test "x$$INIT_LINE" = "x"; then \
130 MISSING_FUNCS="$$MISSING_FUNCS $$f"; \
131 fi; \
132 done; \
133 if test "x$$MISSING_FUNCS" != "x"; then \
134 echo "FIXME: please add to the following to gst/gst.c gst_deinit():"; \
135 for f in $$MISSING_FUNCS; do \
136 echo " g_type_class_unref (g_type_class_peek ($$f ()));"; \
137 done; \
138 exit 1; \
139 fi
141 include $(top_srcdir)/common/coverage/lcov.mak
143 check: check-exports check-enum-gettypes