1include $(top_srcdir)/build-aux/autotools/Makefile.am.silent
2
3NULL =
4
5SUBDIRS = build-aux clutter tests doc po
6
7if BUILD_EXAMPLES
8SUBDIRS += examples
9endif
10
11DIST_SUBDIRS = clutter tests examples doc po build-aux
12
13# XXX - this is a massive hack to make autoreconf honour the ACLOCAL_FLAGS
14# that jhbuild sets while still retaining build/autotools as the authoritative
15# source for m4 macros
16ACLOCAL_AMFLAGS = -I build-aux/autotools ${ACLOCAL_FLAGS}
17
18EXTRA_DIST = \
19	ChangeLog.pre-git-import	\
20	CONTRIBUTING.md			\
21	COPYING				\
22	README.md			\
23	NEWS				\
24	$(NULL)
25
26# Add the Meson build files to the Autotools dist
27meson_files = \
28	meson.build \
29	meson_options.txt \
30	clutter/meson.build \
31	clutter/cex100/meson.build \
32	doc/meson.build \
33	doc/cookbook/meson.build \
34	doc/reference/meson.build \
35	doc/reference/xml/gtkdocentities.ent.in \
36	doc/reference/xml/meson.build \
37	examples/meson.build \
38	po/meson.build \
39	tests/meson.build \
40	tests/interactive/meson.build \
41	tests/micro-bench/meson.build \
42	tests/conform/meson.build \
43	tests/conform/test.data.in \
44	tests/accessibility/meson.build \
45	tests/performance/meson.build \
46	$()
47
48EXTRA_DIST += $(meson_files)
49
50CLEANFILES = $(pcfiles)
51
52DISTCLEANFILES =
53
54DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-maintainer-flags --enable-docs
55
56# .release requires .changelog rules
57include $(top_srcdir)/build-aux/autotools/Makefile.am.changelog
58include $(top_srcdir)/build-aux/autotools/Makefile.am.release
59
60# proxy rules for tests
61test-report full-report:
62	$(MAKE) -C tests/conform $(@)
63
64perf-report:
65	$(MAKE) -C tests/performance $(@)
66
67if ENABLE_GCOV
68# use recursive makes in order to ignore errors during check/perf
69lcov:
70	-$(MAKE) $(AM_MAKEFLAGS) -C clutter check
71	-$(MAKE) $(AM_MAKEFLAGS) -C tests/conform test
72	$(MAKE) $(AM_MAKEFLAGS) genlcov
73
74# we have to massage the lcov.info file slightly to hide the effect of libtool
75# placing the objects files in the .libs/ directory separate from the *.c
76genlcov:
77	$(LTP) --directory $(top_builddir) --capture --output-file clutter-lcov.info --test-name CLUTTER_TEST --no-checksum
78	$(SED) -e 's#.libs/##' < clutter-lcov.info > clutter-lcov.info.tmp
79	LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory clutter-lcov --title "Clutter Code Coverage" --show-details clutter-lcov.info.tmp
80	rm -f clutter-lcov.info.tmp
81
82lcov-clean:
83	-$(LTP) --directory $(top_builddir) -z
84	-$(RM) -rf clutter-lcov.info clutter-lcov
85else
86lcov genlcov lcov-clean:
87	@echo You need to configure Clutter with support for gcov enabled.
88	@echo e.g., ./configure --enable-gcov
89endif
90
91.PHONY: test-report full-report perf-report lcov genlcov lcov-clean
92