2012-07-31 04:00:33 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# this build file uses protoc to build all protocol buffers
|
|
|
|
|
# http://code.google.com/p/protobuf/downloads/list
|
|
|
|
|
|
|
|
|
|
TARGET_CPP="$TARGET/cpp"
|
|
|
|
|
|
|
|
|
|
mkdir -p "$TARGET_CPP"
|
|
|
|
|
|
|
|
|
|
# if you don't want to put protoc on the command line,
|
|
|
|
|
# then set a PROTOC environment variable
|
|
|
|
|
if [ -z $PROTOC] ; then
|
|
|
|
|
PROTOC="protoc"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
command -v $PROTOC >/dev/null 2>&1 || { echo >&2 "protoc is required but not installed. Aborting."; exit 1; }
|
|
|
|
|
|
|
|
|
|
# die on error at this point
|
|
|
|
|
set -e
|
|
|
|
|
|
2012-08-06 04:01:24 +00:00
|
|
|
echo "building cpp protocol buffers"
|
|
|
|
|
$PROTOC $PROTO_FILES --cpp_out=$TARGET_CPP --proto_path=$SRC
|