#!/bin/sh
cd "`dirname $0`"
-../compiler/cpp/thrift -cpp -py reflection_limited.thrift
+../compiler/cpp/thrift --gen cpp --gen py reflection_limited.thrift
cp gen-cpp/reflection_limited_types.h ../lib/cpp/src/
cp gen-cpp/reflection_limited_types.cpp ../lib/cpp/src/
cp -r gen-py/thrift/reflection ../lib/py/src
#!/bin/bash
rm -rf gen-py
-../../../compiler/cpp/thrift -py test1.thrift || exit 1
-../../../compiler/cpp/thrift -py test2.thrift || exit 1
+../../../compiler/cpp/thrift --gen py test1.thrift || exit 1
+../../../compiler/cpp/thrift --gen py test2.thrift || exit 1
PYTHONPATH=./gen-py python -c 'import foo.bar.baz' || exit 1
PYTHONPATH=./gen-py python -c 'import test2' || exit 1
PYTHONPATH=./gen-py python -c 'import test1' &>/dev/null && exit 1 # Should fail.
cp -r gen-py simple
-../../../compiler/cpp/thrift -r -py test2.thrift || exit 1
+../../../compiler/cpp/thrift -r --gen py test2.thrift || exit 1
PYTHONPATH=./gen-py python -c 'import test2' || exit 1
diff -ur simple gen-py > thediffs
file thediffs | grep -s -q empty || exit 1
all: server client
stubs: ThreadsTest.thrift
- $(THRIFT) -cpp -py ThreadsTest.thrift
+ $(THRIFT) --gen cpp --gen py ThreadsTest.thrift
server: stubs
g++ -o ThreadsServer $(CFL) ThreadsServer.cpp ./gen-cpp/ThreadsTest.cpp ./gen-cpp/ThreadsTest_types.cpp