1 DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-docbook
3 # note: keep in sync with configure.ac
4 ACLOCAL_AMFLAGS = -I m4 -I common/m4
6 aclocaldir = $(datadir)/aclocal
7 aclocal_DATA = gst-element-check-@GST_API_VERSION@.m4
10 gst libs plugins tests \
21 # These are all the possible subdirs
22 DIST_SUBDIRS = pkgconfig \
23 gst libs plugins tools tests \
30 # include before EXTRA_DIST for win32 assignment
31 include $(top_srcdir)/common/win32.mak
34 gstreamer.spec gstreamer.spec.in \
35 gst-element-check.m4 \
36 configure.ac autogen.sh depcomp \
37 MAINTAINERS ABOUT-NLS RELEASE gstreamer.doap \
38 scripts/gst-uninstalled \
41 CLEANFILES = gst-element-check-@GST_API_VERSION@.m4
43 DISTCLEANFILES = _stdint.h
45 include $(top_srcdir)/common/release.mak
46 include $(top_srcdir)/common/po.mak
50 find -name "*.da" -o -name "*.gcov" | xargs rm || true
53 find -name "*.bbg" -o -name "*.bb" | xargs rm || true
57 ## .PHONY so it always rebuilds it
58 .PHONY: coverage-report.txt
61 BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ; \
63 for F in $$BBG_FILES ; do \
64 F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ; \
65 C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ; \
66 B=`basename $$F .bbg` ; \
68 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ; \
69 DA_libs=`echo $$D/.libs/$$B/.da` ; \
70 if test -e $$DA || test -e $$DA_libs; then \
71 C_FILES="$$C_FILES $$C" ; \
75 $(top_builddir)/testsuite/decode-gcov --report $$C_FILES > coverage-report.txt
77 check-coverage: clean-gcov all check coverage-report.txt
78 cat coverage-report.txt
82 echo "Need to reconfigure with --enable-gcov"
85 echo "Need to reconfigure with --enable-gcov"
90 $(MAKE) -C tests/check check-valgrind
93 $(MAKE) -C tests/check torture
96 $(MAKE) -C tests/check build-checks
99 echo "'check' library not installed, skipping"
102 echo "'check' library not installed, skipping"
105 echo "'check' library not installed, skipping"
108 # FIXME: this target should be run every time we do "make release"
109 # find a way of automating that
111 for f in gstversion.h gstenumtypes.c gstenumtypes.h; do \
112 cp $(top_builddir)/gst/$$f win32/common; done
113 $(top_srcdir)/tools/gst-indent win32/common/gstenumtypes.c
114 $(top_srcdir)/tools/gst-indent win32/common/gstenumtypes.c
115 cp $(top_builddir)/win32/common/config.h-new \
116 $(top_srcdir)/win32/common/config.h
118 check-enum-gettypes: $(top_builddir)/gst/gstenumtypes.h
119 @echo 'Checking if all enum and flag _get_type() funcs are inited in gst_init()'; \
120 FUNCS=`grep '_get_type (' gst/gstenumtypes.h | sed -e 's/^.*gst_/gst_/' -e 's/_get_type.*$$/_get_type/'`;\
122 for f in $$FUNCS; do \
123 INIT_LINE=`grep $$f $(top_srcdir)/gst/*.c | grep g_type_class_ref`; \
124 if test "x$$INIT_LINE" = "x"; then \
125 MISSING_FUNCS="$$MISSING_FUNCS $$f"; \
128 if test "x$$MISSING_FUNCS" != "x"; then \
129 echo "FIXME: please add to the following to gst/gst.c init_post():"; \
130 for f in $$MISSING_FUNCS; do \
131 echo " g_type_class_ref ($$f ());"; \
135 echo 'Checking if all enum and flag _get_type() funcs are deinited in gst_deinit()'; \
137 for f in $$FUNCS; do \
138 INIT_LINE=`grep $$f $(top_srcdir)/gst/*.c | grep g_type_class_unref`; \
139 if test "x$$INIT_LINE" = "x"; then \
140 MISSING_FUNCS="$$MISSING_FUNCS $$f"; \
143 if test "x$$MISSING_FUNCS" != "x"; then \
144 echo "FIXME: please add to the following to gst/gst.c gst_deinit():"; \
145 for f in $$MISSING_FUNCS; do \
146 echo " g_type_class_unref (g_type_class_peek ($$f ()));"; \
151 include $(top_srcdir)/common/coverage/lcov.mak
153 # Do not run the check-exports test in case any option which causes the API to
154 # change has been used
155 if !GST_DISABLE_REGISTRY
156 if !GST_DISABLE_TRACE
157 CHECK_EXPORTS = check-exports
161 check: $(CHECK_EXPORTS) check-enum-gettypes
163 gst-element-check-@GST_API_VERSION@.m4: gst-element-check.m4
164 $(AM_V_GEN)cp $(srcdir)/gst-element-check.m4 gst-element-check-@GST_API_VERSION@.m4
166 # cruft: plugins that have been merged or moved or renamed
169 $(top_builddir)/common/shave \
170 $(top_builddir)/common/shave-libtool \
171 $(top_builddir)/common/m4/codeset.m4 \
172 $(top_builddir)/common/m4/gettext.m4 \
173 $(top_builddir)/common/m4/glibc2.m4 \
174 $(top_builddir)/common/m4/glibc21.m4 \
175 $(top_builddir)/common/m4/iconv.m4 \
176 $(top_builddir)/common/m4/intdiv0.m4 \
177 $(top_builddir)/common/m4/intl.m4 \
178 $(top_builddir)/common/m4/intldir.m4 \
179 $(top_builddir)/common/m4/intlmacosx.m4 \
180 $(top_builddir)/common/m4/intmax.m4 \
181 $(top_builddir)/common/m4/inttypes-pri.m4 \
182 $(top_builddir)/common/m4/inttypes_h.m4 \
183 $(top_builddir)/common/m4/lcmessage.m4 \
184 $(top_builddir)/common/m4/lib-ld.m4 \
185 $(top_builddir)/common/m4/lib-link.m4 \
186 $(top_builddir)/common/m4/lib-prefix.m4 \
187 $(top_builddir)/common/m4/libtool.m4 \
188 $(top_builddir)/common/m4/lock.m4 \
189 $(top_builddir)/common/m4/longlong.m4 \
190 $(top_builddir)/common/m4/ltoptions.m4 \
191 $(top_builddir)/common/m4/ltsugar.m4 \
192 $(top_builddir)/common/m4/ltversion.m4 \
193 $(top_builddir)/common/m4/lt~obsolete.m4 \
194 $(top_builddir)/common/m4/nls.m4 \
195 $(top_builddir)/common/m4/po.m4 \
196 $(top_builddir)/common/m4/printf-posix.m4 \
197 $(top_builddir)/common/m4/progtest.m4 \
198 $(top_builddir)/common/m4/size_max.m4 \
199 $(top_builddir)/common/m4/stdint_h.m4 \
200 $(top_builddir)/common/m4/uintmax_t.m4 \
201 $(top_builddir)/common/m4/visibility.m4 \
202 $(top_builddir)/common/m4/wchar_t.m4 \
203 $(top_builddir)/common/m4/wint_t.m4 \
204 $(top_builddir)/common/m4/xsize.m4
207 $(top_builddir)/tests/examples/xml \
208 $(top_builddir)/tests/examples/launch \
209 $(top_builddir)/tests/examples/metadata \
210 $(top_builddir)/tests/examples/queue \
211 $(top_builddir)/tests/examples/typefind \
212 $(top_builddir)/gst/tmp-introspect* \
213 $(top_builddir)/libs/gst/*/tmp-introspect*
215 include $(top_srcdir)/common/cruft.mak
217 all-local: gst-element-check-@GST_API_VERSION@.m4 check-cruft