diff --git a/configure.ac b/configure.ac
index 52b0d20..8bf2c8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,6 +47,8 @@
 AC_CANONICAL_HOST
 AC_USE_SYSTEM_EXTENSIONS
 
+AM_EXTRA_RECURSIVE_TARGETS([build-tests])
+
 AX_CODE_COVERAGE
 
 AC_ARG_ENABLE(
diff --git a/tests/unit_tests/example_test/Makefile.am b/tests/unit_tests/example_test/Makefile.am
index 1ae80c8..942e9d1 100644
--- a/tests/unit_tests/example_test/Makefile.am
+++ b/tests/unit_tests/example_test/Makefile.am
@@ -15,3 +15,5 @@
 example2_testdriver_CFLAGS  = @TEST_CFLAGS@
 example2_testdriver_LDFLAGS = @TEST_LDFLAGS@
 example2_testdriver_SOURCES = test2.c
+
+build-tests-local: $(check_PROGRAMS)
diff --git a/tests/unit_tests/openvpn/Makefile.am b/tests/unit_tests/openvpn/Makefile.am
index 38299f5..43a6743 100644
--- a/tests/unit_tests/openvpn/Makefile.am
+++ b/tests/unit_tests/openvpn/Makefile.am
@@ -445,3 +445,5 @@
 	$(top_srcdir)/src/openvpn/env_set.c \
 	$(top_srcdir)/src/openvpn/run_command.c \
 	$(top_srcdir)/src/openvpn/socket_util.c
+
+build-tests-local: $(check_PROGRAMS)
diff --git a/tests/unit_tests/openvpnserv/Makefile.am b/tests/unit_tests/openvpnserv/Makefile.am
index 19de666..210c9e6 100644
--- a/tests/unit_tests/openvpnserv/Makefile.am
+++ b/tests/unit_tests/openvpnserv/Makefile.am
@@ -14,3 +14,5 @@
 	$(top_srcdir)/src/openvpnserv/validate.c \
 	$(top_srcdir)/src//openvpn/wfp_block.c \
 	$(top_srcdir)/src//openvpn/wfp_block.h
+
+build-tests-local: $(check_PROGRAMS)
diff --git a/tests/unit_tests/plugins/auth-pam/Makefile.am b/tests/unit_tests/plugins/auth-pam/Makefile.am
index 7da299c..fd7cf91 100644
--- a/tests/unit_tests/plugins/auth-pam/Makefile.am
+++ b/tests/unit_tests/plugins/auth-pam/Makefile.am
@@ -12,3 +12,5 @@
 auth_pam_testdriver_SOURCES = test_search_and_replace.c  $(top_srcdir)/src/plugins/auth-pam/utils.h $(top_srcdir)/src/plugins/auth-pam/utils.c
 auth_pam_testdriver_CFLAGS  = @TEST_CFLAGS@ -I$(top_srcdir)/src/plugins/auth-pam
 auth_pam_testdriver_LDFLAGS = @TEST_LDFLAGS@
+
+build-tests-local: $(check_PROGRAMS)
