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

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



commit 52e191d81320b732fd0d184423fe141f0968dfde
Author: David Goulet <dgoulet@xxxxxxxxx>
Date:   Mon Jan 19 13:14:58 2015 -0500

    Test: support out of tree make check
    
    Fixes #14268
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxx>
---
 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

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits