whitespace moving
[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 $(srcdir)/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 win32 = $(shell cat $(top_srcdir)/win32/MANIFEST)
27
28 debug:
29         echo $(win32)
30
31 EXTRA_DIST = \
32         gstreamer.spec gstreamer.spec.in gst-element-check.m4 \
33         configure.ac autogen.sh depcomp \
34         ABOUT-NLS RELEASE \
35         $(win32)
36
37 CLEANFILES = gst-element-check-@GST_MAJORMINOR@.m4
38
39 include $(top_srcdir)/common/release.mak
40 include $(top_srcdir)/common/po.mak
41
42 if GST_GCOV_ENABLED
43 clean-gcov:
44         find -name "*.da" -o -name "*.gcov" | xargs rm || true
45
46 clean-bbg:
47         find -name "*.bbg" -o -name "*.bb" | xargs rm || true
48
49 GCOV_DIRS=gst libs
50
51 ## .PHONY so it always rebuilds it
52 .PHONY: coverage-report.txt test-coverage-report.html
53
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
70
71 test-coverage-report.html:
72         mkdir -p ./coverage
73         lcov --directory . --zerocounters
74         -$(MAKE) check
75         lcov --directory . --capture --output-file ./coverage/$(PACKAGE).info
76         genhtml -o ./coverage --num-spaces 2 ./coverage/$(PACKAGE).info
77         
78 check-coverage: clean-gcov all check coverage-report.txt
79         cat coverage-report.txt
80
81 else
82 coverage-report.txt:
83         echo "Need to reconfigure with --enable-gcov"
84         
85 test-coverage-report.html:
86         echo "Need to reconfigure with --enable-gcov"
87
88 check-coverage:
89         echo "Need to reconfigure with --enable-gcov"
90 endif
91
92 if HAVE_CHECK
93 check-valgrind:
94         cd tests/check && make check-valgrind
95
96 check-torture:
97         cd tests/check && make torture
98 else
99 check-valgrind:
100         echo "'check' library not installed, skipping"
101
102 check-torture:
103         echo "'check' library not installed, skipping"
104 endif
105
106 win32-update:
107         for f in gstversion.h gstenumtypes.c gstenumtypes.h; do \
108                 cp $(top_builddir)/gst/$$f win32/common; done