Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am	(revision 02559df1767200115484b32e7d7706404cb6e01c)
+++ src/tests/Makefile.am	(revision a4248de1c62a74f682562616679c2e37a51aeb53)
@@ -80,15 +80,18 @@
 
 # SKULLDUGGERY like libcfa/Makefile.am prevent extensionless headers from being generated
-# however, here it is more complicated because it must match the dependencies exactly
-# depencies seem to have the absolute path to the build directory and relative path
-# to the headers from there
+# however, here it is more complicated because it must match the dependencies based on how
+# they are generated by gcc
 headers = $(shell find $(top_srcdir)/src/libcfa -type f ! -name "*.*")
-headers_real = $(shell realpath --relative-to=$(top_builddir) $(headers))
-headers_deps = $(addprefix $(abs_top_builddir)/, $(headers))
+headers_real = $(shell realpath --relative-to=$(top_srcdir)/src/libcfa $(headers))
+headers_deps = $(addprefix %/, $(headers_real))
 $(headers_deps) :
 	echo "Dummy rule, should never be called"
 
+# %/stdlib:
+# 	echo "Dummy rule, should never be called"
+
 # implicit rule so not all test require a rule
 % : %.c $(CC)
+	echo $(headers_deps)
 	$(COMPILE) $(abspath ${<}) -o ${@}
 
Index: src/tests/Makefile.in
===================================================================
--- src/tests/Makefile.in	(revision 02559df1767200115484b32e7d7706404cb6e01c)
+++ src/tests/Makefile.in	(revision a4248de1c62a74f682562616679c2e37a51aeb53)
@@ -315,6 +315,6 @@
 # to the headers from there
 headers = $(shell find $(top_srcdir)/src/libcfa -type f ! -name "*.*")
-headers_real = $(shell realpath --relative-to=$(top_builddir) $(headers))
-headers_deps = $(addprefix $(abs_top_builddir)/, $(headers))
+headers_real = $(shell realpath --relative-to=$(top_srcdir)/src/libcfa $(headers))
+headers_deps = $(addprefix %/, $(headers_real))
 all: all-am
 
@@ -637,6 +637,10 @@
 	echo "Dummy rule, should never be called"
 
+# %/stdlib:
+# 	echo "Dummy rule, should never be called"
+
 # implicit rule so not all test require a rule
 % : %.c $(CC)
+	echo $(headers_deps)
 	$(COMPILE) $(abspath ${<}) -o ${@}
 
Index: src/tests/test.py
===================================================================
--- src/tests/test.py	(revision 02559df1767200115484b32e7d7706404cb6e01c)
+++ src/tests/test.py	(revision a4248de1c62a74f682562616679c2e37a51aeb53)
@@ -219,7 +219,4 @@
 	make('clean', redirects = '> /dev/null 2>&1')
 
-	# automake doesn't clean the dependencies so do it by hand
-	sh("find %s -type d -name .deps -delete" % settings.BUIDDIR)
-
 	# create the executor for our jobs and handle the signal properly
 	pool = setupPool(jobs)
