jam-cloud/build_protoc-c

24 lines
603 B
Bash
Executable File

#!/bin/bash
# this build file uses protoc to build all protocol buffers
# http://code.google.com/p/protobuf/downloads/list
TARGET_C="$TARGET/c"
mkdir -p "$TARGET_C"
# if you don't want to put protoc on the command line,
# then set a PROTOC environment variable
if [ -z $PROTOCC] ; then
PROTOCC="protoc-c"
fi
# running protoc-c is currently optional
command -v $PROTOCC >/dev/null 2>&1 || { echo >&2 "protoc-c is required but not installed. Aborting."; exit 0; }
# die on error at this point
set -e
echo "building c protocol buffers"
$PROTOCC $PROTO_FILES --c_out=$TARGET_C --proto_path=$SRC