]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/blob - Makefile.am
configure: back to development
[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 = 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         scripts/gst-uninstalled \
37         $(win32)
39 CLEANFILES = gst-element-check-@GST_MAJORMINOR@.m4
41 DISTCLEANFILES = _stdint.h
43 include $(top_srcdir)/common/release.mak
44 include $(top_srcdir)/common/po.mak
46 if GST_GCOV_ENABLED
47 clean-gcov:
48         find -name "*.da" -o -name "*.gcov" | xargs rm || true
50 clean-bbg:
51         find -name "*.bbg" -o -name "*.bb" | xargs rm || true
53 GCOV_DIRS=gst libs
55 ## .PHONY so it always rebuilds it
56 .PHONY: coverage-report.txt
58 coverage-report.txt:
59         BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ;                     \
60         C_FILES= ;                                                        \
61         for F in $$BBG_FILES ; do                                         \
62                 F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ;             \
63                 C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ;              \
64                 B=`basename $$F .bbg` ;                                   \
65                 D=`dirname $$F` ;                                         \
66                 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ;                   \
67                 DA_libs=`echo $$D/.libs/$$B/.da` ;                        \
68                 if test -e $$DA || test -e $$DA_libs; then                \
69                         C_FILES="$$C_FILES $$C" ;                         \
70                 fi ;                                                      \
71         done ;                                                            \
72         echo $$C_FILES ;                                                  \
73         $(top_builddir)/testsuite/decode-gcov --report $$C_FILES > coverage-report.txt
75 check-coverage: clean-gcov all check coverage-report.txt
76         cat coverage-report.txt
78 else
79 coverage-report.txt:
80         echo "Need to reconfigure with --enable-gcov"
82 check-coverage:
83         echo "Need to reconfigure with --enable-gcov"
84 endif
86 if HAVE_CHECK
87 check-valgrind:
88         cd tests/check && make check-valgrind
90 check-torture:
91         cd tests/check && make torture
92 else
93 check-valgrind:
94         echo "'check' library not installed, skipping"
96 check-torture:
97         echo "'check' library not installed, skipping"
98 endif
100 # FIXME: this target should be run every time we do "make release"
101 # find a way of automating that
102 win32-update:
103         for f in gstversion.h gstenumtypes.c gstenumtypes.h; do \
104                 cp $(top_builddir)/gst/$$f win32/common; done
105         $(top_srcdir)/tools/gst-indent win32/common/gstenumtypes.c
106         cp $(top_builddir)/win32/common/config.h-new \
107                 $(top_srcdir)/win32/common/config.h
109 check-enum-gettypes: $(top_builddir)/gst/gstenumtypes.h
110         echo 'Checking if all enum and flag _get_type() funcs are inited in gst_init()';                         \
111         FUNCS=`grep '_get_type (' gst/gstenumtypes.h | sed -e 's/^.*gst_/gst_/' -e 's/_get_type.*$$/_get_type/'`;\
112         MISSING_FUNCS='';                                                                                        \
113         for f in $$FUNCS; do                                                                                     \
114           INIT_LINE=`grep $$f $(top_srcdir)/gst/*.c | grep g_type_class_ref`;                                    \
115           if test "x$$INIT_LINE" = "x"; then                                                                     \
116             MISSING_FUNCS="$$MISSING_FUNCS $$f";                                                                 \
117           fi;                                                                                                    \
118         done;                                                                                                    \
119         if test "x$$MISSING_FUNCS" != "x"; then                                                                  \
120           echo "FIXME: please add to the following to gst/gst.c init_post():";                                   \
121           for f in $$MISSING_FUNCS; do                                                                           \
122             echo "  g_type_class_ref ($$f ());";                                                                 \
123           done;                                                                                                  \
124           exit 1;                                                                                                \
125         fi;                                                                                                      \
126         echo 'Checking if all enum and flag _get_type() funcs are deinited in gst_deinit()';                     \
127         MISSING_FUNCS='';                                                                                        \
128         for f in $$FUNCS; do                                                                                     \
129           INIT_LINE=`grep $$f $(top_srcdir)/gst/*.c | grep g_type_class_unref`;                                  \
130           if test "x$$INIT_LINE" = "x"; then                                                                     \
131             MISSING_FUNCS="$$MISSING_FUNCS $$f";                                                                 \
132           fi;                                                                                                    \
133         done;                                                                                                    \
134         if test "x$$MISSING_FUNCS" != "x"; then                                                                  \
135           echo "FIXME: please add to the following to gst/gst.c gst_deinit():";                                  \
136           for f in $$MISSING_FUNCS; do                                                                           \
137             echo "  g_type_class_unref (g_type_class_peek ($$f ()));";                                           \
138           done;                                                                                                  \
139           exit 1;                                                                                                \
140         fi
142 include $(top_srcdir)/common/coverage/lcov.mak
144 # Do not run the check-exports test in case any option which causes the API to
145 # change has been used
146 if !GST_DISABLE_GST_DEBUG
147 if !GST_DISABLE_LOADSAVE
148 if !GST_DISABLE_REGISTRY
149 if !GST_DISABLE_TRACE
150 CHECK_EXPORTS = check-exports
151 endif
152 endif
153 endif
154 endif
156 check: $(CHECK_EXPORTS) check-enum-gettypes