-SUBDIRS=clutter doc examples tests
+include $(top_srcdir)/build/autotools/Makefile.am.silent
-pcfiles = clutter@CLUTTER_REAL@-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.pc
+NULL =
-%@CLUTTER_REAL@-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.pc: %.pc
- cp $< $@
+SUBDIRS = clutter doc po build
-pkgconfig_DATA = $(pcfiles)
-pkgconfigdir = $(libdir)/pkgconfig
+if BUILD_TESTS
+SUBDIRS += tests
+endif
-EXTRA_DIST = clutter.pc.in
+if BUILD_EXAMPLES
+SUBDIRS += examples
+endif
+
+DIST_SUBDIRS = clutter tests examples doc po build
+
+# 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/autotools ${ACLOCAL_FLAGS}
+
+EXTRA_DIST = \
+ ChangeLog.pre-git-import \
+ README.in \
+ README \
+ config.h.win32 \
+ config.h.win32.in \
+ $(NULL)
CLEANFILES = $(pcfiles)
-DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-python --enable-gtk
+DISTCLEANFILES =
+
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-maintainer-flags --enable-docs
+
+# .release requires .changelog rules
+include $(top_srcdir)/build/autotools/Makefile.am.changelog
+include $(top_srcdir)/build/autotools/Makefile.am.release
+
+# proxy rule for gcov
+gcov:
+ @( cd clutter && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $$?
+
+# proxy rules for tests
+test-report full-report:
+ $(MAKE) -C tests/conform $(@)
+
+perf-report:
+ $(MAKE) -C tests/performance $(@)
-# Extra clean files so that maintainer-clean removes *everything*
-MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.sub \
- configure depcomp install-sh ltmain.sh \
- Makefile.in missing config.h.in
+.PHONY: gcov test-report full-report perf-report