forked from logrhythm/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request elastic#175 from Tom-Artale/build-java-only
Added script to only generate messages in Java, for StorageOverseer
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
set -e | ||
startDir=`pwd` | ||
javaSrcDir="$startDir"/java/src/main/java | ||
protoFileDir="$startDir"/protofiles | ||
scriptsDir="$startDir"/scripts | ||
thirdPartyDir="$startDir"/thirdParty | ||
DIST=dist | ||
DISTDIR="$thirdPartyDir"/$DIST | ||
protoInstallDir="$DISTDIR"/protobuf/ | ||
protoc="$protoInstallDir"/bin/protoc | ||
PROTOBUFFER_VERSION=2.5.0 | ||
GLOBAL_CPP_FLAGS="-fPIC" | ||
|
||
if [ ! -f "$protoc" ]; then | ||
sh "$scriptsDir"/compileThirdParty.sh | ||
fi | ||
|
||
export LD_LIBRARY_PATH="$protoInstallDir"/lib | ||
|
||
mkdir -p "$javaSrcDir" | ||
cd "$javaSrcDir" | ||
"$protoc" -I="$protoFileDir" --java_out=. "$protoFileDir"/BaseConfMsg.proto | ||
# the build below will generate java code with single methods > 64k, to fix this | ||
# we would have to enable option optimize_for = CODE_SIZE | ||
#"$protoc" -I="$protoFileDir" --java_out=. "$protoFileDir"/DpiMsgLRproto.proto | ||
for file in `ls "$protoFileDir" | grep -v DpiMsgLRproto | grep -v Applications` ; do | ||
"$protoc" -I="$protoFileDir" --java_out=. "$protoFileDir"/$file | ||
done | ||
cd "$startDir" |