dist common properly
[platform/upstream/gstreamer.git] / Makefile.am
1 PACKAGE = @PACKAGE@
2 VERSION = @VERSION@
3
4 if BUILD_DOCS
5 SUBDIRS_DOCS = docs
6 else
7 SUBDIRS_DOCS =
8 endif
9
10 if BUILD_TESTS
11 SUBDIRS_TESTS = tests testsuite
12 else
13 SUBDIRS_TESTS =
14 endif
15
16 if BUILD_EXAMPLES
17 SUBDIRS_EXAMPLES = examples
18 else
19 SUBDIRS_EXAMPLES =
20 endif
21
22 all-local: gst-element-check-@GST_MAJORMINOR@.m4
23
24 gst-element-check-@GST_MAJORMINOR@.m4: gst-element-check.m4
25         cp $(srcdir)/gst-element-check.m4 gst-element-check-@GST_MAJORMINOR@.m4
26
27 ACLOCAL_AMFLAGS = -I common/m4
28
29 aclocaldir = $(datadir)/aclocal
30 aclocal_DATA = gst-element-check-@GST_MAJORMINOR@.m4
31
32 SUBDIRS = include gst libs tools \
33         $(SUBDIRS_TESTS) $(SUBDIRS_EXAMPLES) \
34         pkgconfig po \
35         common \
36         $(SUBDIRS_DOCS)
37
38 # These are all the possible subdirs
39 DIST_SUBDIRS = include libs gst \
40         tools \
41         tests testsuite \
42         examples \
43         pkgconfig \
44         po \
45         common \
46         docs
47
48 EXTRA_DIST = gstreamer.spec gstreamer.spec.in gst-element-check.m4 \
49              configure.ac autogen.sh depcomp \
50              REQUIREMENTS ABOUT-NLS DOCBUILDING DEVEL RELEASE \
51              idiottest.mak
52
53 CLEANFILES = gst-element-check-@GST_MAJORMINOR@.m4
54
55 include $(top_srcdir)/idiottest.mak
56 include $(top_srcdir)/common/release.mak
57
58
59 if GST_GCOV_ENABLED
60 clean-gcov:
61         find -name "*.da" -o -name "*.gcov" | xargs rm || true
62
63 clean-bbg:
64         find -name "*.bbg" -o -name "*.bb" | xargs rm || true
65
66 GCOV_DIRS=gst libs
67
68 ## .PHONY so it always rebuilds it
69 .PHONY: coverage-report.txt
70
71 coverage-report.txt:
72         BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ;                     \
73         C_FILES= ;                                                        \
74         for F in $$BBG_FILES ; do                                         \
75                 F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ;             \
76                 C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ;              \
77                 B=`basename $$F .bbg` ;                                   \
78                 D=`dirname $$F` ;                                         \
79                 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ;                   \
80                 DA_libs=`echo $$D/.libs/$$B/.da` ;                        \
81                 if test -e $$DA || test -e $$DA_libs; then                \
82                         C_FILES="$$C_FILES $$C" ;                         \
83                 fi ;                                                      \
84         done ;                                                            \
85         echo $$C_FILES ;                                                  \
86         $(top_builddir)/testsuite/decode-gcov --report $$C_FILES > coverage-report.txt
87
88 check-coverage: clean-gcov all check coverage-report.txt
89         cat coverage-report.txt
90
91 else
92 coverage-report.txt:
93         echo "Need to reconfigure with --enable-gcov"
94
95 check-coverage:
96         echo "Need to reconfigure with --enable-gcov"
97
98 endif
99