THRIFT-3274 calling "make clean" twice in a row yields make error

This closes #676
diff --git a/lib/cpp/test/Makefile.am b/lib/cpp/test/Makefile.am
index 44b94a7..4b7a99f 100755
--- a/lib/cpp/test/Makefile.am
+++ b/lib/cpp/test/Makefile.am
@@ -360,7 +360,7 @@
 AM_CXXFLAGS = -Wall -Wextra -pedantic
 
 clean-local:
-	$(RM) -r gen-cpp
+	$(RM) gen-cpp/*
 
 EXTRA_DIST = \
 	concurrency \
diff --git a/test/cpp/Makefile.am b/test/cpp/Makefile.am
index c609a71..9c4ac07 100755
--- a/test/cpp/Makefile.am
+++ b/test/cpp/Makefile.am
@@ -111,7 +111,7 @@
 AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS) $(ZLIB_LIBS)
 
 clean-local:
-	$(RM) -r gen-cpp
+	$(RM) gen-cpp/*
 
 style-local:
 	$(CPPSTYLE_CMD)