-SUBDIRS = clutter doc tests
+include $(top_srcdir)/build/autotools/Makefile.am.silent
-pcfiles = clutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.pc
+NULL =
-%-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.pc: %.pc
- cp $< $@
+SUBDIRS = clutter doc po build
-pkgconfig_DATA = $(pcfiles)
-pkgconfigdir = $(libdir)/pkgconfig
+if BUILD_TESTS
+SUBDIRS += tests
+endif
-DEFAULT_FLAVOUR = @CLUTTER_FLAVOUR@
-install-data-hook:
- (cd $(DESTDIR)$(pkgconfigdir) && \
- test -f clutter-$(DEFAULT_FLAVOUR)-@CLUTTER_MAJORMINOR@.pc && \
- rm -f clutter-@CLUTTER_MAJORMINOR@.pc && cp -f clutter-$(DEFAULT_FLAVOUR)-@CLUTTER_MAJORMINOR@.pc clutter-@CLUTTER_MAJORMINOR@.pc)
+if BUILD_EXAMPLES
+SUBDIRS += examples
+endif
-uninstall-local:
- rm -f $(DESTDIR)$(pkgconfigdir)/clutter-@CLUTTER_MAJORMINOR@.pc
+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 = clutter.pc.in HACKING
+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-maintainer-flags
+DISTCLEANFILES =
-# 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
+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 $(@)
+
+.PHONY: gcov test-report full-report perf-report