blob: 3d0ae1a311f62918a6f4b79be0e5b85156c3283a [file] [log] [blame]
Thomas Vander Stichele10aaff02005-09-03 14:20:10 +00001DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-docbook
Erik Walthinsen9ca82482001-01-14 21:55:41 +00002
Ronald S. Bultjed2499c32003-04-07 21:28:57 +00003all-local: gst-element-check-@GST_MAJORMINOR@.m4
4
5gst-element-check-@GST_MAJORMINOR@.m4: gst-element-check.m4
6 cp $(srcdir)/gst-element-check.m4 gst-element-check-@GST_MAJORMINOR@.m4
7
David Schleef9bdd0822003-12-02 04:53:52 +00008ACLOCAL_AMFLAGS = -I common/m4
9
Ronald S. Bultjed2499c32003-04-07 21:28:57 +000010aclocaldir = $(datadir)/aclocal
11aclocal_DATA = gst-element-check-@GST_MAJORMINOR@.m4
12
Thomas Vander Stichele756dc092004-08-13 14:03:05 +000013SUBDIRS = \
Thomas Vander Stichelec9364872005-11-30 16:39:04 +000014 gst libs plugins tools tests \
Thomas Vander Stichele50a2f3f2005-09-03 13:49:49 +000015 docs \
Thomas Vander Stichele0c5153f2003-11-15 11:58:49 +000016 pkgconfig po \
Thomas Vander Stichele50a2f3f2005-09-03 13:49:49 +000017 common
Richard Boulton56375702001-01-01 13:41:27 +000018
Richard Boulton9ae673e2000-08-18 23:31:30 +000019# These are all the possible subdirs
Thomas Vander Stichele756dc092004-08-13 14:03:05 +000020DIST_SUBDIRS = \
Thomas Vander Stichelec9364872005-11-30 16:39:04 +000021 gst libs plugins tools tests \
Thomas Vander Stichele50a2f3f2005-09-03 13:49:49 +000022 docs \
Thomas Vander Stichelee1d580a2005-10-08 11:10:17 +000023 pkgconfig po \
Thomas Vander Stichele50a2f3f2005-09-03 13:49:49 +000024 common
Erik Walthinsen2da16ed2001-01-01 08:37:41 +000025
Thomas Vander Stichele756dc092004-08-13 14:03:05 +000026win32 = $(shell cat $(top_srcdir)/win32/MANIFEST)
27
28debug:
29 echo $(win32)
Thomas Vander Stichele0442db02006-05-03 16:40:57 +000030
Thomas Vander Stichele756dc092004-08-13 14:03:05 +000031EXTRA_DIST = \
Tim-Philipp Müller1a449fc2006-07-07 09:09:10 +000032 gstreamer.spec gstreamer.spec.in \
33 gst-element-check.m4 gst-element-check.m4.in \
Thomas Vander Stichele756dc092004-08-13 14:03:05 +000034 configure.ac autogen.sh depcomp \
Thomas Vander Sticheleed893fd2005-11-30 08:52:41 +000035 ABOUT-NLS RELEASE \
Thomas Vander Stichelee1d580a2005-10-08 11:10:17 +000036 $(win32)
David Schleefd4ee10b2003-10-09 01:13:21 +000037
38CLEANFILES = gst-element-check-@GST_MAJORMINOR@.m4
Erik Walthinsen00327272000-01-31 09:43:08 +000039
Thomas Vander Stichelec7c3a5a2004-03-18 12:14:43 +000040include $(top_srcdir)/common/release.mak
Thomas Vander Stichelefa903782004-05-03 13:45:22 +000041include $(top_srcdir)/common/po.mak
Richard Boulton378c15b2001-05-30 14:39:06 +000042
David Schleef67062b72004-01-09 01:42:11 +000043if GST_GCOV_ENABLED
44clean-gcov:
45 find -name "*.da" -o -name "*.gcov" | xargs rm || true
46
47clean-bbg:
48 find -name "*.bbg" -o -name "*.bb" | xargs rm || true
49
50GCOV_DIRS=gst libs
51
52## .PHONY so it always rebuilds it
Stefan Kost8c7cf902005-06-03 18:26:59 +000053.PHONY: coverage-report.txt test-coverage-report.html
Thomas Vander Stichele3a7384e2004-02-12 19:21:12 +000054
David Schleef67062b72004-01-09 01:42:11 +000055coverage-report.txt:
Thomas Vander Sticheleac6e27f2004-02-12 19:10:23 +000056 BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ; \
57 C_FILES= ; \
58 for F in $$BBG_FILES ; do \
59 F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ; \
60 C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ; \
61 B=`basename $$F .bbg` ; \
62 D=`dirname $$F` ; \
63 DA=`echo $$F | sed -e 's/.bbg/.da/g'` ; \
64 DA_libs=`echo $$D/.libs/$$B/.da` ; \
65 if test -e $$DA || test -e $$DA_libs; then \
66 C_FILES="$$C_FILES $$C" ; \
67 fi ; \
68 done ; \
69 echo $$C_FILES ; \
David Schleef67062b72004-01-09 01:42:11 +000070 $(top_builddir)/testsuite/decode-gcov --report $$C_FILES > coverage-report.txt
71
Stefan Kost8c7cf902005-06-03 18:26:59 +000072test-coverage-report.html:
73 mkdir -p ./coverage
74 lcov --directory . --zerocounters
Stefan Koste066e8b2005-07-05 12:17:24 +000075 -$(MAKE) check
Stefan Kost8c7cf902005-06-03 18:26:59 +000076 lcov --directory . --capture --output-file ./coverage/$(PACKAGE).info
77 genhtml -o ./coverage --num-spaces 2 ./coverage/$(PACKAGE).info
78
David Schleef67062b72004-01-09 01:42:11 +000079check-coverage: clean-gcov all check coverage-report.txt
80 cat coverage-report.txt
81
82else
83coverage-report.txt:
84 echo "Need to reconfigure with --enable-gcov"
Stefan Kost8c7cf902005-06-03 18:26:59 +000085
86test-coverage-report.html:
87 echo "Need to reconfigure with --enable-gcov"
David Schleef67062b72004-01-09 01:42:11 +000088
89check-coverage:
90 echo "Need to reconfigure with --enable-gcov"
David Schleef67062b72004-01-09 01:42:11 +000091endif
Thomas Vander Sticheled5e378b2005-09-17 18:11:27 +000092
Thomas Vander Sticheleeaf17082005-11-28 19:58:56 +000093if HAVE_CHECK
Thomas Vander Sticheled5e378b2005-09-17 18:11:27 +000094check-valgrind:
Thomas Vander Stichele7533cf82005-11-30 16:08:31 +000095 cd tests/check && make check-valgrind
Thomas Vander Stichele8817d3e2005-10-12 20:23:42 +000096
Thomas Vander Stichelecdb01022005-11-23 21:24:46 +000097check-torture:
Thomas Vander Stichele7533cf82005-11-30 16:08:31 +000098 cd tests/check && make torture
Thomas Vander Sticheleeaf17082005-11-28 19:58:56 +000099else
100check-valgrind:
Thomas Vander Stichele038035d2005-11-30 10:50:57 +0000101 echo "'check' library not installed, skipping"
Thomas Vander Sticheleeaf17082005-11-28 19:58:56 +0000102
103check-torture:
Thomas Vander Stichele038035d2005-11-30 10:50:57 +0000104 echo "'check' library not installed, skipping"
Thomas Vander Sticheleeaf17082005-11-28 19:58:56 +0000105endif
Thomas Vander Stichelecdb01022005-11-23 21:24:46 +0000106
Thomas Vander Stichele34eabc42006-05-12 14:53:49 +0000107# FIXME: this target should be run every time we do "make release"
108# find a way of automating that
Thomas Vander Stichele8817d3e2005-10-12 20:23:42 +0000109win32-update:
110 for f in gstversion.h gstenumtypes.c gstenumtypes.h; do \
111 cp $(top_builddir)/gst/$$f win32/common; done
Thomas Vander Stichele34eabc42006-05-12 14:53:49 +0000112 $(top_srcdir)/tools/gst-indent win32/common/gstenumtypes.c
Thomas Vander Stichele2c976b12006-07-02 21:54:43 +0000113
114include $(top_srcdir)/common/coverage/lcov.mak