Blob Blame History Raw
diff --git a/Makefile.in b/Makefile.in
index e1b2ff3..ff82f29 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -7,6 +7,7 @@
 srcdir =	@srcdir@
 VPATH =		@srcdir@
 top_srcdir =	@top_srcdir@
+top_builddir =  @top_builddir@
 
 VERSION=@BIND9_VERSION@
 
@@ -86,7 +87,8 @@ force-test: test-force
 test-force:
 	status=0; \
 	(cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \
-	(test -f unit/unittest.sh && $(SHELL) unit/unittest.sh) || status=1; \
+	(test -f ${top_builddir}/unit/unittest.sh && \
+		$(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \
 	exit $$status
 
 README: README.md
@@ -110,6 +112,6 @@ CONTRIBUTING: CONTRIBUTING.md
 		sed -e '$${/^$$/d;}' > $@
 
 unit::
-	sh ${top_srcdir}/unit/unittest.sh
+	sh ${top_builddir}/unit/unittest.sh
 
 clean::
diff --git a/lib/dns/tests/Makefile.in b/lib/dns/tests/Makefile.in
index c7fd4ed..2a6571b 100644
--- a/lib/dns/tests/Makefile.in
+++ b/lib/dns/tests/Makefile.in
@@ -234,7 +234,7 @@ tsig_test@EXEEXT@: tsig_test.@O@ dnstest.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
 			${ISCLIBS} ${LIBS}
 
 unit::
-	sh ${top_srcdir}/unit/unittest.sh
+	sh ${top_builddir}/unit/unittest.sh
 
 clean distclean::
 	rm -f ${TARGETS}
diff --git a/lib/irs/tests/Makefile.in b/lib/irs/tests/Makefile.in
index 2ecf8b0..38bf342 100644
--- a/lib/irs/tests/Makefile.in
+++ b/lib/irs/tests/Makefile.in
@@ -45,7 +45,7 @@ resconf_test@EXEEXT@: resconf_test.@O@ ${CFGDEPLIBS} ${DNSDEPLIBS} ${IRSDEPLIBS}
 			resconf_test.@O@ ${LIBS}
 
 unit::
-	sh ${top_srcdir}/unit/unittest.sh
+	sh ${top_builddir}/unit/unittest.sh
 
 clean distclean::
 	rm -f ${TARGETS}
diff --git a/lib/isc/tests/Makefile.in b/lib/isc/tests/Makefile.in
index 20c7e25..f7fa538 100644
--- a/lib/isc/tests/Makefile.in
+++ b/lib/isc/tests/Makefile.in
@@ -159,7 +159,7 @@ time_test@EXEEXT@: time_test.@O@ ${ISCDEPLIBS}
 			time_test.@O@ ${ISCLIBS} ${LIBS}
 
 unit::
-	sh ${top_srcdir}/unit/unittest.sh
+	sh ${top_builddir}/unit/unittest.sh
 
 clean distclean::
 	rm -f ${TARGETS}
diff --git a/lib/isccfg/tests/Makefile.in b/lib/isccfg/tests/Makefile.in
index be64b92..cbd444a 100644
--- a/lib/isccfg/tests/Makefile.in
+++ b/lib/isccfg/tests/Makefile.in
@@ -44,7 +44,7 @@ parser_test@EXEEXT@: parser_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS
 				${ISCLIBS} ${LIBS}
 
 unit::
-	sh ${top_srcdir}/unit/unittest.sh
+	sh ${top_builddir}/unit/unittest.sh
 
 clean distclean::
 	rm -f ${TARGETS}
diff --git a/lib/lwres/tests/Makefile.in b/lib/lwres/tests/Makefile.in
index 7166d44..10db3e7 100644
--- a/lib/lwres/tests/Makefile.in
+++ b/lib/lwres/tests/Makefile.in
@@ -39,7 +39,7 @@ config_test@EXEEXT@: config_test.@O@ ${LWRESDEPLIBS}
 			config_test.@O@ ${LWRESLIBS} ${LIBS}
 
 unit::
-	sh ${top_srcdir}/unit/unittest.sh
+	sh ${top_builddir}/unit/unittest.sh
 
 clean distclean::
 	rm -f ${TARGETS}