OSDN Git Service

Merge "docs: Removed dates in obsolete field messages." into qt-dev am: 45855214b5
[android-x86/frameworks-base.git] / tools / genprotos.sh
1 #!/bin/bash
2
3 # TODO This should not be needed. If you set a custom OUT_DIR or OUT_DIR_COMMON_BASE you can
4 # end up with a command that is extremely long, potentially going passed MAX_ARG_STRLEN due to
5 # the way sbox rewrites the command. See b/70221552.
6
7 set -e
8
9 location_aprotoc=$1
10 location_protoc=$2
11 location_soong_zip=$3
12 genDir=$4
13 depfile=$5
14 in=$6
15 out=$7
16
17 mkdir -p ${genDir}/${in} && \
18   ${location_aprotoc} --plugin=${location_protoc} \
19                       --dependency_out=${depfile} \
20                       --javastream_out=${genDir}/${in} \
21                       -Iexternal/protobuf/src \
22                       -I . \
23                       ${in} && \
24   ${location_soong_zip} -jar -o ${out} -C ${genDir}/${in} -D ${genDir}/${in}