jam-cloud/build_protoc

24 lines
566 B
Plaintext
Raw Normal View History

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"
PROTOC_ARGS="--cpp_out=$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
$PROTOC $PROTO_FILES --cpp_out=$TARGET/cpp --proto_path=$SRC