aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/codegen
diff options
context:
space:
mode:
authorGravatar Yihua Zhang <yihuaz@google.com>2018-03-06 21:40:45 -0800
committerGravatar Yihua Zhang <yihuaz@google.com>2018-03-06 21:40:45 -0800
commiteaf64866777a42996835606e9c3626c974e728c5 (patch)
tree04c693051ba14d798554543123e9b7001d1a3e83 /tools/codegen
parent14b470ac8f59ab1dc88c53335efa84f4849f3fa9 (diff)
Add ALTS code to grpc/core
Diffstat (limited to 'tools/codegen')
-rwxr-xr-xtools/codegen/core/gen_nano_proto.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/codegen/core/gen_nano_proto.sh b/tools/codegen/core/gen_nano_proto.sh
index 4246840173..6ce15178bd 100755
--- a/tools/codegen/core/gen_nano_proto.sh
+++ b/tools/codegen/core/gen_nano_proto.sh
@@ -43,9 +43,9 @@ if [[ ! -f "$INPUT_PROTO" ]]; then
echo "Input proto file '$INPUT_PROTO' doesn't exist."
exit 2
fi
+
if [[ ! -f "${EXPECTED_OPTIONS_FILE_PATH}" ]]; then
- echo "Expected nanopb options file '${EXPECTED_OPTIONS_FILE_PATH}' missing"
- exit 3
+ echo "Input proto file may need .options file to be correctly compiled."
fi
if [[ "${OUTPUT_DIR:0:1}" != '/' ]]; then
@@ -81,6 +81,11 @@ readonly PROTO_BASENAME=$(basename $INPUT_PROTO .proto)
sed -i "s:$PROTO_BASENAME.pb.h:${GRPC_OUTPUT_DIR}/$PROTO_BASENAME.pb.h:g" \
"$OUTPUT_DIR/$PROTO_BASENAME.pb.c"
+if [ $PROTO_BASENAME == "handshaker" ] || [ $PROTO_BASENAME == "altscontext" ]; then
+ sed -i "s:transport_security_common.pb.h:${GRPC_OUTPUT_DIR}/transport_security_common.pb.h:g" \
+ "$OUTPUT_DIR/$PROTO_BASENAME.pb.h"
+fi
+
# Fix up the include guards such that they pass the check_include_guards.py
# test. Assumes that the generated files are being placed in gRPC src dir.
readonly INCLUDE_GUARD_BASE=`echo $GRPC_OUTPUT_DIR | tr [a-z/] [A-Z_] | sed s:^.*SRC_::`