Manually remove $(BUILT_SOURCES) since no-dist-built-sources doesnt work
diff --git a/test/Makefile.am b/test/Makefile.am
index d3d0075..bc0cd63 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -120,6 +120,9 @@
find $(distdir) -type d -name "__pycache__" | xargs rm -rf
find $(distdir) -type f -name "*.pyc" | xargs rm -f
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
EXTRA_DIST = \
audit \
c_glib \
diff --git a/test/c_glib/Makefile.am b/test/c_glib/Makefile.am
index f55a977..4471425 100644
--- a/test/c_glib/Makefile.am
+++ b/test/c_glib/Makefile.am
@@ -78,5 +78,8 @@
$(RM) $(distdir)/libtestcglib.la
find $(distdir) -type f -iname "*.o" | xargs rm -f
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
EXTRA_DIST = \
src
diff --git a/test/cl/Makefile.am b/test/cl/Makefile.am
index b5e72bc..c9705f1 100755
--- a/test/cl/Makefile.am
+++ b/test/cl/Makefile.am
@@ -35,6 +35,9 @@
$(RM) TestServer
$(RM) TestClient
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
EXTRA_DIST = \
implementation.lisp \
make-test-client.lisp \
diff --git a/test/cpp/Makefile.am b/test/cpp/Makefile.am
index 9e8b676..595f7a4 100644
--- a/test/cpp/Makefile.am
+++ b/test/cpp/Makefile.am
@@ -116,6 +116,9 @@
style-local:
$(CPPSTYLE_CMD)
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
EXTRA_DIST = \
src/TestClient.cpp \
src/TestServer.cpp \
diff --git a/test/dart/Makefile.am b/test/dart/Makefile.am
index 81f2f5b..3552668 100644
--- a/test/dart/Makefile.am
+++ b/test/dart/Makefile.am
@@ -48,5 +48,8 @@
client: stubs
${DART} test_client/bin/main.dart
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
EXTRA_DIST = \
test_client
diff --git a/test/erl/Makefile.am b/test/erl/Makefile.am
index 5bc90fa..665cb7b 100644
--- a/test/erl/Makefile.am
+++ b/test/erl/Makefile.am
@@ -40,6 +40,9 @@
$(RM) -r .rebar/
$(RM) -r src/gen-erl/
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
dist-hook:
$(RM) $(distdir)/.generated
$(RM) -r $(distdir)/.rebar/
diff --git a/test/features/Makefile.am b/test/features/Makefile.am
index 337d789..4ee56f0 100644
--- a/test/features/Makefile.am
+++ b/test/features/Makefile.am
@@ -14,6 +14,9 @@
# under the License.
#
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
EXTRA_DIST = \
local_thrift \
index.html \
diff --git a/test/go/Makefile.am b/test/go/Makefile.am
index 92ddc93..a00fc37 100644
--- a/test/go/Makefile.am
+++ b/test/go/Makefile.am
@@ -60,6 +60,9 @@
genmock: gopath
sh genmock.sh
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
EXTRA_DIST = \
src/bin \
src/common \
diff --git a/test/haxe/Makefile.am b/test/haxe/Makefile.am
index d37aaa7..6274f29 100644
--- a/test/haxe/Makefile.am
+++ b/test/haxe/Makefile.am
@@ -84,6 +84,9 @@
sleep 10
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
EXTRA_DIST = \
src \
cpp.hxml \
diff --git a/test/lua/Makefile.am b/test/lua/Makefile.am
index a3ab3e2..00bdf3d 100644
--- a/test/lua/Makefile.am
+++ b/test/lua/Makefile.am
@@ -30,5 +30,8 @@
clean-local:
$(RM) -r gen-lua/
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
dist-hook:
$(RM) -r $(distdir)/gen-lua/
diff --git a/test/netstd/Makefile.am b/test/netstd/Makefile.am
index 9712fc2..bd06cd4 100644
--- a/test/netstd/Makefile.am
+++ b/test/netstd/Makefile.am
@@ -32,6 +32,9 @@
$(RM) -r Server/obj
$(RM) -r ThriftTest/ThriftTest
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
EXTRA_DIST = \
Client \
README.md \
diff --git a/test/perl/Makefile.am b/test/perl/Makefile.am
index 589fe62..0064a6e 100644
--- a/test/perl/Makefile.am
+++ b/test/perl/Makefile.am
@@ -27,5 +27,8 @@
clean-local:
$(RM) -r gen-perl/
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
dist-hook:
$(RM) -r $(distdir)/gen-perl/
diff --git a/test/php/Makefile.am b/test/php/Makefile.am
index b1ac686..1cffdd4 100644
--- a/test/php/Makefile.am
+++ b/test/php/Makefile.am
@@ -37,6 +37,9 @@
$(RM) -r gen-*/
$(RM) -r php_ext_dir
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
dist-hook:
$(RM) -r $(distdir)/gen-*/
$(RM) -r $(distdir)/php_ext_dir/
diff --git a/test/py.tornado/Makefile.am b/test/py.tornado/Makefile.am
index 3b78793..214ded2 100644
--- a/test/py.tornado/Makefile.am
+++ b/test/py.tornado/Makefile.am
@@ -32,6 +32,9 @@
find . -type d \( -iname "__pycache__" -or -iname "_trial_temp" \) | xargs rm -rf
$(RM) -r gen-py*/
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
dist-hook:
find $(distdir) -type f \( -iname "*.pyc" \) | xargs rm -f
find $(distdir) -type d \( -iname "__pycache__" -or -iname "_trial_temp" \) | xargs rm -rf
diff --git a/test/py.twisted/Makefile.am b/test/py.twisted/Makefile.am
index bd0cdb1..6461d12 100644
--- a/test/py.twisted/Makefile.am
+++ b/test/py.twisted/Makefile.am
@@ -32,6 +32,9 @@
find . -type d \( -iname "__pycache__" -or -iname "_trial_temp" \) | xargs rm -rf
$(RM) -r gen-py*/
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
dist-hook:
find $(distdir) -type f \( -iname "*.pyc" \) | xargs rm -f
find $(distdir) -type d \( -iname "__pycache__" -or -iname "_trial_temp" \) | xargs rm -rf
diff --git a/test/py/Makefile.am b/test/py/Makefile.am
index 7c78f17..e026077 100644
--- a/test/py/Makefile.am
+++ b/test/py/Makefile.am
@@ -54,6 +54,8 @@
gen-py-enum/DoubleConstantsTest/__init__.py \
gen-py-enum/Recursive/__init__.py
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
precross: $(thrift_gen)
BUILT_SOURCES = $(thrift_gen)
diff --git a/test/rb/Makefile.am b/test/rb/Makefile.am
index 5dd7559..9c5d557 100644
--- a/test/rb/Makefile.am
+++ b/test/rb/Makefile.am
@@ -33,5 +33,8 @@
clean-local:
$(RM) -r gen-rb/
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
dist-hook:
$(RM) -r $(distdir)/gen-rb/
diff --git a/test/rs/Makefile.am b/test/rs/Makefile.am
index 78db5ee..6f5cf93 100644
--- a/test/rs/Makefile.am
+++ b/test/rs/Makefile.am
@@ -34,6 +34,9 @@
-$(RM) src/thrift_test.rs
-$(RM) -r bin
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
EXTRA_DIST = \
Cargo.toml \
src/lib.rs \
diff --git a/test/swift/CrossTests/Makefile.am b/test/swift/CrossTests/Makefile.am
index b7d8fbb..5b33232 100644
--- a/test/swift/CrossTests/Makefile.am
+++ b/test/swift/CrossTests/Makefile.am
@@ -30,5 +30,8 @@
clean-local:
$(RM) -r Sources/Common/gen-swift/
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
dist-hook:
$(RM) -r $(distdir)/gen-swift/
diff --git a/test/swift/Makefile.am b/test/swift/Makefile.am
index 20c2fe5..f81fba8 100644
--- a/test/swift/Makefile.am
+++ b/test/swift/Makefile.am
@@ -19,6 +19,9 @@
SUBDIRS = CrossTests
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
precross:
$(MAKE) -C CrossTests precross