summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: c4d56d87e590775fb75c682acfbaadedca6816ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
include $(top_srcdir)/build-aux/autotools/Makefile.am.silent

NULL =

SUBDIRS = build-aux clutter tests doc po

if BUILD_EXAMPLES
SUBDIRS += examples
endif

DIST_SUBDIRS = clutter tests examples doc po build-aux

# XXX - this is a massive hack to make autoreconf honour the ACLOCAL_FLAGS
# that jhbuild sets while still retaining build/autotools as the authoritative
# source for m4 macros
ACLOCAL_AMFLAGS = -I build-aux/autotools ${ACLOCAL_FLAGS}

EXTRA_DIST = \
	ChangeLog.pre-git-import	\
	CONTRIBUTING.md			\
	COPYING				\
	README.md			\
	NEWS				\
	$(NULL)

# Add the Meson build files to the Autotools dist
meson_files = \
	meson.build \
	meson_options.txt \
	clutter/meson.build \
	clutter/cex100/meson.build \
	doc/meson.build \
	doc/cookbook/meson.build \
	doc/reference/meson.build \
	doc/reference/xml/gtkdocentities.ent.in \
	doc/reference/xml/meson.build \
	examples/meson.build \
	po/meson.build \
	tests/meson.build \
	tests/interactive/meson.build \
	tests/micro-bench/meson.build \
	tests/conform/meson.build \
	tests/conform/test.data.in \
	tests/accessibility/meson.build \
	tests/performance/meson.build \
	$()

EXTRA_DIST += $(meson_files)

CLEANFILES = $(pcfiles)

DISTCLEANFILES =

DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-maintainer-flags --enable-docs

# .release requires .changelog rules
include $(top_srcdir)/build-aux/autotools/Makefile.am.changelog
include $(top_srcdir)/build-aux/autotools/Makefile.am.release

# proxy rules for tests
test-report full-report:
	$(MAKE) -C tests/conform $(@)

perf-report:
	$(MAKE) -C tests/performance $(@)

if ENABLE_GCOV
# use recursive makes in order to ignore errors during check/perf
lcov:
	-$(MAKE) $(AM_MAKEFLAGS) -C clutter check
	-$(MAKE) $(AM_MAKEFLAGS) -C tests/conform test
	$(MAKE) $(AM_MAKEFLAGS) genlcov

# we have to massage the lcov.info file slightly to hide the effect of libtool
# placing the objects files in the .libs/ directory separate from the *.c
genlcov:
	$(LTP) --directory $(top_builddir) --capture --output-file clutter-lcov.info --test-name CLUTTER_TEST --no-checksum
	$(SED) -e 's#.libs/##' < clutter-lcov.info > clutter-lcov.info.tmp
	LANG=C $(LTP_GENHTML) --prefix $(top_builddir) --output-directory clutter-lcov --title "Clutter Code Coverage" --show-details clutter-lcov.info.tmp
	rm -f clutter-lcov.info.tmp

lcov-clean:
	-$(LTP) --directory $(top_builddir) -z
	-$(RM) -rf clutter-lcov.info clutter-lcov
else
lcov genlcov lcov-clean:
	@echo You need to configure Clutter with support for gcov enabled.
	@echo e.g., ./configure --enable-gcov
endif

.PHONY: test-report full-report perf-report lcov genlcov lcov-clean