THRIFT-2971 - C++ test and tutorial parallel build is unstable
diff --git a/lib/cpp/test/Makefile.am b/lib/cpp/test/Makefile.am
index d0675cf..43c5975 100755
--- a/lib/cpp/test/Makefile.am
+++ b/lib/cpp/test/Makefile.am
@@ -18,6 +18,16 @@
 #
 AUTOMAKE_OPTIONS = subdir-objects serial-tests
 
+BUILT_SOURCES = gen-cpp/DebugProtoTest_types.h \
+                gen-cpp/EnumTest_types.h \
+                gen-cpp/OptionalRequiredTest_types.h \
+                gen-cpp/Recursive_types.h \
+                gen-cpp/ThriftTest_types.h \
+                gen-cpp/TypedefTest_types.h \
+                gen-cpp/ChildService.h \
+                gen-cpp/ParentService.h \
+                gen-cpp/proc_types.h
+
 noinst_LTLIBRARIES = libtestgencpp.la libprocessortest.la
 nodist_libtestgencpp_la_SOURCES = \
 	gen-cpp/DebugProtoTest_types.cpp \
diff --git a/test/cpp/Makefile.am b/test/cpp/Makefile.am
index 90aa563..7d57f5c 100755
--- a/test/cpp/Makefile.am
+++ b/test/cpp/Makefile.am
@@ -18,6 +18,13 @@
 #
 AUTOMAKE_OPTIONS = subdir-objects serial-tests
 
+BUILT_SOURCES = gen-cpp/ThriftTest.cpp \
+                gen-cpp/ThriftTest_types.cpp \
+                gen-cpp/ThriftTest_constants.cpp \
+                gen-cpp/StressTest_types.cpp \
+                gen-cpp/StressTest_constants.cpp \
+                gen-cpp/Service.cpp
+
 noinst_LTLIBRARIES = libtestgencpp.la libstresstestgencpp.la
 nodist_libtestgencpp_la_SOURCES = \
 	gen-cpp/ThriftTest_constants.cpp \
diff --git a/tutorial/cpp/Makefile.am b/tutorial/cpp/Makefile.am
index 3b38240..9bc6318 100755
--- a/tutorial/cpp/Makefile.am
+++ b/tutorial/cpp/Makefile.am
@@ -18,6 +18,9 @@
 #
 AUTOMAKE_OPTIONS = subdir-objects serial-tests
 
+BUILT_SOURCES = gen-cpp/shared_types.cpp \
+                gen-cpp/tutorial_types.cpp
+
 noinst_LTLIBRARIES = libtutorialgencpp.la
 nodist_libtutorialgencpp_la_SOURCES = \
 	gen-cpp/Calculator.cpp \