THRIFT-4717: fix up make clean with autoconf
diff --git a/test/cpp/Makefile.am b/test/cpp/Makefile.am
index e8be80a..ebe715e 100755
--- a/test/cpp/Makefile.am
+++ b/test/cpp/Makefile.am
@@ -113,7 +113,7 @@
 AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS) $(ZLIB_LIBS)
 
 clean-local:
-	$(RM) gen-cpp/*
+	$(RM) -r gen-cpp/
 
 style-local:
 	$(CPPSTYLE_CMD)