value: Properly set value and type for GST_FLAG_SET_MASK_EXACT in GI annotations
[platform/upstream/gstreamer.git] / Makefile.am
1 DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
2
3 # note: keep in sync with configure.ac
4 ACLOCAL_AMFLAGS = -I m4 -I common/m4
5
6 aclocaldir = $(datadir)/aclocal
7 aclocal_DATA = gst-element-check-@GST_API_VERSION@.m4
8
9 SUBDIRS = pkgconfig \
10         gst libs plugins tests \
11         docs \
12         po \
13         m4 \
14         common \
15         data
16
17 if BUILD_TOOLS
18 SUBDIRS += tools
19 endif
20
21 # These are all the possible subdirs
22 DIST_SUBDIRS = pkgconfig \
23         gst libs plugins tools tests \
24         docs \
25         po \
26         m4 \
27         common \
28         data
29
30 # include before EXTRA_DIST for win32 assignment
31 include $(top_srcdir)/common/win32.mak
32
33 EXTRA_DIST = \
34         gst-element-check.m4 \
35         configure.ac autogen.sh depcomp \
36         MAINTAINERS ABOUT-NLS RELEASE gstreamer.doap \
37         scripts/gst-uninstalled \
38         $(shell find "$(top_srcdir)" -type f -name meson.build ! -path "$(top_srcdir)/gstreamer-*" ) \
39         gst/gstenumtypes.c.template gst/gstenumtypes.h.template \
40         meson_options.txt config.h.meson  \
41         gst/parse/gen_lex.py.in gst/parse/gen_grammar.py.in \
42         $(win32)
43
44 CLEANFILES = gst-element-check-@GST_API_VERSION@.m4
45
46 DISTCLEANFILES = _stdint.h
47
48 include $(top_srcdir)/common/release.mak
49 include $(top_srcdir)/common/po.mak
50
51 if GST_GCOV_ENABLED
52 clean-gcov:
53         find -name "*.da" -o -name "*.gcov" | xargs rm || true
54
55 clean-bbg:
56         find -name "*.bbg" -o -name "*.bb" | xargs rm || true
57
58 GCOV_DIRS=gst libs
59
60 ## .PHONY so it always rebuilds it
61 .PHONY: coverage-report.txt
62
63 coverage-report.txt:
64         BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ;                     \
65         C_FILES= ;                                                        \
66         for F in $$BBG_FILES ; do                                         \
67                 F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ;             \
68                 C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ;              \
69                 B=`basename $$F .bbg` ;                                   \
70                 D=`dirname $$F` ;                                         \
71                 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ;                   \
72                 DA_libs=`echo $$D/.libs/$$B/.da` ;                        \
73                 if test -e $$DA || test -e $$DA_libs; then                \
74                         C_FILES="$$C_FILES $$C" ;                         \
75                 fi ;                                                      \
76         done ;                                                            \
77         echo $$C_FILES ;                                                  \
78         $(top_builddir)/testsuite/decode-gcov --report $$C_FILES > coverage-report.txt
79
80 check-coverage: clean-gcov all check coverage-report.txt
81         cat coverage-report.txt
82
83 else
84 coverage-report.txt:
85         echo "Need to reconfigure with --enable-gcov"
86
87 check-coverage:
88         echo "Need to reconfigure with --enable-gcov"
89 endif
90
91 if HAVE_CHECK
92 check-valgrind:
93         $(MAKE) -C tests/check check-valgrind
94
95 check-torture:
96         $(MAKE) -C tests/check torture
97
98 build-checks:
99         $(MAKE) -C tests/check build-checks
100 else
101 check-valgrind:
102         echo "'check' library not installed, skipping"
103
104 check-torture:
105         echo "'check' library not installed, skipping"
106
107 build-checks:
108         echo "'check' library not installed, skipping"
109 endif
110
111 check-enum-gettypes: $(top_builddir)/gst/gstenumtypes.h
112         @echo 'Checking if all enum and flag _get_type() funcs are inited in gst_init()';                        \
113         FUNCS=`grep '_get_type (' gst/gstenumtypes.h | sed -e 's/^.*gst_/gst_/' -e 's/_get_type.*$$/_get_type/'`;\
114         MISSING_FUNCS='';                                                                                        \
115         for f in $$FUNCS; do                                                                                     \
116           INIT_LINE=`grep $$f $(top_srcdir)/gst/*.c | grep g_type_class_ref`;                                    \
117           if test "x$$INIT_LINE" = "x"; then                                                                     \
118             MISSING_FUNCS="$$MISSING_FUNCS $$f";                                                                 \
119           fi;                                                                                                    \
120         done;                                                                                                    \
121         if test "x$$MISSING_FUNCS" != "x"; then                                                                  \
122           echo "FIXME: please add to the following to gst/gst.c init_post():";                                   \
123           for f in $$MISSING_FUNCS; do                                                                           \
124             echo "  g_type_class_ref ($$f ());";                                                                 \
125           done;                                                                                                  \
126           exit 1;                                                                                                \
127         fi;                                                                                                      \
128         echo 'Checking if all enum and flag _get_type() funcs are deinited in gst_deinit()';                     \
129         MISSING_FUNCS='';                                                                                        \
130         for f in $$FUNCS; do                                                                                     \
131           INIT_LINE=`grep $$f $(top_srcdir)/gst/*.c | grep g_type_class_unref`;                                  \
132           if test "x$$INIT_LINE" = "x"; then                                                                     \
133             MISSING_FUNCS="$$MISSING_FUNCS $$f";                                                                 \
134           fi;                                                                                                    \
135         done;                                                                                                    \
136         if test "x$$MISSING_FUNCS" != "x"; then                                                                  \
137           echo "FIXME: please add to the following to gst/gst.c gst_deinit():";                                  \
138           for f in $$MISSING_FUNCS; do                                                                           \
139             echo "  g_type_class_unref (g_type_class_peek ($$f ()));";                                           \
140           done;                                                                                                  \
141           exit 1;                                                                                                \
142         fi
143
144 include $(top_srcdir)/common/coverage/lcov.mak
145
146 # Do not run the check-exports test in case any option which causes the API to
147 # change has been used
148 if !GST_DISABLE_REGISTRY
149 CHECK_EXPORTS = check-exports
150 endif
151
152 check: $(CHECK_EXPORTS) check-enum-gettypes
153
154 gst-element-check-@GST_API_VERSION@.m4: gst-element-check.m4
155         $(AM_V_GEN)cp $(srcdir)/gst-element-check.m4 gst-element-check-@GST_API_VERSION@.m4
156
157 # cruft: plugins that have been merged or moved or renamed
158
159 CRUFT_FILES = \
160         $(top_builddir)/win32/common/config.h-new \
161         $(top_builddir)/common/shave \
162         $(top_builddir)/common/shave-libtool \
163         $(top_builddir)/common/m4/codeset.m4 \
164         $(top_builddir)/common/m4/gettext.m4 \
165         $(top_builddir)/common/m4/glibc2.m4 \
166         $(top_builddir)/common/m4/glibc21.m4 \
167         $(top_builddir)/common/m4/iconv.m4 \
168         $(top_builddir)/common/m4/intdiv0.m4 \
169         $(top_builddir)/common/m4/intl.m4 \
170         $(top_builddir)/common/m4/intldir.m4 \
171         $(top_builddir)/common/m4/intlmacosx.m4 \
172         $(top_builddir)/common/m4/intmax.m4 \
173         $(top_builddir)/common/m4/inttypes-pri.m4 \
174         $(top_builddir)/common/m4/inttypes_h.m4 \
175         $(top_builddir)/common/m4/lcmessage.m4 \
176         $(top_builddir)/common/m4/lib-ld.m4 \
177         $(top_builddir)/common/m4/lib-link.m4 \
178         $(top_builddir)/common/m4/lib-prefix.m4 \
179         $(top_builddir)/common/m4/libtool.m4 \
180         $(top_builddir)/common/m4/lock.m4 \
181         $(top_builddir)/common/m4/longlong.m4 \
182         $(top_builddir)/common/m4/ltoptions.m4 \
183         $(top_builddir)/common/m4/ltsugar.m4 \
184         $(top_builddir)/common/m4/ltversion.m4 \
185         $(top_builddir)/common/m4/lt~obsolete.m4 \
186         $(top_builddir)/common/m4/nls.m4 \
187         $(top_builddir)/common/m4/po.m4 \
188         $(top_builddir)/common/m4/printf-posix.m4 \
189         $(top_builddir)/common/m4/progtest.m4 \
190         $(top_builddir)/common/m4/size_max.m4 \
191         $(top_builddir)/common/m4/stdint_h.m4 \
192         $(top_builddir)/common/m4/uintmax_t.m4 \
193         $(top_builddir)/common/m4/visibility.m4 \
194         $(top_builddir)/common/m4/wchar_t.m4 \
195         $(top_builddir)/common/m4/wint_t.m4 \
196         $(top_builddir)/common/m4/xsize.m4
197
198 CRUFT_DIRS = \
199         $(top_builddir)/tests/examples/xml \
200         $(top_builddir)/tests/examples/launch \
201         $(top_builddir)/tests/examples/metadata \
202         $(top_builddir)/tests/examples/queue \
203         $(top_builddir)/tests/examples/typefind \
204         $(top_builddir)/gst/tmp-introspect* \
205         $(top_builddir)/libs/gst/*/tmp-introspect* \
206         $(top_srcdir)/docs/plugins/tmpl
207
208 include $(top_srcdir)/common/cruft.mak
209
210 all-local: gst-element-check-@GST_API_VERSION@.m4 check-cruft