Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: third_party/protobuf/protoc-artifacts/build-protoc.sh

Issue 2600753002: Reverts third_party/protobuf: Update to HEAD (f52e188fe4) (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/protobuf/protoc-artifacts/README.md ('k') | third_party/protobuf/protoc-artifacts/build-zip.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/protoc-artifacts/build-protoc.sh
diff --git a/third_party/protobuf/protoc-artifacts/build-protoc.sh b/third_party/protobuf/protoc-artifacts/build-protoc.sh
index e31948e987159f6967b542bc45284d178a07c75f..88e6ae50a04cef3e4db7570c58f19e3ed1c97eb4 100755
--- a/third_party/protobuf/protoc-artifacts/build-protoc.sh
+++ b/third_party/protobuf/protoc-artifacts/build-protoc.sh
@@ -1,30 +1,17 @@
#!/bin/bash
-# Builds protoc executable into target/protoc.exe; optionally build protoc
-# plugins into target/protoc-gen-*.exe
+# Builds protoc executable into target/protoc.exe
# To be run from Maven.
-# Usage: build-protoc.sh <OS> <ARCH> <TARGET>
+# Usage: build-protoc.sh <OS> <ARCH>
# <OS> and <ARCH> are ${os.detected.name} and ${os.detected.arch} from os-maven-plugin
-# <TARGET> can be "protoc" or "protoc-gen-javalite"
OS=$1
ARCH=$2
-MAKE_TARGET=$3
-if [[ $# < 3 ]]; then
+if [[ $# < 2 ]]; then
echo "No arguments provided. This script is intended to be run from Maven."
exit 1
fi
-case $MAKE_TARGET in
- protoc-gen-javalite)
- ;;
- protoc)
- ;;
- *)
- echo "Target ""$TARGET"" invalid."
- exit 1
-esac
-
# Under Cygwin, bash doesn't have these in PATH when called from Maven which
# runs in Windows version of Java.
export PATH="/bin:/usr/bin:$PATH"
@@ -139,7 +126,7 @@ checkDependencies ()
}
############################################################################
-echo "Building protoc, OS=$OS ARCH=$ARCH TARGET=$TARGET"
+echo "Building protoc, OS=$OS ARCH=$ARCH"
# Nested double quotes are unintuitive, but it works.
cd "$(dirname "$0")"
@@ -147,7 +134,7 @@ cd "$(dirname "$0")"
WORKING_DIR=$(pwd)
CONFIGURE_ARGS="--disable-shared"
-TARGET_FILE=target/$MAKE_TARGET.exe
+MAKE_TARGET="protoc"
if [[ "$OS" == windows ]]; then
MAKE_TARGET="${MAKE_TARGET}.exe"
fi
@@ -222,10 +209,12 @@ fi
export CXXFLAGS LDFLAGS
+TARGET_FILE=target/protoc.exe
+
cd "$WORKING_DIR"/.. && ./configure $CONFIGURE_ARGS &&
cd src && make clean && make $MAKE_TARGET &&
cd "$WORKING_DIR" && mkdir -p target &&
- cp ../src/$MAKE_TARGET $TARGET_FILE ||
+ (cp ../src/protoc $TARGET_FILE || cp ../src/protoc.exe $TARGET_FILE) ||
exit 1
if [[ "$OS" == osx ]]; then
« no previous file with comments | « third_party/protobuf/protoc-artifacts/README.md ('k') | third_party/protobuf/protoc-artifacts/build-zip.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698