adding back RELEASE clean up disting of built files
[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         $(SUBDIRS_DOCS)
36
37 # These are all the possible subdirs
38 DIST_SUBDIRS = include libs gst \
39         tools \
40         tests testsuite \
41         examples \
42         pkgconfig \
43         po \
44         docs
45
46 EXTRA_DIST = gstreamer.spec.in gst-element-check.m4 \
47              configure.ac autogen.sh depcomp \
48              REQUIREMENTS ABOUT-NLS DOCBUILDING DEVEL RELEASE \
49              idiottest.mak common
50
51 CLEANFILES = gst-element-check-@GST_MAJORMINOR@.m4
52
53
54 # to do a release, run "make release"
55 # this will generate all archives and md5sums
56
57 # make bz2 as well
58 AUTOMAKE_OPTIONS = dist-bzip2
59
60 release: dist
61         make @PACKAGE@-@VERSION@.tar.gz.md5
62         make @PACKAGE@-@VERSION@.tar.bz2.md5
63
64 # generate md5 sum files
65 %.md5: %
66         md5sum $< > $@
67
68 dist-hook:
69         cp gstreamer.spec $(distdir)
70         rm -rf `find $(distdir)/common -name CVS`
71
72 rpm: dist
73         rpm -ta $(distdir).tar.gz
74
75 include $(top_srcdir)/idiottest.mak
76
77
78 if GST_GCOV_ENABLED
79 clean-gcov:
80         find -name "*.da" -o -name "*.gcov" | xargs rm || true
81
82 clean-bbg:
83         find -name "*.bbg" -o -name "*.bb" | xargs rm || true
84
85 GCOV_DIRS=gst libs
86
87 ## .PHONY so it always rebuilds it
88 .PHONY: coverage-report.txt
89
90 coverage-report.txt:
91         BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ;                     \
92         C_FILES= ;                                                        \
93         for F in $$BBG_FILES ; do                                         \
94                 F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ;             \
95                 C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ;              \
96                 B=`basename $$F .bbg` ;                                   \
97                 D=`dirname $$F` ;                                         \
98                 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ;                   \
99                 DA_libs=`echo $$D/.libs/$$B/.da` ;                        \
100                 if test -e $$DA || test -e $$DA_libs; then                \
101                         C_FILES="$$C_FILES $$C" ;                         \
102                 fi ;                                                      \
103         done ;                                                            \
104         echo $$C_FILES ;                                                  \
105         $(top_builddir)/testsuite/decode-gcov --report $$C_FILES > coverage-report.txt
106
107 check-coverage: clean-gcov all check coverage-report.txt
108         cat coverage-report.txt
109
110 else
111 coverage-report.txt:
112         echo "Need to reconfigure with --enable-gcov"
113
114 check-coverage:
115         echo "Need to reconfigure with --enable-gcov"
116
117 endif