]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/blob - Makefile.am
check: use private copy of check for libgstcheck
[glsdk/gstreamer0-10.git] / Makefile.am
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 = \
15         gst libs plugins tools tests \
16         docs \
17         pkgconfig po \
18         common
20 # These are all the possible subdirs
21 DIST_SUBDIRS = \
22         gst libs plugins tools tests \
23         docs \
24         pkgconfig 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         gst-element-check.m4.in \
33         configure.ac autogen.sh depcomp \
34         MAINTAINERS ABOUT-NLS RELEASE gstreamer.doap \
35         $(win32)
37 CLEANFILES = gst-element-check-@GST_MAJORMINOR@.m4
39 include $(top_srcdir)/common/release.mak
40 include $(top_srcdir)/common/po.mak
42 if GST_GCOV_ENABLED
43 clean-gcov:
44         find -name "*.da" -o -name "*.gcov" | xargs rm || true
46 clean-bbg:
47         find -name "*.bbg" -o -name "*.bb" | xargs rm || true
49 GCOV_DIRS=gst libs
51 ## .PHONY so it always rebuilds it
52 .PHONY: coverage-report.txt
54 coverage-report.txt:
55         BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ;                     \
56         C_FILES= ;                                                        \
57         for F in $$BBG_FILES ; do                                         \
58                 F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ;             \
59                 C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ;              \
60                 B=`basename $$F .bbg` ;                                   \
61                 D=`dirname $$F` ;                                         \
62                 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ;                   \
63                 DA_libs=`echo $$D/.libs/$$B/.da` ;                        \
64                 if test -e $$DA || test -e $$DA_libs; then                \
65                         C_FILES="$$C_FILES $$C" ;                         \
66                 fi ;                                                      \
67         done ;                                                            \
68         echo $$C_FILES ;                                                  \
69         $(top_builddir)/testsuite/decode-gcov --report $$C_FILES > coverage-report.txt
71 check-coverage: clean-gcov all check coverage-report.txt
72         cat coverage-report.txt
74 else
75 coverage-report.txt:
76         echo "Need to reconfigure with --enable-gcov"
78 check-coverage:
79         echo "Need to reconfigure with --enable-gcov"
80 endif
82 if HAVE_CHECK
83 check-valgrind:
84         cd tests/check && make check-valgrind
86 check-torture:
87         cd tests/check && make torture
88 else
89 check-valgrind:
90         echo "'check' library not installed, skipping"
92 check-torture:
93         echo "'check' library not installed, skipping"
94 endif
96 # FIXME: this target should be run every time we do "make release"
97 # find a way of automating that
98 win32-update:
99         for f in gstversion.h gstenumtypes.c gstenumtypes.h; do \
100                 cp $(top_builddir)/gst/$$f win32/common; done
101         $(top_srcdir)/tools/gst-indent win32/common/gstenumtypes.c
102         cp $(top_builddir)/win32/common/config.h-new \
103                 $(top_srcdir)/win32/common/config.h
105 check-enum-gettypes: $(top_builddir)/gst/gstenumtypes.h
106         echo 'Checking if all enum and flag _get_type() funcs are inited in gst_init()';                         \
107         FUNCS=`grep '_get_type (' gst/gstenumtypes.h | sed -e 's/^.*gst_/gst_/' -e 's/_get_type.*$$/_get_type/'`;\
108         MISSING_FUNCS='';                                                                                        \
109         for f in $$FUNCS; do                                                                                     \
110           INIT_LINE=`grep $$f $(top_srcdir)/gst/*.c | grep g_type_class_ref`;                                    \
111           if test "x$$INIT_LINE" = "x"; then                                                                     \
112             MISSING_FUNCS="$$MISSING_FUNCS $$f";                                                                 \
113           fi;                                                                                                    \
114         done;                                                                                                    \
115         if test "x$$MISSING_FUNCS" != "x"; then                                                                  \
116           echo "FIXME: please add to the following to gst/gst.c init_post():";                                   \
117           for f in $$MISSING_FUNCS; do                                                                           \
118             echo "  g_type_class_ref ($$f ());";                                                                 \
119           done;                                                                                                  \
120           exit 1;                                                                                                \
121         fi;                                                                                                      \
122         echo 'Checking if all enum and flag _get_type() funcs are deinited in gst_deinit()';                     \
123         MISSING_FUNCS='';                                                                                        \
124         for f in $$FUNCS; do                                                                                     \
125           INIT_LINE=`grep $$f $(top_srcdir)/gst/*.c | grep g_type_class_unref`;                                  \
126           if test "x$$INIT_LINE" = "x"; then                                                                     \
127             MISSING_FUNCS="$$MISSING_FUNCS $$f";                                                                 \
128           fi;                                                                                                    \
129         done;                                                                                                    \
130         if test "x$$MISSING_FUNCS" != "x"; then                                                                  \
131           echo "FIXME: please add to the following to gst/gst.c gst_deinit():";                                  \
132           for f in $$MISSING_FUNCS; do                                                                           \
133             echo "  g_type_class_unref (g_type_class_peek ($$f ()));";                                           \
134           done;                                                                                                  \
135           exit 1;                                                                                                \
136         fi
138 include $(top_srcdir)/common/coverage/lcov.mak
140 check: check-exports check-enum-gettypes