[tracker] tests: Updated gtester scripts to improve testing system



commit 73c0decdcebde53773f5607e64c3a6243854a6c5
Author: Martyn Russell <martyn lanedo com>
Date:   Tue Feb 11 19:56:45 2014 +0000

    tests: Updated gtester scripts to improve testing system
    
    We imported Makefile.decl from glib when it was using Subversion, a long time
    ago. The script had a few issues (like running all unit tests twice on make
    distcheck) and needed to be updated.
    
    I've stolen a latest version from GLib's glib.mk and also their m4 macros
    which are required to make this all work too.
    
    This gives us the advantage of defining installable and uninstallable test
    cases as well as test data, scripts and other useful stuff.
    
    The debug output also looks quite good.
    And distcheck passes :)

 Makefile.am                                        |    4 +-
 Makefile.decl                                      |  224 ++++++++++++++------
 acinclude.m4                                       |   33 +++
 configure.ac                                       |    1 +
 data/Makefile.am                                   |    2 -
 data/dbus/Makefile.am                              |    2 -
 data/gschemas/Makefile.am                          |    2 -
 data/icons/16x16/Makefile.am                       |    2 -
 data/icons/22x22/Makefile.am                       |    2 -
 data/icons/24x24/Makefile.am                       |    2 -
 data/icons/32x32/Makefile.am                       |    2 -
 data/icons/48x48/Makefile.am                       |    2 -
 data/icons/Makefile.am                             |    2 -
 data/icons/scalable/Makefile.am                    |    2 -
 data/languages/Makefile.am                         |    2 -
 data/miners/Makefile.am                            |    2 -
 data/ontologies/Makefile.am                        |    2 -
 docs/Makefile.am                                   |    2 -
 docs/design/Makefile.am                            |    3 -
 docs/manpages/Makefile.am                          |    2 -
 docs/reference/Makefile.am                         |    2 -
 docs/reference/libtracker-control/Makefile.am      |    2 -
 docs/reference/libtracker-miner/Makefile.am        |    2 -
 docs/reference/libtracker-sparql/Makefile.am       |    2 -
 docs/reference/ontology/Makefile.am                |    2 -
 docs/tools/Makefile.am                             |    2 -
 examples/Makefile.am                               |    2 -
 examples/libtracker-extract/Makefile.am            |    2 -
 examples/libtracker-miner/Makefile.am              |    2 -
 examples/libtracker-sparql/Makefile.am             |    2 -
 examples/rss-reader/Makefile.am                    |    2 -
 src/Makefile.am                                    |    2 -
 src/gvdb/Makefile.am                               |    2 -
 src/libstemmer/Makefile.am                         |    2 -
 src/libtracker-bus/Makefile.am                     |    2 -
 src/libtracker-common/Makefile.am                  |    2 -
 src/libtracker-control/Makefile.am                 |    2 -
 src/libtracker-data/Makefile.am                    |    2 -
 src/libtracker-direct/Makefile.am                  |    2 -
 src/libtracker-extract/Makefile.am                 |    2 -
 src/libtracker-fts/Makefile.am                     |    2 -
 src/libtracker-miner/Makefile.am                   |    2 -
 src/libtracker-sparql-backend/Makefile.am          |    2 -
 src/libtracker-sparql/Makefile.am                  |    2 -
 src/miners/Makefile.am                             |    2 -
 src/miners/fs/Makefile.am                          |    2 -
 src/miners/rss/Makefile.am                         |    2 -
 src/plugins/Makefile.am                            |    2 -
 src/plugins/evolution/Makefile.am                  |    2 -
 src/plugins/firefox/Makefile.am                    |    2 -
 src/plugins/firefox/chrome/Makefile.am             |    2 -
 src/plugins/firefox/chrome/content/Makefile.am     |    2 -
 src/plugins/firefox/chrome/locale/Makefile.am      |    2 -
 src/plugins/firefox/chrome/skin/Makefile.am        |    2 -
 src/plugins/firefox/defaults/Makefile.am           |    2 -
 .../firefox/defaults/preferences/Makefile.am       |    2 -
 src/plugins/nautilus/Makefile.am                   |    2 -
 src/plugins/thunderbird/Makefile.am                |    2 -
 src/plugins/thunderbird/chrome/Makefile.am         |    2 -
 src/plugins/thunderbird/chrome/content/Makefile.am |    2 -
 src/plugins/thunderbird/chrome/locale/Makefile.am  |    2 -
 src/plugins/thunderbird/chrome/skin/Makefile.am    |    2 -
 src/plugins/thunderbird/defaults/Makefile.am       |    2 -
 .../thunderbird/defaults/preferences/Makefile.am   |    2 -
 src/tracker-control/Makefile.am                    |    2 -
 src/tracker-extract/Makefile.am                    |    3 +-
 src/tracker-needle/Makefile.am                     |    2 -
 src/tracker-preferences/Makefile.am                |    2 -
 src/tracker-store/Makefile.am                      |    2 -
 src/tracker-utils/Makefile.am                      |    2 -
 src/tracker-writeback/Makefile.am                  |    2 -
 tests/common/Makefile.am                           |    2 +-
 tests/functional-tests/Makefile.am                 |    2 -
 tests/functional-tests/common/Makefile.am          |    2 -
 tests/functional-tests/common/utils/Makefile.am    |    2 -
 tests/functional-tests/ipc/Makefile.am             |    2 -
 tests/functional-tests/test-apps-data/Makefile.am  |    2 -
 .../test-extraction-data/audio/Makefile.am         |    2 -
 .../test-extraction-data/images/Makefile.am        |    2 -
 .../test-extraction-data/office/Makefile.am        |    2 -
 .../test-extraction-data/playlists/Makefile.am     |    2 -
 .../test-extraction-data/video/Makefile.am         |    2 -
 .../test-ontologies/add-class/Makefile.am          |    2 -
 .../test-ontologies/add-domainIndex/Makefile.am    |    2 -
 .../test-ontologies/add-prop/Makefile.am           |    2 -
 .../test-ontologies/basic-future/Makefile.am       |    2 -
 .../test-ontologies/basic/Makefile.am              |    2 -
 .../test-ontologies/cardinality/Makefile.am        |    2 -
 .../test-ontologies/indexed/Makefile.am            |    2 -
 .../test-ontologies/notify/Makefile.am             |    2 -
 .../test-ontologies/property-promotion/Makefile.am |    2 -
 .../property-range-int-to-string/Makefile.am       |    2 -
 .../property-range-string-to-date/Makefile.am      |    2 -
 .../test-ontologies/superclass-remove/Makefile.am  |    2 -
 .../test-writeback-data/Makefile.am                |    2 -
 tests/functional-tests/ttl/Makefile.am             |    2 -
 tests/functional-tests/unittest2/Makefile.am       |    2 -
 tests/gvdb/Makefile.am                             |   11 +-
 tests/libtracker-common/Makefile.am                |    6 +-
 tests/libtracker-data/Makefile.am                  |    6 +-
 tests/libtracker-data/aggregates/Makefile.am       |    2 +-
 tests/libtracker-data/algebra/Makefile.am          |    2 +-
 tests/libtracker-data/anon/Makefile.am             |    2 +-
 tests/libtracker-data/ask/Makefile.am              |    2 +-
 tests/libtracker-data/backup/Makefile.am           |    2 +-
 tests/libtracker-data/basic/Makefile.am            |    2 +-
 .../libtracker-data/bnode-coreference/Makefile.am  |    2 +-
 tests/libtracker-data/bound/Makefile.am            |    2 +-
 tests/libtracker-data/datetime/Makefile.am         |    2 +-
 tests/libtracker-data/error/Makefile.am            |    2 +-
 tests/libtracker-data/expr-ops/Makefile.am         |    2 +-
 tests/libtracker-data/functions/Makefile.am        |    2 +-
 tests/libtracker-data/graph/Makefile.am            |    2 +-
 tests/libtracker-data/nie/Makefile.am              |    2 +-
 tests/libtracker-data/nmo/Makefile.am              |    2 +-
 tests/libtracker-data/optional/Makefile.am         |    2 +-
 tests/libtracker-data/regex/Makefile.am            |    2 +-
 tests/libtracker-data/sort/Makefile.am             |    2 +-
 tests/libtracker-data/subqueries/Makefile.am       |    2 +-
 tests/libtracker-data/turtle/Makefile.am           |    2 +-
 tests/libtracker-extract/Makefile.am               |   14 +-
 tests/libtracker-fts/Makefile.am                   |    9 +-
 tests/libtracker-fts/limits/Makefile.am            |    2 +-
 tests/libtracker-fts/prefix/Makefile.am            |    2 +-
 tests/libtracker-miner/Makefile.am                 |   10 +-
 tests/libtracker-sparql/Makefile.am                |    5 +-
 tests/tracker-steroids/Makefile.am                 |    4 +-
 tests/tracker-writeback/Makefile.am                |    2 +-
 utils/Makefile.am                                  |    2 -
 utils/data-generators/Makefile.am                  |    2 -
 utils/data-generators/cc/Makefile.am               |    2 -
 utils/gtk-sparql/Makefile.am                       |    2 -
 utils/mtp/Makefile.am                              |    2 -
 utils/ontology/Makefile.am                         |    2 -
 utils/sandbox/Makefile.am                          |    2 -
 utils/tracker-resdump/Makefile.am                  |    2 -
 utils/tracker-sql/Makefile.am                      |    2 -
 137 files changed, 257 insertions(+), 322 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 358935f..3b2b2eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -71,7 +71,7 @@ gen-ChangeLog:
 functional-test:
        cd tests/functional-tests/ && $(MAKE) $(AM_MAKEFLAGS) $@
 
-EXTRA_DIST =                                           \
+EXTRA_DIST +=                                          \
        ChangeLog.pre-0-6-93                           \
        gitlog-to-changelog                            \
        intltool-extract.in                            \
@@ -79,7 +79,7 @@ EXTRA_DIST =                                           \
        intltool-update.in                             \
        tracker.doap
 
-DISTCLEANFILES =                                       \
+DISTCLEANFILES +=                                      \
        intltool-extract                               \
        intltool-merge                                 \
        intltool-update
diff --git a/Makefile.decl b/Makefile.decl
index 5e7de8d..c1a5786 100644
--- a/Makefile.decl
+++ b/Makefile.decl
@@ -1,67 +1,171 @@
+# Stolen from: https://git.gnome.org/browse/glib/tree/glib.mk
+
+GTESTER = gtester                      # for non-GLIB packages
+GTESTER_REPORT = gtester-report        # for non-GLIB packages
+#GTESTER = $(top_builddir)/glib/gtester                        # for the GLIB package
+#GTESTER_REPORT = $(top_builddir)/glib/gtester-report  # for the GLIB package
+NULL =
+
+# initialize variables for unconditional += appending
+BUILT_SOURCES =
+BUILT_EXTRA_DIST =
+CLEANFILES = *.log *.trs
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+EXTRA_DIST =
+TEST_PROGS =
+
+installed_test_LTLIBRARIES =
+installed_test_PROGRAMS =
+installed_test_SCRIPTS =
+nobase_installed_test_DATA =
+
+noinst_LTLIBRARIES =
+noinst_PROGRAMS =
+noinst_SCRIPTS =
+noinst_DATA =
+
+check_LTLIBRARIES =
+check_PROGRAMS =
+check_SCRIPTS =
+check_DATA =
+
+TESTS =
+
+# test-nonrecursive: run tests only in cwd
+#if OS_UNIX
+test-nonrecursive: ${TEST_PROGS}
+       @test -z "${TEST_PROGS}" || G_TEST_SRCDIR="$(abs_srcdir)" G_TEST_BUILDDIR="$(abs_builddir)" 
G_DEBUG=gc-friendly MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) ${GTESTER} --verbose 
${TEST_PROGS}
+#else
+test-nonrecursive:
+#endif
+
+.PHONY: test-nonrecursive
+
+.PHONY: lcov genlcov lcov-clean
+# use recursive makes in order to ignore errors during check
+lcov:
+       -$(MAKE) $(AM_MAKEFLAGS) -k check
+       $(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
+# we also have to delete tests/.libs/libmoduletestplugin_*.gcda
+genlcov:
+       $(AM_V_GEN) rm -f $(top_builddir)/tests/.libs/libmoduletestplugin_*.gcda; \
+         $(LTP) --quiet --directory $(top_builddir) --capture --output-file glib-lcov.info --test-name 
GLIB_PERF --no-checksum --compat-libtool --ignore-errors source; \
+         $(LTP) --quiet --output-file glib-lcov.info --remove glib-lcov.info docs/reference/\* /tmp/\*  
gio/tests/gdbus-object-manager-example/\* ; \
+         LANG=C $(LTP_GENHTML) --quiet --prefix $(top_builddir) --output-directory glib-lcov --title "GLib 
Code Coverage" --legend --frames --show-details glib-lcov.info --ignore-errors source
+       @echo "file://$(abs_top_builddir)/glib-lcov/index.html"
+
+lcov-clean:
+       if test -n "$(LTP)"; then \
+         $(LTP) --quiet --directory $(top_builddir) -z; \
+       fi
+
+# run tests in cwd as part of make check
+check-local: test-nonrecursive
+
+# We support a fairly large range of possible variables.  It is expected that all types of files in a test 
suite
+# will belong in exactly one of the following variables.
 #
-# Testing rules for make
-# Original file: http://svn.gnome.org/svn/glib/trunk/Makefile.decl
+# First, we support the usual automake suffixes, but in lowercase, with the customary meaning:
 #
-# test: run all tests in cwd and subdirs
-# test-report: run tests in subdirs and generate report
-# perf-report: run tests in subdirs with -m perf and generate report
-# full-report: like test-report: with -m perf and -m slow
+#   test_programs, test_scripts, test_data, test_ltlibraries
 #
+# The above are used to list files that are involved in both uninstalled and installed testing.  The
+# test_programs and test_scripts are taken to be actual testcases and will be run as part of the test suite.
+# Note that _data is always used with the nobase_ automake variable name to ensure that installed test data 
is
+# installed in the same way as it appears in the package layout.
+#
+# In order to mark a particular file as being only for one type of testing, use 'installed' or 'uninstalled',
+# like so:
+#
+#   installed_test_programs, uninstalled_test_programs
+#   installed_test_scripts, uninstalled_test_scripts
+#   installed_test_data, uninstalled_test_data
+#   installed_test_ltlibraries, uninstalled_test_ltlibraries
+#
+# Additionally, we support 'extra' infixes for programs and scripts.  This is used for support 
programs/scripts
+# that should not themselves be run as testcases (but exist to be used from other testcases):
+#
+#   test_extra_programs, installed_test_extra_programs, uninstalled_test_extra_programs
+#   test_extra_scripts, installed_test_extra_scripts, uninstalled_test_extra_scripts
+#
+# Additionally, for _scripts and _data, we support the customary dist_ prefix so that the named script or 
data
+# file automatically end up in the tarball.
+#
+#   dist_test_scripts, dist_test_data, dist_test_extra_scripts
+#   dist_installed_test_scripts, dist_installed_test_data, dist_installed_test_extra_scripts
+#   dist_uninstalled_test_scripts, dist_uninstalled_test_data, dist_uninstalled_test_extra_scripts
+#
+# Note that no file is automatically disted unless it appears in one of the dist_ variables.  This follows 
the
+# standard automake convention of not disting programs scripts or data by default.
+#
+# test_programs, test_scripts, uninstalled_test_programs and uninstalled_test_scripts (as well as their 
disted
+# variants) will be run as part of the in-tree 'make check'.  These are all assumed to be runnable under
+# gtester.  That's a bit strange for scripts, but it's possible.
 
-extractmodulesdir = $(libdir)/tracker-$(TRACKER_API_VERSION)/extract-modules
-extractrulesdir = $(datadir)/tracker/extract-rules
+# we use test -z "$(TEST_PROGS)" above, so make sure we have no extra whitespace...
+TEST_PROGS += $(strip $(test_programs) $(test_scripts) $(uninstalled_test_programs) 
$(uninstalled_test_scripts) \
+                      $(dist_test_scripts) $(dist_uninstalled_test_scripts))
 
-GTESTER = gtester                      # for non-GLIB packages
-GTESTER_REPORT = gtester-report
+#if OS_WIN32
+#TESTS += $(test_programs) $(test_scripts) $(uninstalled_test_programs) $(uninstalled_test_scripts) \
+#         $(dist_test_scripts) $(dist_uninstalled_test_scripts)
+#endif
 
-# initialize variables for unconditional += appending
-TEST_PROGS =
+# Note: build even the installed-only targets during 'make check' to ensure that they still work.
+# We need to do a bit of trickery here and manage disting via EXTRA_DIST instead of using dist_ prefixes to
+# prevent automake from mistreating gmake functions like $(wildcard ...) and $(addprefix ...) as if they were
+# filenames, including removing duplicate instances of the opening part before the space, eg. '$(addprefix'.
+all_test_programs     = $(test_programs) $(uninstalled_test_programs) $(installed_test_programs) \
+                        $(test_extra_programs) $(uninstalled_test_extra_programs) 
$(installed_test_extra_programs)
+all_test_scripts      = $(test_scripts) $(uninstalled_test_scripts) $(installed_test_scripts) \
+                        $(test_extra_scripts) $(uninstalled_test_extra_scripts) 
$(installed_test_extra_scripts)
+all_dist_test_scripts = $(dist_test_scripts) $(dist_uninstalled_test_scripts) $(dist_installed_test_scripts) 
\
+                        $(dist_test_extra_scripts) $(dist_uninstalled_test_extra_scripts) 
$(dist_installed_test_extra_scripts)
+all_test_scripts     += $(all_dist_test_scripts)
+EXTRA_DIST           += $(all_dist_test_scripts)
+all_test_data         = $(test_data) $(uninstalled_test_data) $(installed_test_data)
+all_dist_test_data    = $(dist_test_data) $(dist_uninstalled_test_data) $(dist_installed_test_data)
+all_test_data        += $(all_dist_test_data)
+EXTRA_DIST           += $(all_dist_test_data)
+all_test_ltlibs       = $(test_ltlibraries) $(uninstalled_test_ltlibraries) $(installed_test_ltlibraries)
+
+if ENABLE_ALWAYS_BUILD_TESTS
+noinst_LTLIBRARIES += $(all_test_ltlibs)
+noinst_PROGRAMS += $(all_test_programs)
+noinst_SCRIPTS += $(all_test_scripts)
+noinst_DATA += $(all_test_data)
+else
+check_LTLIBRARIES += $(all_test_ltlibs)
+check_PROGRAMS += $(all_test_programs)
+check_SCRIPTS += $(all_test_scripts)
+check_DATA += $(all_test_data)
+endif
+
+if ENABLE_INSTALLED_TESTS
+installed_test_PROGRAMS += $(test_programs) $(installed_test_programs) \
+                          $(test_extra_programs) $(installed_test_extra_programs)
+installed_test_SCRIPTS += $(test_scripts) $(installed_test_scripts) \
+                          $(test_extra_scripts) $(test_installed_extra_scripts)
+installed_test_SCRIPTS += $(dist_test_scripts) $(dist_test_extra_scripts) \
+                          $(dist_installed_test_scripts) $(dist_installed_test_extra_scripts)
+nobase_installed_test_DATA += $(test_data) $(installed_test_data)
+nobase_installed_test_DATA += $(dist_test_data) $(dist_installed_test_data)
+installed_test_LTLIBRARIES += $(test_ltlibraries) $(installed_test_ltlibraries)
+installed_testcases = $(test_programs) $(installed_test_programs) \
+                      $(test_scripts) $(installed_test_scripts) \
+                      $(dist_test_scripts) $(dist_installed_test_scripts)
+
+installed_test_meta_DATA = $(installed_testcases:=.test)
+
+%.test: %$(EXEEXT) Makefile
+       $(AM_V_GEN) (echo '[Test]' > $  tmp; \
+       echo 'Type=session' >> $  tmp; \
+       echo 'Exec=$(installed_testdir)/$(notdir $<)' >> $  tmp; \
+       mv $  tmp $@)
 
-### testing rules
-
-# test: run all tests in cwd and subdirs
-test:  ${TEST_PROGS} all
-       @ test -z "${TEST_PROGS}" || ${GTESTER} --verbose ${TEST_PROGS}
-       @ for subdir in $(SUBDIRS) . ; do \
-           test "$$subdir" = "." -o "$$subdir" = "po" || \
-           ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
-         done
-# test-report: run tests in subdirs and generate report
-# perf-report: run tests in subdirs with -m perf and generate report
-# full-report: like test-report: with -m perf and -m slow
-test-report perf-report full-report:   ${TEST_PROGS}
-       @test -z "${TEST_PROGS}" || { \
-         case $@ in \
-         test-report) test_options="-k";; \
-         perf-report) test_options="-k -m=perf";; \
-         full-report) test_options="-k -m=perf -m=slow";; \
-         esac ; \
-         if test -z "$$GTESTER_LOGDIR" ; then  \
-           ${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \
-         elif test -n "${TEST_PROGS}" ; then \
-           ${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
-         fi ; \
-       }
-       @ ignore_logdir=true ; \
-         if test -z "$$GTESTER_LOGDIR" ; then \
-           GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \
-           ignore_logdir=false ; \
-         fi ; \
-         for subdir in $(SUBDIRS) . ; do \
-           test "$$subdir" = "." -o "$$subdir" = "po" || \
-           ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
-         done ; \
-         $$ignore_logdir || { \
-           echo '<?xml version="1.0"?>' > $  xml ; \
-           echo '<report-collection>'  >> $  xml ; \
-           for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
-             sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $  xml ; \
-           done ; \
-           echo >> $  xml ; \
-           echo '</report-collection>' >> $  xml ; \
-           rm -rf "$$GTESTER_LOGDIR"/ ; \
-           ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $  xml >$  
html ; \
-         }
-.PHONY: test test-report perf-report full-report
-# run make test as part of make check
-check-local: test
+CLEANFILES += $(installed_test_meta_DATA)
+endif
diff --git a/acinclude.m4 b/acinclude.m4
index a7d3485..1f3c5f1 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -182,3 +182,36 @@ AC_DEFUN([IDT_COMPILE_WARNINGS],[
     WARN_VALACFLAGS="$warning_valaflags"
     AC_SUBST(WARN_VALACFLAGS)
 ]) dnl IDT_COMPILE_WARNINGS
+
+
+
+dnl Stolen from https://git.gnome.org/browse/glib/tree/m4macros/glibtests.m4
+
+dnl GLIB_TESTS
+dnl
+
+AC_DEFUN([GLIB_TESTS],
+[
+  AC_ARG_ENABLE(installed-tests,
+                AS_HELP_STRING([--enable-installed-tests],
+                               [Enable installation of some test cases]),
+                [case ${enableval} in
+                  yes) ENABLE_INSTALLED_TESTS="1"  ;;
+                  no)  ENABLE_INSTALLED_TESTS="" ;;
+                  *) AC_MSG_ERROR([bad value ${enableval} for --enable-installed-tests]) ;;
+                 esac])
+  AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], test "$ENABLE_INSTALLED_TESTS" = "1")
+  AC_ARG_ENABLE(always-build-tests,
+                AS_HELP_STRING([--enable-always-build-tests],
+                               [Enable always building tests during 'make all']),
+                [case ${enableval} in
+                  yes) ENABLE_ALWAYS_BUILD_TESTS="1"  ;;
+                  no)  ENABLE_ALWAYS_BUILD_TESTS="" ;;
+                  *) AC_MSG_ERROR([bad value ${enableval} for --enable-always-build-tests]) ;;
+                 esac])
+  AM_CONDITIONAL([ENABLE_ALWAYS_BUILD_TESTS], test "$ENABLE_ALWAYS_BUILD_TESTS" = "1")
+  if test "$ENABLE_INSTALLED_TESTS" = "1"; then
+    AC_SUBST(installed_test_metadir, [${datadir}/installed-tests/]AC_PACKAGE_NAME)
+    AC_SUBST(installed_testdir, [${libexecdir}/installed-tests/]AC_PACKAGE_NAME)
+  fi
+])
diff --git a/configure.ac b/configure.ac
index af04bb2..a8c796d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,6 +113,7 @@ AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 
 GLIB_GSETTINGS
+GLIB_TESTS
 
 # Initialize libtool
 LT_PREREQ([2.2])
diff --git a/data/Makefile.am b/data/Makefile.am
index 11ace09..c08feda 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = dbus languages icons ontologies miners gschemas
 
 # First we fix the VERSION and libexecdir in the desktop files
diff --git a/data/dbus/Makefile.am b/data/dbus/Makefile.am
index e632c48..c941f6a 100644
--- a/data/dbus/Makefile.am
+++ b/data/dbus/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 configdir = $(datadir)/tracker
 
 config_DATA = \
diff --git a/data/gschemas/Makefile.am b/data/gschemas/Makefile.am
index e282ee4..59d51aa 100644
--- a/data/gschemas/Makefile.am
+++ b/data/gschemas/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 gsettings_ENUM_NAMESPACE = org.freedesktop.Tracker
 gsettings_ENUM_FILES = $(top_srcdir)/src/libtracker-common/tracker-enums.h
 
diff --git a/data/icons/16x16/Makefile.am b/data/icons/16x16/Makefile.am
index 56c696c..52782da 100644
--- a/data/icons/16x16/Makefile.am
+++ b/data/icons/16x16/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 icondir = $(datadir)/icons/hicolor/16x16/apps
 icon_DATA = # Empty
 
diff --git a/data/icons/22x22/Makefile.am b/data/icons/22x22/Makefile.am
index ca05c1a..60ba12b 100644
--- a/data/icons/22x22/Makefile.am
+++ b/data/icons/22x22/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 icondir = $(datadir)/icons/hicolor/22x22/apps
 icon_DATA = # Empty
 
diff --git a/data/icons/24x24/Makefile.am b/data/icons/24x24/Makefile.am
index 77f2508..573bf12 100644
--- a/data/icons/24x24/Makefile.am
+++ b/data/icons/24x24/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 icondir = $(datadir)/icons/hicolor/24x24/apps
 icon_DATA = # Empty
 
diff --git a/data/icons/32x32/Makefile.am b/data/icons/32x32/Makefile.am
index 124f147..19b2311 100644
--- a/data/icons/32x32/Makefile.am
+++ b/data/icons/32x32/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 icondir = $(datadir)/icons/hicolor/32x32/apps
 icon_DATA = # Empty
 
diff --git a/data/icons/48x48/Makefile.am b/data/icons/48x48/Makefile.am
index ba1d45c..239df51 100644
--- a/data/icons/48x48/Makefile.am
+++ b/data/icons/48x48/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 icondir = $(datadir)/icons/hicolor/48x48/apps
 icon_DATA = # Empty
 
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index fd1efcd..2d5974d 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = 16x16 22x22 24x24 32x32 48x48 scalable
 
 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
diff --git a/data/icons/scalable/Makefile.am b/data/icons/scalable/Makefile.am
index 94267d2..bb3899c 100644
--- a/data/icons/scalable/Makefile.am
+++ b/data/icons/scalable/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 icondir = $(datadir)/icons/hicolor/scalable/apps
 icon_DATA = # Empty
 
diff --git a/data/languages/Makefile.am b/data/languages/Makefile.am
index eaf4ce5..3cbafc7 100644
--- a/data/languages/Makefile.am
+++ b/data/languages/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 configdir = $(datadir)/tracker/languages
 
 config_DATA =                                          \
diff --git a/data/miners/Makefile.am b/data/miners/Makefile.am
index 9dbef64..e8af09f 100644
--- a/data/miners/Makefile.am
+++ b/data/miners/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 desktop_in_in_files =                                  \
        tracker-miner-extract.desktop.in.in            \
        tracker-miner-userguides.desktop.in.in         \
diff --git a/data/ontologies/Makefile.am b/data/ontologies/Makefile.am
index 63ddbd2..cefd1d0 100644
--- a/data/ontologies/Makefile.am
+++ b/data/ontologies/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 maemo_ontology =                                       \
        91-maemo.ontology   91-maemo.description
 
diff --git a/docs/Makefile.am b/docs/Makefile.am
index ac913b0..34805ec 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = manpages design tools reference
 
 # require gtk-doc when making dist
diff --git a/docs/design/Makefile.am b/docs/design/Makefile.am
index ab6d7c1..c9d0d86 100644
--- a/docs/design/Makefile.am
+++ b/docs/design/Makefile.am
@@ -1,9 +1,6 @@
-include $(top_srcdir)/Makefile.decl
-
 architecture_docs =                                    \
        tracker-store.dia                              \
        tracker-miner-fs.dia                           \
        tracker-structural-view.dot
 
 EXTRA_DIST = $(architecture_docs)
-
diff --git a/docs/manpages/Makefile.am b/docs/manpages/Makefile.am
index 4499d68..8cbb71d 100644
--- a/docs/manpages/Makefile.am
+++ b/docs/manpages/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 tp = tracker-preferences.1
 tn = tracker-needle.1
 tmrss = tracker-miner-rss.1
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index ca02fbe..616d504 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS =                                              \
        libtracker-control                             \
        libtracker-sparql                              \
diff --git a/docs/reference/libtracker-control/Makefile.am b/docs/reference/libtracker-control/Makefile.am
index f6bc1aa..8ad7447 100644
--- a/docs/reference/libtracker-control/Makefile.am
+++ b/docs/reference/libtracker-control/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AUTOMAKE_OPTIONS = 1.6
 
 # The name of the module.
diff --git a/docs/reference/libtracker-miner/Makefile.am b/docs/reference/libtracker-miner/Makefile.am
index 019b528..5c710a6 100644
--- a/docs/reference/libtracker-miner/Makefile.am
+++ b/docs/reference/libtracker-miner/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AUTOMAKE_OPTIONS = 1.6
 
 # The name of the module.
diff --git a/docs/reference/libtracker-sparql/Makefile.am b/docs/reference/libtracker-sparql/Makefile.am
index 80ed376..687bf35 100644
--- a/docs/reference/libtracker-sparql/Makefile.am
+++ b/docs/reference/libtracker-sparql/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AUTOMAKE_OPTIONS = 1.6
 
 # The name of the module.
diff --git a/docs/reference/ontology/Makefile.am b/docs/reference/ontology/Makefile.am
index 1e848ee..490373a 100644
--- a/docs/reference/ontology/Makefile.am
+++ b/docs/reference/ontology/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AUTOMAKE_OPTIONS = 1.6
 
 # Generation of ontology.png using ontology-graph
diff --git a/docs/tools/Makefile.am b/docs/tools/Makefile.am
index b135635..b9ac01e 100644
--- a/docs/tools/Makefile.am
+++ b/docs/tools/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 noinst_PROGRAMS = ontology-graph ttl2sgml
 
 AM_CPPFLAGS =                                          \
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 5c62b36..9461762 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = \
        libtracker-extract \
        libtracker-miner \
diff --git a/examples/libtracker-extract/Makefile.am b/examples/libtracker-extract/Makefile.am
index a20a756..1222b0d 100644
--- a/examples/libtracker-extract/Makefile.am
+++ b/examples/libtracker-extract/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 module_flags = -module -avoid-version -no-undefined
 
 AM_CPPFLAGS =                                          \
diff --git a/examples/libtracker-miner/Makefile.am b/examples/libtracker-miner/Makefile.am
index 0e24190..d5bcfb7 100644
--- a/examples/libtracker-miner/Makefile.am
+++ b/examples/libtracker-miner/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 noinst_PROGRAMS = tracker-miner-test
 
 AM_CPPFLAGS =                                          \
diff --git a/examples/libtracker-sparql/Makefile.am b/examples/libtracker-sparql/Makefile.am
index ef417f9..e4bcc89 100644
--- a/examples/libtracker-sparql/Makefile.am
+++ b/examples/libtracker-sparql/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 noinst_PROGRAMS = async-connection class-signal
 
 AM_CPPFLAGS = $(BUILD_CFLAGS) \
diff --git a/examples/rss-reader/Makefile.am b/examples/rss-reader/Makefile.am
index 04478ed..e6606b1 100644
--- a/examples/rss-reader/Makefile.am
+++ b/examples/rss-reader/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 EXTRA_DIST =                                           \
        initial-data.ttl                               \
        rss_viewer.ui                                  \
diff --git a/src/Makefile.am b/src/Makefile.am
index f0b3e93..1a71da5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 if HAVE_TRACKER_FTS
 libstemmer_dir = libstemmer
 endif
diff --git a/src/gvdb/Makefile.am b/src/gvdb/Makefile.am
index ad702e4..390e4ed 100644
--- a/src/gvdb/Makefile.am
+++ b/src/gvdb/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS = \
        $(BUILD_CFLAGS) \
        $(GVDB_CFLAGS)
diff --git a/src/libstemmer/Makefile.am b/src/libstemmer/Makefile.am
index 934727f..7fccbb5 100644
--- a/src/libstemmer/Makefile.am
+++ b/src/libstemmer/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS =                          \
        $(BUILD_CFLAGS)                 \
        -I$(top_srcdir)/src             \
diff --git a/src/libtracker-bus/Makefile.am b/src/libtracker-bus/Makefile.am
index fde7644..1b59a77 100644
--- a/src/libtracker-bus/Makefile.am
+++ b/src/libtracker-bus/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 noinst_LTLIBRARIES = libtracker-bus.la
 
 AM_VALAFLAGS =                                         \
diff --git a/src/libtracker-common/Makefile.am b/src/libtracker-common/Makefile.am
index da761f9..63fbf6b 100644
--- a/src/libtracker-common/Makefile.am
+++ b/src/libtracker-common/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS = \
        $(BUILD_CFLAGS) \
        -I$(top_srcdir)/src \
diff --git a/src/libtracker-control/Makefile.am b/src/libtracker-control/Makefile.am
index 8d74ad7..dcad29b 100644
--- a/src/libtracker-control/Makefile.am
+++ b/src/libtracker-control/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS =                                          \
        $(BUILD_CFLAGS)                                \
        -I$(top_srcdir)/src                            \
diff --git a/src/libtracker-data/Makefile.am b/src/libtracker-data/Makefile.am
index 4827542..ada850e 100644
--- a/src/libtracker-data/Makefile.am
+++ b/src/libtracker-data/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_VALAFLAGS =                                         \
        --includedir=libtracker-data                   \
        --header tracker-sparql-query.h                \
diff --git a/src/libtracker-direct/Makefile.am b/src/libtracker-direct/Makefile.am
index 1e2813d..b5e441b 100644
--- a/src/libtracker-direct/Makefile.am
+++ b/src/libtracker-direct/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 noinst_LTLIBRARIES = libtracker-direct.la
 
 AM_VALAFLAGS =                                         \
diff --git a/src/libtracker-extract/Makefile.am b/src/libtracker-extract/Makefile.am
index 531b69a..3d135f2 100644
--- a/src/libtracker-extract/Makefile.am
+++ b/src/libtracker-extract/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS =                                          \
        $(BUILD_CFLAGS)                                \
        -I$(top_srcdir)/src                            \
diff --git a/src/libtracker-fts/Makefile.am b/src/libtracker-fts/Makefile.am
index e99ea72..f5a23a3 100644
--- a/src/libtracker-fts/Makefile.am
+++ b/src/libtracker-fts/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS =                                          \
        $(BUILD_CFLAGS)                                \
        -I$(top_srcdir)/src                            \
diff --git a/src/libtracker-miner/Makefile.am b/src/libtracker-miner/Makefile.am
index 27222b3..76fe514 100644
--- a/src/libtracker-miner/Makefile.am
+++ b/src/libtracker-miner/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 # Include list of shared sources:
 #  Defines:
 #    $(libtracker_miner_monitor_sources)
diff --git a/src/libtracker-sparql-backend/Makefile.am b/src/libtracker-sparql-backend/Makefile.am
index 5087428..27356a5 100644
--- a/src/libtracker-sparql-backend/Makefile.am
+++ b/src/libtracker-sparql-backend/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 lib_LTLIBRARIES = libtracker-sparql- TRACKER_API_VERSION@.la
 
 AM_VALAFLAGS =                                         \
diff --git a/src/libtracker-sparql/Makefile.am b/src/libtracker-sparql/Makefile.am
index de36125..4ff5476 100644
--- a/src/libtracker-sparql/Makefile.am
+++ b/src/libtracker-sparql/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 noinst_LTLIBRARIES = libtracker-sparql.la
 
 libtracker_sparql_la_VALAFLAGS =                       \
diff --git a/src/miners/Makefile.am b/src/miners/Makefile.am
index 9f017c6..ad12447 100644
--- a/src/miners/Makefile.am
+++ b/src/miners/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS =
 
 if HAVE_TRACKER_MINER_FS
diff --git a/src/miners/fs/Makefile.am b/src/miners/fs/Makefile.am
index e7b7471..99d9279 100644
--- a/src/miners/fs/Makefile.am
+++ b/src/miners/fs/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS =                                          \
        $(BUILD_CFLAGS)                                \
        -I$(top_srcdir)/src                            \
diff --git a/src/miners/rss/Makefile.am b/src/miners/rss/Makefile.am
index d38566b..8340cef 100644
--- a/src/miners/rss/Makefile.am
+++ b/src/miners/rss/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS =                                          \
        $(BUILD_CFLAGS)                                \
        -DSHAREDIR=\""$(datadir)"\"                    \
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index e525adb..dc1e7aa 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS =
 
 if HAVE_TRACKER_MINER_EVOLUTION
diff --git a/src/plugins/evolution/Makefile.am b/src/plugins/evolution/Makefile.am
index 9717511..dd9823d 100644
--- a/src/plugins/evolution/Makefile.am
+++ b/src/plugins/evolution/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS =                                          \
        $(BUILD_CFLAGS)                                \
        -I$(top_srcdir)/src                            \
diff --git a/src/plugins/firefox/Makefile.am b/src/plugins/firefox/Makefile.am
index 7d0f5a8..d45d19a 100644
--- a/src/plugins/firefox/Makefile.am
+++ b/src/plugins/firefox/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = chrome defaults
 
 extensiondir = $(datadir)/xul-ext/trackerfox
diff --git a/src/plugins/firefox/chrome/Makefile.am b/src/plugins/firefox/chrome/Makefile.am
index 8e1b19d..90fd0e7 100644
--- a/src/plugins/firefox/chrome/Makefile.am
+++ b/src/plugins/firefox/chrome/Makefile.am
@@ -1,3 +1 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = skin locale content
diff --git a/src/plugins/firefox/chrome/content/Makefile.am b/src/plugins/firefox/chrome/content/Makefile.am
index 05eb825..59db804 100644
--- a/src/plugins/firefox/chrome/content/Makefile.am
+++ b/src/plugins/firefox/chrome/content/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 extensiondir = $(datadir)/xul-ext/trackerfox/chrome/content
 extension_DATA = \
        about.xul \
diff --git a/src/plugins/firefox/chrome/locale/Makefile.am b/src/plugins/firefox/chrome/locale/Makefile.am
index 26bd7f2..6f8bbae 100644
--- a/src/plugins/firefox/chrome/locale/Makefile.am
+++ b/src/plugins/firefox/chrome/locale/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 # General
 localesdir = $(datadir)/xul-ext/trackerfox/chrome/locale/
 
diff --git a/src/plugins/firefox/chrome/skin/Makefile.am b/src/plugins/firefox/chrome/skin/Makefile.am
index edd9e2f..bb05d70 100644
--- a/src/plugins/firefox/chrome/skin/Makefile.am
+++ b/src/plugins/firefox/chrome/skin/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 extensiondir = $(datadir)/xul-ext/trackerfox/chrome/skin
 extension_DATA = \
        overlay.css
diff --git a/src/plugins/firefox/defaults/Makefile.am b/src/plugins/firefox/defaults/Makefile.am
index 4c3d6b4..287fa71 100644
--- a/src/plugins/firefox/defaults/Makefile.am
+++ b/src/plugins/firefox/defaults/Makefile.am
@@ -1,3 +1 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = preferences
diff --git a/src/plugins/firefox/defaults/preferences/Makefile.am 
b/src/plugins/firefox/defaults/preferences/Makefile.am
index 6758768..6b3756c 100644
--- a/src/plugins/firefox/defaults/preferences/Makefile.am
+++ b/src/plugins/firefox/defaults/preferences/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 extensiondir = $(datadir)/xul-ext/trackerfox/defaults/preferences
 extension_DATA = \
        prefs.js
diff --git a/src/plugins/nautilus/Makefile.am b/src/plugins/nautilus/Makefile.am
index cfe229c..880998d 100644
--- a/src/plugins/nautilus/Makefile.am
+++ b/src/plugins/nautilus/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS =                                          \
        $(BUILD_CFLAGS)                                \
        -I$(top_srcdir)/src                            \
diff --git a/src/plugins/thunderbird/Makefile.am b/src/plugins/thunderbird/Makefile.am
index 7d30a76..2d8ea96 100644
--- a/src/plugins/thunderbird/Makefile.am
+++ b/src/plugins/thunderbird/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = chrome defaults
 
 extensiondir = $(datadir)/xul-ext/trackerbird
diff --git a/src/plugins/thunderbird/chrome/Makefile.am b/src/plugins/thunderbird/chrome/Makefile.am
index 8e1b19d..90fd0e7 100644
--- a/src/plugins/thunderbird/chrome/Makefile.am
+++ b/src/plugins/thunderbird/chrome/Makefile.am
@@ -1,3 +1 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = skin locale content
diff --git a/src/plugins/thunderbird/chrome/content/Makefile.am 
b/src/plugins/thunderbird/chrome/content/Makefile.am
index 504b171..805d414 100644
--- a/src/plugins/thunderbird/chrome/content/Makefile.am
+++ b/src/plugins/thunderbird/chrome/content/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 extensiondir = $(datadir)/xul-ext/trackerbird/chrome/content
 extension_DATA = \
        mailstore.js \
diff --git a/src/plugins/thunderbird/chrome/locale/Makefile.am 
b/src/plugins/thunderbird/chrome/locale/Makefile.am
index 41f2632..81e0355 100644
--- a/src/plugins/thunderbird/chrome/locale/Makefile.am
+++ b/src/plugins/thunderbird/chrome/locale/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 # General
 localesdir = $(datadir)/xul-ext/trackerbird/chrome/locale/
 
diff --git a/src/plugins/thunderbird/chrome/skin/Makefile.am b/src/plugins/thunderbird/chrome/skin/Makefile.am
index 3d864ec..5ab9ac0 100644
--- a/src/plugins/thunderbird/chrome/skin/Makefile.am
+++ b/src/plugins/thunderbird/chrome/skin/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 extensiondir = $(datadir)/xul-ext/trackerbird/chrome/skin
 extension_DATA = \
        overlay.css
diff --git a/src/plugins/thunderbird/defaults/Makefile.am b/src/plugins/thunderbird/defaults/Makefile.am
index 4c3d6b4..287fa71 100644
--- a/src/plugins/thunderbird/defaults/Makefile.am
+++ b/src/plugins/thunderbird/defaults/Makefile.am
@@ -1,3 +1 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = preferences
diff --git a/src/plugins/thunderbird/defaults/preferences/Makefile.am 
b/src/plugins/thunderbird/defaults/preferences/Makefile.am
index d752851..6f9a19e 100644
--- a/src/plugins/thunderbird/defaults/preferences/Makefile.am
+++ b/src/plugins/thunderbird/defaults/preferences/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 extensiondir = $(datadir)/xul-ext/trackerbird/defaults/preferences
 extension_DATA = \
        prefs.js
diff --git a/src/tracker-control/Makefile.am b/src/tracker-control/Makefile.am
index 751466c..935de46 100644
--- a/src/tracker-control/Makefile.am
+++ b/src/tracker-control/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS = \
        $(BUILD_CFLAGS) \
        -DLOCALEDIR=\""$(localedir)"\" \
diff --git a/src/tracker-extract/Makefile.am b/src/tracker-extract/Makefile.am
index f7dc1f3..5c1880b 100644
--- a/src/tracker-extract/Makefile.am
+++ b/src/tracker-extract/Makefile.am
@@ -1,4 +1,4 @@
-include $(top_srcdir)/Makefile.decl
+extractrulesdir = $(datadir)/tracker/extract-rules
 
 module_flags = -module -avoid-version -no-undefined
 rulesdir = $(extractrulesdir)
@@ -54,6 +54,7 @@ rules_files = \
 # NOTE:
 # We don't always link with libtracker-common, we only link
 # against it if we directly use functions in the .so
+extractmodulesdir = $(libdir)/tracker-$(TRACKER_API_VERSION)/extract-modules
 extractmodules_LTLIBRARIES = # Empty
 rules_DATA = # Empty
 
diff --git a/src/tracker-needle/Makefile.am b/src/tracker-needle/Makefile.am
index 4bf8e8f..d492978 100644
--- a/src/tracker-needle/Makefile.am
+++ b/src/tracker-needle/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 bin_PROGRAMS = tracker-needle
 
 AM_VALAFLAGS = \
diff --git a/src/tracker-preferences/Makefile.am b/src/tracker-preferences/Makefile.am
index 9827e7e..7e1543c 100644
--- a/src/tracker-preferences/Makefile.am
+++ b/src/tracker-preferences/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 @INTLTOOL_DESKTOP_RULE@
 
 bin_PROGRAMS = tracker-preferences
diff --git a/src/tracker-store/Makefile.am b/src/tracker-store/Makefile.am
index 06a19f9..3a7a45c 100644
--- a/src/tracker-store/Makefile.am
+++ b/src/tracker-store/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS =                                          \
        $(BUILD_VALACFLAGS)                            \
        -DSHAREDIR=\""$(datadir)"\"                    \
diff --git a/src/tracker-utils/Makefile.am b/src/tracker-utils/Makefile.am
index 7795fb8..3f16b5b 100644
--- a/src/tracker-utils/Makefile.am
+++ b/src/tracker-utils/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS =                                          \
        $(BUILD_CFLAGS)                                \
        -DLOCALEDIR=\""$(localedir)"\"                 \
diff --git a/src/tracker-writeback/Makefile.am b/src/tracker-writeback/Makefile.am
index 35d1e86..bac5dc1 100644
--- a/src/tracker-writeback/Makefile.am
+++ b/src/tracker-writeback/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 module_flags = -module -avoid-version -no-undefined
 modulesdir = $(libdir)/tracker-$(TRACKER_API_VERSION)/writeback-modules
 
diff --git a/tests/common/Makefile.am b/tests/common/Makefile.am
index acca798..1480f86 100644
--- a/tests/common/Makefile.am
+++ b/tests/common/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-noinst_LTLIBRARIES = libtracker-testcommon.la
+noinst_LTLIBRARIES += libtracker-testcommon.la
 
 AM_CPPFLAGS =                                          \
        $(BUILD)                                       \
diff --git a/tests/functional-tests/Makefile.am b/tests/functional-tests/Makefile.am
index 33b59a5..947745e 100644
--- a/tests/functional-tests/Makefile.am
+++ b/tests/functional-tests/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = \
        ipc \
        common \
diff --git a/tests/functional-tests/common/Makefile.am b/tests/functional-tests/common/Makefile.am
index d5b2a06..0629512 100644
--- a/tests/functional-tests/common/Makefile.am
+++ b/tests/functional-tests/common/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = utils
 
 commondir = $(datadir)/tracker-tests/common
diff --git a/tests/functional-tests/common/utils/Makefile.am b/tests/functional-tests/common/utils/Makefile.am
index 5c93c7e..c330275 100644
--- a/tests/functional-tests/common/utils/Makefile.am
+++ b/tests/functional-tests/common/utils/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 utilsdir = $(datadir)/tracker-tests/common/utils
 
 utils_SCRIPTS =                                        \
diff --git a/tests/functional-tests/ipc/Makefile.am b/tests/functional-tests/ipc/Makefile.am
index 7fb0513..69ea8a8 100644
--- a/tests/functional-tests/ipc/Makefile.am
+++ b/tests/functional-tests/ipc/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 noinst_PROGRAMS = \
        test-insert-or-replace \
        test-busy-handling \
diff --git a/tests/functional-tests/test-apps-data/Makefile.am 
b/tests/functional-tests/test-apps-data/Makefile.am
index f77ecc6..ccdd730 100644
--- a/tests/functional-tests/test-apps-data/Makefile.am
+++ b/tests/functional-tests/test-apps-data/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 appstestdir = $(datadir)/tracker-tests/test-apps-data
 
 appstest_DATA =                \
diff --git a/tests/functional-tests/test-extraction-data/audio/Makefile.am 
b/tests/functional-tests/test-extraction-data/audio/Makefile.am
index fe7621f..fdb8a54 100644
--- a/tests/functional-tests/test-extraction-data/audio/Makefile.am
+++ b/tests/functional-tests/test-extraction-data/audio/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 audiotestdir = $(datadir)/tracker-tests/test-extraction-data/audio
 
 audiotest_DATA =                                       \
diff --git a/tests/functional-tests/test-extraction-data/images/Makefile.am 
b/tests/functional-tests/test-extraction-data/images/Makefile.am
index fbd464d..f9a2f14 100644
--- a/tests/functional-tests/test-extraction-data/images/Makefile.am
+++ b/tests/functional-tests/test-extraction-data/images/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 imagedir = $(datadir)/tracker-tests/test-extraction-data/images
 
 image_DATA = \
diff --git a/tests/functional-tests/test-extraction-data/office/Makefile.am 
b/tests/functional-tests/test-extraction-data/office/Makefile.am
index c806ae2..33704ed 100644
--- a/tests/functional-tests/test-extraction-data/office/Makefile.am
+++ b/tests/functional-tests/test-extraction-data/office/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 docs = \
        office-doc.doc \
        office-doc.expected \
diff --git a/tests/functional-tests/test-extraction-data/playlists/Makefile.am 
b/tests/functional-tests/test-extraction-data/playlists/Makefile.am
index 09a957f..b797684 100644
--- a/tests/functional-tests/test-extraction-data/playlists/Makefile.am
+++ b/tests/functional-tests/test-extraction-data/playlists/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 playlists = \
        playlist-test-1.m3u \
        playlist-test-1.expected
diff --git a/tests/functional-tests/test-extraction-data/video/Makefile.am 
b/tests/functional-tests/test-extraction-data/video/Makefile.am
index 3725d55..0917ade 100644
--- a/tests/functional-tests/test-extraction-data/video/Makefile.am
+++ b/tests/functional-tests/test-extraction-data/video/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 videotestdir = $(datadir)/tracker-tests/test-extraction-data/video
 
 videotest_DATA =
diff --git a/tests/functional-tests/test-ontologies/add-class/Makefile.am 
b/tests/functional-tests/test-ontologies/add-class/Makefile.am
index 1b7f4ae..5b8b5e4 100644
--- a/tests/functional-tests/test-ontologies/add-class/Makefile.am
+++ b/tests/functional-tests/test-ontologies/add-class/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 addclassdir = $(datadir)/tracker-tests/test-ontologies/add-class
 
 addclass_DATA =                                        \
diff --git a/tests/functional-tests/test-ontologies/add-domainIndex/Makefile.am 
b/tests/functional-tests/test-ontologies/add-domainIndex/Makefile.am
index 6dcdf80..fd565a1 100644
--- a/tests/functional-tests/test-ontologies/add-domainIndex/Makefile.am
+++ b/tests/functional-tests/test-ontologies/add-domainIndex/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 domainindexdir = $(datadir)/tracker-tests/test-ontologies/add-domainIndex
 
 domainindex_DATA =                                     \
diff --git a/tests/functional-tests/test-ontologies/add-prop/Makefile.am 
b/tests/functional-tests/test-ontologies/add-prop/Makefile.am
index 506c763..98e4bd5 100644
--- a/tests/functional-tests/test-ontologies/add-prop/Makefile.am
+++ b/tests/functional-tests/test-ontologies/add-prop/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 addpropdir = $(datadir)/tracker-tests/test-ontologies/add-prop
 
 addprop_DATA =                                         \
diff --git a/tests/functional-tests/test-ontologies/basic-future/Makefile.am 
b/tests/functional-tests/test-ontologies/basic-future/Makefile.am
index 2106dbb..f4d94c2 100644
--- a/tests/functional-tests/test-ontologies/basic-future/Makefile.am
+++ b/tests/functional-tests/test-ontologies/basic-future/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 basicfutdir = $(datadir)/tracker-tests/test-ontologies/basic-future
 
 basicfut_DATA =                                        \
diff --git a/tests/functional-tests/test-ontologies/basic/Makefile.am 
b/tests/functional-tests/test-ontologies/basic/Makefile.am
index c6c4464..b02de8c 100644
--- a/tests/functional-tests/test-ontologies/basic/Makefile.am
+++ b/tests/functional-tests/test-ontologies/basic/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 basicontodir = $(datadir)/tracker-tests/test-ontologies/basic
 
 basiconto_DATA =                                       \
diff --git a/tests/functional-tests/test-ontologies/cardinality/Makefile.am 
b/tests/functional-tests/test-ontologies/cardinality/Makefile.am
index cfa00ed..0d48fc7 100644
--- a/tests/functional-tests/test-ontologies/cardinality/Makefile.am
+++ b/tests/functional-tests/test-ontologies/cardinality/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 cardinalitydir = $(datadir)/tracker-tests/test-ontologies/cardinality
 
 cardinality_DATA =                                     \
diff --git a/tests/functional-tests/test-ontologies/indexed/Makefile.am 
b/tests/functional-tests/test-ontologies/indexed/Makefile.am
index 99f1e01..8326a50 100644
--- a/tests/functional-tests/test-ontologies/indexed/Makefile.am
+++ b/tests/functional-tests/test-ontologies/indexed/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 indexeddir = $(datadir)/tracker-tests/test-ontologies/indexed
 
 indexed_DATA =                                         \
diff --git a/tests/functional-tests/test-ontologies/notify/Makefile.am 
b/tests/functional-tests/test-ontologies/notify/Makefile.am
index a898b72..9c4ec7e 100644
--- a/tests/functional-tests/test-ontologies/notify/Makefile.am
+++ b/tests/functional-tests/test-ontologies/notify/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 notifydir = $(datadir)/tracker-tests/test-ontologies/notify
 
 notify_DATA =                                          \
diff --git a/tests/functional-tests/test-ontologies/property-promotion/Makefile.am 
b/tests/functional-tests/test-ontologies/property-promotion/Makefile.am
index efb993b..fb62883 100644
--- a/tests/functional-tests/test-ontologies/property-promotion/Makefile.am
+++ b/tests/functional-tests/test-ontologies/property-promotion/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 proppromotiondir = $(datadir)/tracker-tests/test-ontologies/property-promotion
 
 proppromotion_DATA =                                   \
diff --git a/tests/functional-tests/test-ontologies/property-range-int-to-string/Makefile.am 
b/tests/functional-tests/test-ontologies/property-range-int-to-string/Makefile.am
index 31e6189..60cc953 100644
--- a/tests/functional-tests/test-ontologies/property-range-int-to-string/Makefile.am
+++ b/tests/functional-tests/test-ontologies/property-range-int-to-string/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 intontodir = $(datadir)/tracker-tests/test-ontologies/property-range-int-to-string
 
 intonto_DATA =                                         \
diff --git a/tests/functional-tests/test-ontologies/property-range-string-to-date/Makefile.am 
b/tests/functional-tests/test-ontologies/property-range-string-to-date/Makefile.am
index 9006afa..add3eb4 100644
--- a/tests/functional-tests/test-ontologies/property-range-string-to-date/Makefile.am
+++ b/tests/functional-tests/test-ontologies/property-range-string-to-date/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 dateontodir = $(datadir)/tracker-tests/test-ontologies/property-range-string-to-date
 
 dateonto_DATA =                                        \
diff --git a/tests/functional-tests/test-ontologies/superclass-remove/Makefile.am 
b/tests/functional-tests/test-ontologies/superclass-remove/Makefile.am
index 7d772c3..e27e041 100644
--- a/tests/functional-tests/test-ontologies/superclass-remove/Makefile.am
+++ b/tests/functional-tests/test-ontologies/superclass-remove/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 superclassrmdir = $(datadir)/tracker-tests/test-ontologies/superclass-remove
 
 superclassrm_DATA =                                    \
diff --git a/tests/functional-tests/test-writeback-data/Makefile.am 
b/tests/functional-tests/test-writeback-data/Makefile.am
index 1747073..9f34cc5 100644
--- a/tests/functional-tests/test-writeback-data/Makefile.am
+++ b/tests/functional-tests/test-writeback-data/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 wbtestdir = $(datadir)/tracker-tests/test-writeback-data/
 
 wbtest_DATA =                                          \
diff --git a/tests/functional-tests/ttl/Makefile.am b/tests/functional-tests/ttl/Makefile.am
index 7628368..bf02a1c 100644
--- a/tests/functional-tests/ttl/Makefile.am
+++ b/tests/functional-tests/ttl/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 BUILT_SOURCES = gen-test-data.stamp
 
 gen-test-data.stamp:
diff --git a/tests/functional-tests/unittest2/Makefile.am b/tests/functional-tests/unittest2/Makefile.am
index 62839ea..8e05fdf 100644
--- a/tests/functional-tests/unittest2/Makefile.am
+++ b/tests/functional-tests/unittest2/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 ut2dir = $(datadir)/tracker-tests/unittest2
 
 ut2_SCRIPTS =                                          \
diff --git a/tests/gvdb/Makefile.am b/tests/gvdb/Makefile.am
index ed0994e..daabc50 100644
--- a/tests/gvdb/Makefile.am
+++ b/tests/gvdb/Makefile.am
@@ -1,17 +1,15 @@
 include $(top_srcdir)/Makefile.decl
 
+noinst_PROGRAMS += $(test_programs)
+
+test_programs = gvdb-test
+
 AM_CPPFLAGS =                                          \
        -I$(top_srcdir)/src                            \
        -I$(top_builddir)/src                          \
        -DSHAREDIR=\""$(datadir)"\"                    \
        $(LIBTRACKER_DATA_CFLAGS)
 
-
-noinst_PROGRAMS = $(TEST_PROGS)
-
-TEST_PROGS +=                                          \
-       gvdb-test
-
 gvdb_test_SOURCES = gvdb-test.c
 gvdb_test_LDADD =      $(top_builddir)/src/gvdb/libgvdb.la     \
                        $(BUILD_LIBS)                           \
@@ -21,4 +19,3 @@ gvdb_test_LDADD =     $(top_builddir)/src/gvdb/libgvdb.la     \
 gvdb_test_CFLAGS =     $(BUILD_CFLAGS) \
                        $(GVDB_CFLAGS)  \
                        $(TRACKER_UTILS_CFLAGS)
-                           
diff --git a/tests/libtracker-common/Makefile.am b/tests/libtracker-common/Makefile.am
index 4c80160..2907d84 100644
--- a/tests/libtracker-common/Makefile.am
+++ b/tests/libtracker-common/Makefile.am
@@ -1,8 +1,8 @@
 include $(top_srcdir)/Makefile.decl
 
-noinst_PROGRAMS = $(TEST_PROGS)
+noinst_PROGRAMS += $(test_programs)
 
-TEST_PROGS +=                                          \
+test_programs = \
        tracker-type-utils                             \
        tracker-dbus                                   \
        tracker-file-utils                             \
@@ -40,4 +40,4 @@ tracker_crc32_test_SOURCES = tracker-crc32-test.c
 
 tracker_date_time_test_SOURCES = tracker-date-time-test.c
 
-EXTRA_DIST = non-utf8.txt
+EXTRA_DIST += non-utf8.txt
diff --git a/tests/libtracker-data/Makefile.am b/tests/libtracker-data/Makefile.am
index 916578d..c7623e1 100644
--- a/tests/libtracker-data/Makefile.am
+++ b/tests/libtracker-data/Makefile.am
@@ -22,9 +22,9 @@ SUBDIRS =                                              \
        backup                                         \
        turtle
 
-noinst_PROGRAMS = $(TEST_PROGS)
+noinst_PROGRAMS += $(test_programs)
 
-TEST_PROGS +=                                          \
+test_programs = \
        tracker-sparql                                 \
        tracker-sparql-blank                           \
        tracker-ontology                               \
@@ -56,7 +56,7 @@ tracker_ontology_change_SOURCES = tracker-ontology-change-test.c
 tracker_backup_SOURCES = tracker-backup-test.c
 tracker_db_journal_SOURCES = tracker-db-journal.c
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        dawg-testcases                                 \
        change/source/99-example.ontology.v1           \
        change/source/99-example.ontology.v2           \
diff --git a/tests/libtracker-data/aggregates/Makefile.am b/tests/libtracker-data/aggregates/Makefile.am
index 80b32f8..a40a656 100644
--- a/tests/libtracker-data/aggregates/Makefile.am
+++ b/tests/libtracker-data/aggregates/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data-1.ontology                                \
        data-1.ttl                                     \
        aggregate-1.out                                \
diff --git a/tests/libtracker-data/algebra/Makefile.am b/tests/libtracker-data/algebra/Makefile.am
index ac0ea03..c4d8d9f 100644
--- a/tests/libtracker-data/algebra/Makefile.am
+++ b/tests/libtracker-data/algebra/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data-1.ontology                                \
        data-1.ttl                                     \
        data-2.ontology                                \
diff --git a/tests/libtracker-data/anon/Makefile.am b/tests/libtracker-data/anon/Makefile.am
index 8b2b576..e4d551a 100644
--- a/tests/libtracker-data/anon/Makefile.am
+++ b/tests/libtracker-data/anon/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data.ontology                                  \
        data.ttl                                       \
        query.out                                      \
diff --git a/tests/libtracker-data/ask/Makefile.am b/tests/libtracker-data/ask/Makefile.am
index 5b1d186..604548a 100644
--- a/tests/libtracker-data/ask/Makefile.am
+++ b/tests/libtracker-data/ask/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        ask-1.out                                      \
        ask-1.rq                                       \
        data.ontology                                  \
diff --git a/tests/libtracker-data/backup/Makefile.am b/tests/libtracker-data/backup/Makefile.am
index e1fe63e..0c43ad7 100644
--- a/tests/libtracker-data/backup/Makefile.am
+++ b/tests/libtracker-data/backup/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        backup.ontology                                \
        backup.data
 
diff --git a/tests/libtracker-data/basic/Makefile.am b/tests/libtracker-data/basic/Makefile.am
index fdebb93..660b372 100644
--- a/tests/libtracker-data/basic/Makefile.am
+++ b/tests/libtracker-data/basic/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        base-prefix-3.out                              \
        base-prefix-3.rq                               \
        compare-cast.rq                                \
diff --git a/tests/libtracker-data/bnode-coreference/Makefile.am 
b/tests/libtracker-data/bnode-coreference/Makefile.am
index c1d348e..5277cf8 100644
--- a/tests/libtracker-data/bnode-coreference/Makefile.am
+++ b/tests/libtracker-data/bnode-coreference/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data.ontology                                  \
        data.ttl                                       \
        query.out                                      \
diff --git a/tests/libtracker-data/bound/Makefile.am b/tests/libtracker-data/bound/Makefile.am
index 8f5e356..f636734 100644
--- a/tests/libtracker-data/bound/Makefile.am
+++ b/tests/libtracker-data/bound/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        bound1.out                                     \
        bound1.rq                                      \
        data.ontology                                  \
diff --git a/tests/libtracker-data/datetime/Makefile.am b/tests/libtracker-data/datetime/Makefile.am
index 1516e7b..4ee4f36 100644
--- a/tests/libtracker-data/datetime/Makefile.am
+++ b/tests/libtracker-data/datetime/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data-1.ontology                                \
        data-1.ttl                                     \
        data-2.ontology                                \
diff --git a/tests/libtracker-data/error/Makefile.am b/tests/libtracker-data/error/Makefile.am
index 7432612..82939b4 100644
--- a/tests/libtracker-data/error/Makefile.am
+++ b/tests/libtracker-data/error/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        query-error-1.ontology                         \
        query-error-1.out                              \
        query-error-1.rq                               \
diff --git a/tests/libtracker-data/expr-ops/Makefile.am b/tests/libtracker-data/expr-ops/Makefile.am
index 72cd653..69ff884 100644
--- a/tests/libtracker-data/expr-ops/Makefile.am
+++ b/tests/libtracker-data/expr-ops/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data.ontology                                  \
        data.ttl                                       \
        query-ge-1.out                                 \
diff --git a/tests/libtracker-data/functions/Makefile.am b/tests/libtracker-data/functions/Makefile.am
index 2b36f4c..6cd9637 100644
--- a/tests/libtracker-data/functions/Makefile.am
+++ b/tests/libtracker-data/functions/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data-1.ontology                                \
        data-1.ttl                                     \
        data-2.ontology                                \
diff --git a/tests/libtracker-data/graph/Makefile.am b/tests/libtracker-data/graph/Makefile.am
index 154c675..019de4e 100644
--- a/tests/libtracker-data/graph/Makefile.am
+++ b/tests/libtracker-data/graph/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data-1.ontology                                \
        data-1.rq                                      \
        data-2.ontology                                \
diff --git a/tests/libtracker-data/nie/Makefile.am b/tests/libtracker-data/nie/Makefile.am
index b318500..6ecc04b 100644
--- a/tests/libtracker-data/nie/Makefile.am
+++ b/tests/libtracker-data/nie/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data-1.ttl                                     \
        filter-characterset-1.out                      \
        filter-characterset-1.rq                       \
diff --git a/tests/libtracker-data/nmo/Makefile.am b/tests/libtracker-data/nmo/Makefile.am
index c4cbc52..d3a9e98 100644
--- a/tests/libtracker-data/nmo/Makefile.am
+++ b/tests/libtracker-data/nmo/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data-1.ttl                                     \
        filter-boundary-1.out                          \
        filter-boundary-1.rq                           \
diff --git a/tests/libtracker-data/optional/Makefile.am b/tests/libtracker-data/optional/Makefile.am
index 23698b8..ce33093 100644
--- a/tests/libtracker-data/optional/Makefile.am
+++ b/tests/libtracker-data/optional/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        complex-data-1.ontology                        \
        complex-data-1.ttl                             \
        q-opt-complex-1.out                            \
diff --git a/tests/libtracker-data/regex/Makefile.am b/tests/libtracker-data/regex/Makefile.am
index 6ecdc25..16d3b46 100644
--- a/tests/libtracker-data/regex/Makefile.am
+++ b/tests/libtracker-data/regex/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        regex-data-01.ontology                         \
        regex-data-01.ttl                              \
        regex-query-001.out                            \
diff --git a/tests/libtracker-data/sort/Makefile.am b/tests/libtracker-data/sort/Makefile.am
index e275ab2..2c9a73f 100644
--- a/tests/libtracker-data/sort/Makefile.am
+++ b/tests/libtracker-data/sort/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data-sort-1.ontology                           \
        data-sort-1.ttl                                \
        data-sort-3.ontology                           \
diff --git a/tests/libtracker-data/subqueries/Makefile.am b/tests/libtracker-data/subqueries/Makefile.am
index ddcc149..26e278e 100644
--- a/tests/libtracker-data/subqueries/Makefile.am
+++ b/tests/libtracker-data/subqueries/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data-1.ontology                                \
        data-1.ttl                                     \
        subqueries-1.out                               \
diff --git a/tests/libtracker-data/turtle/Makefile.am b/tests/libtracker-data/turtle/Makefile.am
index 209d9f8..9f44af1 100644
--- a/tests/libtracker-data/turtle/Makefile.am
+++ b/tests/libtracker-data/turtle/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        turtle-data-001.ontology                       \
        turtle-data-001.ttl                            \
        turtle-query-001.out                           \
diff --git a/tests/libtracker-extract/Makefile.am b/tests/libtracker-extract/Makefile.am
index b8f5a90..5a65cea 100644
--- a/tests/libtracker-extract/Makefile.am
+++ b/tests/libtracker-extract/Makefile.am
@@ -1,27 +1,27 @@
 include $(top_srcdir)/Makefile.decl
 
-noinst_PROGRAMS = $(TEST_PROGS)
+noinst_PROGRAMS += $(test_programs)
 
-TEST_PROGS +=                                          \
+test_programs = \
        tracker-test-utils                             \
        tracker-test-xmp                               \
        tracker-extract-info-test                      \
        tracker-guarantee-test
 
 if HAVE_EXIF
-TEST_PROGS += tracker-exif-test
+test_programs += tracker-exif-test
 endif
 
 if HAVE_IPTC
 # This test also requires libjpeg...
-TEST_PROGS += tracker-iptc-test
+test_programs += tracker-iptc-test
 endif
 
 if HAVE_ENCA
-TEST_PROGS += tracker-encoding
+test_programs += tracker-encoding
 else
 if HAVE_MEEGOTOUCH
-TEST_PROGS += tracker-encoding
+test_programs += tracker-encoding
 endif
 endif
 
@@ -58,7 +58,7 @@ tracker_iptc_test_SOURCES = tracker-iptc-test.c
 tracker_iptc_test_LDADD = $(LDADD) $(LIBJPEG_LIBS)
 tracker_iptc_test_CFLAGS = $(LIBJPEG_CFLAGS)
 
-EXTRA_DIST = \
+EXTRA_DIST += \
        encoding-detect.bin             \
        areas.xmp                       \
        areas-with-contacts.xmp         \
diff --git a/tests/libtracker-fts/Makefile.am b/tests/libtracker-fts/Makefile.am
index d27b15a..aa2be7f 100644
--- a/tests/libtracker-fts/Makefile.am
+++ b/tests/libtracker-fts/Makefile.am
@@ -4,11 +4,12 @@ SUBDIRS =                                              \
        limits                                         \
        prefix
 
-noinst_PROGRAMS =                                      \
-       $(TEST_PROGS)                                  \
+check_PROGRAMS += \
        tracker-parser
 
-TEST_PROGS +=                                          \
+noinst_PROGRAMS += $(test_programs)
+
+test_programs = \
        tracker-fts-test                               \
        tracker-parser-test
 
@@ -35,7 +36,7 @@ tracker_parser_test_SOURCES = tracker-parser-test.c
 
 tracker_parser_SOURCES = tracker-parser.c
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        data.ontology                                  \
        fts3aa-data.rq                                 \
        fts3aa-1.rq                                    \
diff --git a/tests/libtracker-fts/limits/Makefile.am b/tests/libtracker-fts/limits/Makefile.am
index cb4692e..ca6915a 100644
--- a/tests/libtracker-fts/limits/Makefile.am
+++ b/tests/libtracker-fts/limits/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        fts3limits-data.rq                             \
        fts3limits-1.out                               \
        fts3limits-1.rq                                \
diff --git a/tests/libtracker-fts/prefix/Makefile.am b/tests/libtracker-fts/prefix/Makefile.am
index d219876..37be159 100644
--- a/tests/libtracker-fts/prefix/Makefile.am
+++ b/tests/libtracker-fts/prefix/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-EXTRA_DIST =                                           \
+EXTRA_DIST += \
        fts3prefix-data.rq                             \
        fts3prefix-1.out                               \
        fts3prefix-1.rq                                \
diff --git a/tests/libtracker-miner/Makefile.am b/tests/libtracker-miner/Makefile.am
index c2fcb67..cebb7e2 100644
--- a/tests/libtracker-miner/Makefile.am
+++ b/tests/libtracker-miner/Makefile.am
@@ -10,11 +10,11 @@ include $(top_srcdir)/Makefile.decl
 #
 include $(top_srcdir)/src/libtracker-miner/Makefile-shared-sources.decl
 
-noinst_LTLIBRARIES = libtracker-miner-tests.la
+noinst_LTLIBRARIES += libtracker-miner-tests.la
 
-noinst_PROGRAMS = $(TEST_PROGS)
+noinst_PROGRAMS += $(test_programs)
 
-TEST_PROGS +=                                          \
+test_programs = \
        tracker-crawler-test                           \
        tracker-file-notifier-test                     \
        tracker-file-system-test                       \
@@ -103,12 +103,12 @@ noinst_HEADERS =                                       \
        miners-mock.h                                  \
        empty-gobject.h
 
-BUILT_SOURCES = \
+BUILT_SOURCES += \
        $(libtracker_miner_file_system_sources) \
        $(libtracker_miner_file_system_headers) \
        libtracker_miner_tests_la_vala.stamp
 
-EXTRA_DIST = \
+EXTRA_DIST += \
        data/empty-dir/.hidden \
        data/file1 \
        data/dir/empty-dir/.hidden \
diff --git a/tests/libtracker-sparql/Makefile.am b/tests/libtracker-sparql/Makefile.am
index 84c0d6d..52705b1 100644
--- a/tests/libtracker-sparql/Makefile.am
+++ b/tests/libtracker-sparql/Makefile.am
@@ -1,9 +1,8 @@
 include $(top_srcdir)/Makefile.decl
 
-noinst_PROGRAMS = $(TEST_PROGS)
+noinst_PROGRAMS += $(test_programs)
 
-TEST_PROGS +=                                          \
-       tracker-test
+test_programs = tracker-test
 
 AM_CPPFLAGS =                                          \
        $(BUILD_CFLAGS)                                \
diff --git a/tests/tracker-steroids/Makefile.am b/tests/tracker-steroids/Makefile.am
index f173833..cf0149b 100644
--- a/tests/tracker-steroids/Makefile.am
+++ b/tests/tracker-steroids/Makefile.am
@@ -1,8 +1,8 @@
 include $(top_srcdir)/Makefile.decl
 
-noinst_PROGRAMS = $(TEST_PROGS)
+noinst_PROGRAMS += $(test_programs)
 
-TEST_PROGS +=                                          \
+test_programs = \
        tracker-test
 
 AM_CPPFLAGS =                                          \
diff --git a/tests/tracker-writeback/Makefile.am b/tests/tracker-writeback/Makefile.am
index abb16df..011cfce 100644
--- a/tests/tracker-writeback/Makefile.am
+++ b/tests/tracker-writeback/Makefile.am
@@ -5,4 +5,4 @@ configdir = $(datadir)/tracker-tests
 config_SCRIPTS =                                       \
        01-writeback.py
 
-EXTRA_DIST = $(config_SCRIPTS)
+EXTRA_DIST += $(config_SCRIPTS)
diff --git a/utils/Makefile.am b/utils/Makefile.am
index c871a3a..b3a821e 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS =                                              \
        gtk-sparql                                     \
        ontology                                       \
diff --git a/utils/data-generators/Makefile.am b/utils/data-generators/Makefile.am
index e50debc..2a96b8f 100644
--- a/utils/data-generators/Makefile.am
+++ b/utils/data-generators/Makefile.am
@@ -1,3 +1 @@
-include $(top_srcdir)/Makefile.decl
-
 SUBDIRS = cc
diff --git a/utils/data-generators/cc/Makefile.am b/utils/data-generators/cc/Makefile.am
index c41494c..8ac207a 100644
--- a/utils/data-generators/cc/Makefile.am
+++ b/utils/data-generators/cc/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 EXTRA_DIST =                                           \
        default.cfg                                    \
        gen_data.py                                    \
diff --git a/utils/gtk-sparql/Makefile.am b/utils/gtk-sparql/Makefile.am
index 65ece9d..7b5f283 100644
--- a/utils/gtk-sparql/Makefile.am
+++ b/utils/gtk-sparql/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 EXTRA_DIST =                                           \
        gtk-sparql.ui                                  \
        completion.py                                  \
diff --git a/utils/mtp/Makefile.am b/utils/mtp/Makefile.am
index 1b98cad..03626cb 100644
--- a/utils/mtp/Makefile.am
+++ b/utils/mtp/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 AM_CPPFLAGS =                                          \
        $(BUILD_CFLAGS)                                \
        -I$(top_srcdir)/src                            \
diff --git a/utils/ontology/Makefile.am b/utils/ontology/Makefile.am
index 9dcabd5..1d94097 100644
--- a/utils/ontology/Makefile.am
+++ b/utils/ontology/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 noinst_PROGRAMS = ontology-validator data-validator
 
 AM_CPPFLAGS =                                          \
diff --git a/utils/sandbox/Makefile.am b/utils/sandbox/Makefile.am
index c6b1d39..b6c899d 100644
--- a/utils/sandbox/Makefile.am
+++ b/utils/sandbox/Makefile.am
@@ -1,3 +1 @@
-include $(top_srcdir)/Makefile.decl
-
 EXTRA_DIST = tracker-sandbox.py
diff --git a/utils/tracker-resdump/Makefile.am b/utils/tracker-resdump/Makefile.am
index 8ff90a2..b912d77 100644
--- a/utils/tracker-resdump/Makefile.am
+++ b/utils/tracker-resdump/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 noinst_PROGRAMS = tracker-resdump
 
 AM_VALAFLAGS = \
diff --git a/utils/tracker-sql/Makefile.am b/utils/tracker-sql/Makefile.am
index 8239d8e..7d51930 100644
--- a/utils/tracker-sql/Makefile.am
+++ b/utils/tracker-sql/Makefile.am
@@ -1,5 +1,3 @@
-include $(top_srcdir)/Makefile.decl
-
 noinst_PROGRAMS = tracker-sql
 
 AM_CPPFLAGS =                                          \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]