[tor-commits] [torsocks/master] Test: support out of tree make check

dgoulet at torproject.org dgoulet at torproject.org
Mon Jan 19 18:16:20 UTC 2015


commit 52e191d81320b732fd0d184423fe141f0968dfde
Author: David Goulet <dgoulet at ev0ke.net>
Date:   Mon Jan 19 13:14:58 2015 -0500

    Test: support out of tree make check
    
    Fixes #14268
    
    Signed-off-by: David Goulet <dgoulet at ev0ke.net>
---
 tests/Makefile.am      |   14 ++++++++++++++
 tests/unit/Makefile.am |   16 ++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 630492d..27214f8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -28,3 +28,17 @@ check-am:
 
 dist_noinst_SCRIPTS = test_list run.sh
 EXTRA_DIST = run.sh test_list
+
+all-local:
+	@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
+		for script in $(EXTRA_DIST); do \
+			cp -f $(srcdir)/$$script $(builddir); \
+		done; \
+	fi
+
+clean-local:
+	@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
+		for script in $(EXTRA_DIST); do \
+			rm -f $(builddir)/$$script; \
+		done; \
+	fi
diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am
index b85f910..66ae37c 100644
--- a/tests/unit/Makefile.am
+++ b/tests/unit/Makefile.am
@@ -32,3 +32,19 @@ test_socks5_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBTORSOCKS)
 
 test_compat_SOURCES = test_compat.c
 test_compat_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBTORSOCKS)
+
+all-local:
+	@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
+		for script in $(EXTRA_DIST); do \
+			cp -rf $(srcdir)/$$script $(builddir); \
+		done; \
+	fi
+
+# Force remove here so make sure EXTRA_DIST does not contain something like
+# /usr. ;)
+clean-local:
+	@if [ x"$(srcdir)" != x"$(builddir)" ]; then \
+		for script in $(EXTRA_DIST); do \
+			rm -rf $(builddir)/$$script; \
+		done; \
+	fi



More information about the tor-commits mailing list