NULL =
-SUBDIRS = clutter tests doc po build
+SUBDIRS = clutter doc po build
+
+if BUILD_TESTS
+SUBDIRS += tests
+endif
+
+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