THRIFT-2693 Erlang test leaves a lot of generated files

Patch: Roger Meier
diff --git a/lib/erl/Makefile.am b/lib/erl/Makefile.am
index cdac926..60c7e5a 100644
--- a/lib/erl/Makefile.am
+++ b/lib/erl/Makefile.am
@@ -23,7 +23,7 @@
 
 .generated: $(THRIFT_FILES)
 	for f in $(THRIFT_FILES) ; do \
-	  $(THRIFT) --gen erl -out test $$f ; \
+	  $(THRIFT) --gen erl -o test $$f ; \
 	done ; \
 	touch .generated
 
@@ -48,19 +48,7 @@
 
 clean:
 	rm -f .generated
-	rm -f test/thrift1151_types.erl \
-		  test/thrift1151_types.hrl \
-		  test/thrift1151_constants.hrl \
-		  test/thrift1475_types.erl \
-		  test/thrift1475_types.hrl \
-		  test/thrift1475_constants.hrl \
-		  test/thriftTest_types.erl \
-		  test/thriftTest_types.hrl \
-		  test/thriftTest_constants.hrl \
-		  test/thriftTest_thrift.erl \
-		  test/thriftTest_thrift.hrl \
-		  test/secondService_thrift.erl \
-		  test/secondService_thrift.hrl
+	rm -rf test/gen-erl/
 	./rebar clean
 
 maintainer-clean-local: