gst/gstpad.c: Really unlink the peer pad instead of setting the peer pointer to NULL...
[platform/upstream/gstreamer.git] / Makefile.am
1 DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-docbook
2
3 all-local: gst-element-check-@GST_MAJORMINOR@.m4
4
5 gst-element-check-@GST_MAJORMINOR@.m4: gst-element-check.m4
6         cp gst-element-check.m4 gst-element-check-@GST_MAJORMINOR@.m4
7
8 ACLOCAL_AMFLAGS = -I common/m4
9
10 aclocaldir = $(datadir)/aclocal
11 aclocal_DATA = gst-element-check-@GST_MAJORMINOR@.m4
12
13 SUBDIRS = \
14         gst libs plugins tools tests \
15         docs \
16         pkgconfig po \
17         common
18
19 # These are all the possible subdirs
20 DIST_SUBDIRS = \
21         gst libs plugins tools tests \
22         docs \
23         pkgconfig po \
24         common
25
26 # include before EXTRA_DIST for win32 assignment
27 include $(top_srcdir)/common/win32.mak
28
29 EXTRA_DIST = \
30         gstreamer.spec gstreamer.spec.in \
31         gst-element-check.m4.in \
32         configure.ac autogen.sh depcomp \
33         MAINTAINERS ABOUT-NLS RELEASE gstreamer.doap \
34         $(win32)
35
36 CLEANFILES = gst-element-check-@GST_MAJORMINOR@.m4
37
38 include $(top_srcdir)/common/release.mak
39 include $(top_srcdir)/common/po.mak
40
41 if GST_GCOV_ENABLED
42 clean-gcov:
43         find -name "*.da" -o -name "*.gcov" | xargs rm || true
44
45 clean-bbg:
46         find -name "*.bbg" -o -name "*.bb" | xargs rm || true
47
48 GCOV_DIRS=gst libs
49
50 ## .PHONY so it always rebuilds it
51 .PHONY: coverage-report.txt test-coverage-report.html lcov
52
53 coverage-report.txt:
54         BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ;                     \
55         C_FILES= ;                                                        \
56         for F in $$BBG_FILES ; do                                         \
57                 F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ;             \
58                 C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ;              \
59                 B=`basename $$F .bbg` ;                                   \
60                 D=`dirname $$F` ;                                         \
61                 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ;                   \
62                 DA_libs=`echo $$D/.libs/$$B/.da` ;                        \
63                 if test -e $$DA || test -e $$DA_libs; then                \
64                         C_FILES="$$C_FILES $$C" ;                         \
65                 fi ;                                                      \
66         done ;                                                            \
67         echo $$C_FILES ;                                                  \
68         $(top_builddir)/testsuite/decode-gcov --report $$C_FILES > coverage-report.txt
69
70 test-coverage-report.html:
71         mkdir -p ./coverage
72         lcov --directory . --zerocounters
73         -$(MAKE) check
74         lcov --directory . --capture --output-file ./coverage/$(PACKAGE).info
75         genhtml -o ./coverage --num-spaces 2 ./coverage/$(PACKAGE).info
76         
77 check-coverage: clean-gcov all check coverage-report.txt
78         cat coverage-report.txt
79
80 else
81 coverage-report.txt:
82         echo "Need to reconfigure with --enable-gcov"
83         
84 test-coverage-report.html:
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         cd tests/check && make check-valgrind
94
95 check-torture:
96         cd tests/check && make torture
97 else
98 check-valgrind:
99         echo "'check' library not installed, skipping"
100
101 check-torture:
102         echo "'check' library not installed, skipping"
103 endif
104
105 # FIXME: this target should be run every time we do "make release"
106 # find a way of automating that
107 win32-update:
108         for f in gstversion.h gstenumtypes.c gstenumtypes.h; do \
109                 cp $(top_builddir)/gst/$$f win32/common; done
110         $(top_srcdir)/tools/gst-indent win32/common/gstenumtypes.c
111
112 include $(top_srcdir)/common/coverage/lcov.mak
113
114 check: check-exports
115