Make "make clean" rules a bit more standard.

Summary:
make-generic is some sort of internal undocumented thing.
make-local is what is supposed to be used for this stuff.
Also use $(RM) instead of "rm -f".

Reviewed By: marc

Test Plan: make clean


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665498 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/Makefile.am b/compiler/cpp/Makefile.am
index 3ccef42..286b0d7 100644
--- a/compiler/cpp/Makefile.am
+++ b/compiler/cpp/Makefile.am
@@ -68,4 +68,4 @@
 EXTRA_DIST = README
 
 clean-local:
-	rm -rf thriftl.cc thrifty.cc thrifty.h
+	$(RM) thriftl.cc thrifty.cc thrifty.h
diff --git a/lib/java/Makefile.am b/lib/java/Makefile.am
index 2aa5714..46c02ee 100644
--- a/lib/java/Makefile.am
+++ b/lib/java/Makefile.am
@@ -4,7 +4,7 @@
 install-exec-hook:
 	$(ANT) install
 
-clean-generic:
+clean-local:
 	$(ANT) clean
 
 check-local: all
diff --git a/lib/py/Makefile.am b/lib/py/Makefile.am
index 1142b3c..a91d28c 100644
--- a/lib/py/Makefile.am
+++ b/lib/py/Makefile.am
@@ -11,7 +11,7 @@
 install-exec-hook:
 	$(PYTHON) setup.py install --root=$(DESTDIR) --prefix=$(PY_PREFIX) $(PYTHON_SETUPUTIL_ARGS)
 
-clean-generic:
-	rm -rf build
+clean-local:
+	$(RM) -r build
 
 check-local: all
diff --git a/test/Makefile.am b/test/Makefile.am
index db31738..f4dd05c 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -81,4 +81,4 @@
 AM_CPPFLAGS = $(BOOST_CPPFLAGS)
 
 clean-local:
-	rm -rf gen-cpp
+	$(RM) -r gen-cpp
diff --git a/test/java/Makefile.am b/test/java/Makefile.am
index 8cb19ae..853207e 100644
--- a/test/java/Makefile.am
+++ b/test/java/Makefile.am
@@ -1,6 +1,6 @@
 check:
 	$(ANT) test
 
-clean-generic:
+clean-local:
 	$(ANT) clean
 
diff --git a/test/perl/Makefile b/test/perl/Makefile
index 128bbe8..5703c3c 100644
--- a/test/perl/Makefile
+++ b/test/perl/Makefile
@@ -13,4 +13,4 @@
 	$(THRIFT) -perl ../ThriftTest.thrift
 
 clean:
-	rm -fr gen-perl
+	$(RM) -r gen-perl
diff --git a/test/php/Makefile b/test/php/Makefile
index 6cc5233..10b430e 100644
--- a/test/php/Makefile
+++ b/test/php/Makefile
@@ -22,4 +22,4 @@
 	$(THRIFT) --phpi ../ThriftTest.thrift
 
 clean:
-	rm -fr gen-php gen-phpi
+	$(RM) -r gen-php gen-phpi
diff --git a/test/py/Makefile.am b/test/py/Makefile.am
index 0d159a2..9155179 100644
--- a/test/py/Makefile.am
+++ b/test/py/Makefile.am
@@ -24,4 +24,4 @@
 	$(THRIFT) -py $<
 
 clean-local:
-	-rm -rf gen-py
+	$(RM) -r gen-py
diff --git a/test/rb/Makefile b/test/rb/Makefile
index 502a981..326f720 100644
--- a/test/rb/Makefile
+++ b/test/rb/Makefile
@@ -19,4 +19,4 @@
 	ruby TestSuite.rb
 
 clean:
-	rm -fr gen-rb
+	$(RM) -r gen-rb
diff --git a/test/threads/Makefile b/test/threads/Makefile
index 58cdf18..59eb4f2 100644
--- a/test/threads/Makefile
+++ b/test/threads/Makefile
@@ -46,4 +46,4 @@
 	g++ -o ThreadsClient $(CFL) ThreadsClient.cpp ./gen-cpp/ThreadsTest.cpp ./gen-cpp/ThreadsTest_types.cpp
 
 clean:
-	rm -fr *.o ThreadsServer ThreadsClient gen-cpp gen-py
+	$(RM) -r *.o ThreadsServer ThreadsClient gen-cpp gen-py
diff --git a/tutorial/cpp/Makefile b/tutorial/cpp/Makefile
index 74520f0..35a21d8 100644
--- a/tutorial/cpp/Makefile
+++ b/tutorial/cpp/Makefile
@@ -13,4 +13,4 @@
 	g++ -o CppClient -I${THRIFT_DIR} -I${BOOST_DIR}  -I../gen-cpp -L${LIB_DIR} -lthrift CppClient.cpp ${GEN_SRC}
 
 clean:
-	rm -fr CppClient CppServer
+	$(RM) -r CppClient CppServer