THRIFT-325. Remove a bunch of uses of the old command line format


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@745242 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/py/src/TSCons.py b/lib/py/src/TSCons.py
index dce1d01..11f31b2 100644
--- a/lib/py/src/TSCons.py
+++ b/lib/py/src/TSCons.py
@@ -9,7 +9,7 @@
 
 def scons_env(env, add=''):
   opath = path.dirname(path.abspath('$TARGET'))
-  lstr = 'thrift --cpp -o ' + opath + ' ' + add + ' $SOURCE'
+  lstr = 'thrift --gen cpp -o ' + opath + ' ' + add + ' $SOURCE'
   cppbuild = Builder(action = lstr)
   env.Append(BUILDERS = {'ThriftCpp' : cppbuild})
 
diff --git a/test/DenseLinkingTest.thrift b/test/DenseLinkingTest.thrift
index 90f0bd6..6952e54 100644
--- a/test/DenseLinkingTest.thrift
+++ b/test/DenseLinkingTest.thrift
@@ -1,6 +1,6 @@
 /*
-../compiler/cpp/thrift -cpp -dense DebugProtoTest.thrift
-../compiler/cpp/thrift -cpp -dense DenseLinkingTest.thrift
+../compiler/cpp/thrift -gen cpp:dense DebugProtoTest.thrift
+../compiler/cpp/thrift -gen cpp:dense DenseLinkingTest.thrift
 g++ -Wall -g -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
   DebugProtoTest.cpp gen-cpp/DebugProtoTest_types.cpp \
   gen-cpp/DenseLinkingTest_types.cpp \
diff --git a/test/DenseProtoTest.cpp b/test/DenseProtoTest.cpp
index d65a6c1..2109e5f 100644
--- a/test/DenseProtoTest.cpp
+++ b/test/DenseProtoTest.cpp
@@ -1,6 +1,6 @@
 /*
-../compiler/cpp/thrift -cpp -dense DebugProtoTest.thrift
-../compiler/cpp/thrift -cpp -dense OptionalRequiredTest.thrift
+../compiler/cpp/thrift --gen cpp:dense DebugProtoTest.thrift
+../compiler/cpp/thrift --gen cpp:dense OptionalRequiredTest.thrift
 g++ -Wall -g -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
   gen-cpp/OptionalRequiredTest_types.cpp \
   gen-cpp/DebugProtoTest_types.cpp \
diff --git a/test/ManyTypedefs.thrift b/test/ManyTypedefs.thrift
index 447d7d2b..7d4c668 100644
--- a/test/ManyTypedefs.thrift
+++ b/test/ManyTypedefs.thrift
@@ -3,9 +3,9 @@
 /*
 rm -rf gen-* orig-*
 mkdir old new
-thrift -cpp -java -php -phpi -py -rb -xsd -perl -ocaml -erl -hs -strict ManyTypedefs.thrift
+thrift --gen cpp --gen java --gen php --gen phpi --gen py --gen rb --gen xsd --gen perl --gen ocaml --gen erl --gen hs --strict ManyTypedefs.thrift
 mv gen-* old
-../compiler/cpp/thrift -cpp -java -php -phpi -py -rb -xsd -perl -ocaml -erl -hs -strict ManyTypedefs.thrift
+../compiler/cpp/thrift --gen cpp --gen java --gen php --gen phpi --gen py --gen rb --gen xsd --gen perl --gen ocaml --gen erl --gen hs --strict ManyTypedefs.thrift
 mv gen-* new
 diff -ur old new
 rm -rf old new
diff --git a/test/ZlibTest.cpp b/test/ZlibTest.cpp
index 3084728..b63b494 100644
--- a/test/ZlibTest.cpp
+++ b/test/ZlibTest.cpp
@@ -1,5 +1,5 @@
 /*
-thrift -cpp DebugProtoTest.thrift
+thrift --gen cpp DebugProtoTest.thrift
 g++ -Wall -g -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
   ZlibTest.cpp \
   ../lib/cpp/.libs/libthriftz.a ../lib/cpp/.libs/libthrift.a \
diff --git a/test/cpp/Makefile.stress b/test/cpp/Makefile.stress
index 6c2244c..61f4241 100644
--- a/test/cpp/Makefile.stress
+++ b/test/cpp/Makefile.stress
@@ -41,7 +41,7 @@
 debug: stress-test-debug stress-test-debug-nb
 
 stubs: ../StressTest.thrift
-	$(THRIFT) --cpp --php ../StressTest.thrift
+	$(THRIFT) --gen cpp --gen php ../StressTest.thrift
 
 stress-test-debug-nb: stubs
 	g++ -o stress-test-nb $(DCFL) src/nb-main.cpp ./gen-cpp/Service.cpp gen-cpp/StressTest_types.cpp
diff --git a/test/cpp/Makefile.thrift b/test/cpp/Makefile.thrift
index fa412aa..9e02802 100644
--- a/test/cpp/Makefile.thrift
+++ b/test/cpp/Makefile.thrift
@@ -41,7 +41,7 @@
 debug: server-debug client-debug
 
 stubs: ../ThriftTest.thrift
-	$(THRIFT) --cpp ../ThriftTest.thrift
+	$(THRIFT) --gen cpp ../ThriftTest.thrift
 
 server-debug: stubs
 	g++ -o TestServer $(DCFL) src/TestServer.cpp ./gen-cpp/ThriftTest.cpp ./gen-cpp/ThriftTest_types.cpp
@@ -56,7 +56,7 @@
 	g++ -o TestClient $(CFL) src/TestClient.cpp ./gen-cpp/ThriftTest.cpp ./gen-cpp/ThriftTest_types.cpp
 
 small:
-	$(THRIFT) -cpp ../SmallTest.thrift
+	$(THRIFT) --gen cpp ../SmallTest.thrift
 	g++ -c $(CCFL) ./gen-cpp/SmallService.cpp ./gen-cpp/SmallTest_types.cpp
 
 clean:
diff --git a/test/erl/Makefile b/test/erl/Makefile
index 8dc756a..037e6ff 100644
--- a/test/erl/Makefile
+++ b/test/erl/Makefile
@@ -24,8 +24,8 @@
 
 ${GENDIR}/: ${RPCFILE}
 	rm -rf ${GENDIR}
-	${THRIFT} -erl ${TEST_RPCFILE}
-	${THRIFT} -erl ${STRESS_RPCFILE}
+	${THRIFT} --gen erl ${TEST_RPCFILE}
+	${THRIFT} --gen erl ${STRESS_RPCFILE}
 	mkdir -p ${GEN_INCLUDEDIR}
 	mkdir -p ${GEN_SRCDIR}
 	mkdir -p ${GEN_TARGETDIR}
diff --git a/test/php/Makefile b/test/php/Makefile
index 10b430e..d48fb85 100644
--- a/test/php/Makefile
+++ b/test/php/Makefile
@@ -16,10 +16,10 @@
 inline: stubs-inline
 
 stubs: ../ThriftTest.thrift
-	$(THRIFT) --phpl ../ThriftTest.thrift
+	$(THRIFT) --gen php ../ThriftTest.thrift
 
 stubs-inline: ../ThriftTest.thrift
-	$(THRIFT) --phpi ../ThriftTest.thrift
+	$(THRIFT) --gen php:inlined ../ThriftTest.thrift
 
 clean:
 	$(RM) -r gen-php gen-phpi
diff --git a/test/threads/ThreadsTest.thrift b/test/threads/ThreadsTest.thrift
index d37b9d7..45df6a4 100755
--- a/test/threads/ThreadsTest.thrift
+++ b/test/threads/ThreadsTest.thrift
@@ -1,5 +1,3 @@
-#!/usr/local/bin/thrift -cpp -php -perl
-
 service ThreadsTest {
   i32 threadOne(1: i32 sleep=15),
   i32 threadTwo(2: i32 sleep=15),
diff --git a/tutorial/shared.thrift b/tutorial/shared.thrift
index 087ee93..c8afecd 100755
--- a/tutorial/shared.thrift
+++ b/tutorial/shared.thrift
@@ -1,5 +1,3 @@
-#!/usr/local/bin/thrift --gen cpp --gen java --gen py --php --xsd --perl
-
 /**
  * This Thrift file can be included by other Thrift files that want to share
  * these definitions.
diff --git a/tutorial/tutorial.thrift b/tutorial/tutorial.thrift
index 1eb83b6..17c5827 100755
--- a/tutorial/tutorial.thrift
+++ b/tutorial/tutorial.thrift
@@ -1,5 +1,3 @@
-#!/usr/local/bin/thrift --gen cpp --gen java --gen py --php --gen rb --gen perl --erl --xsd -r
-#
 # Thrift Tutorial
 # Mark Slee (mcslee@facebook.com)
 #