Skip to content

Commit

Permalink
Fix build protoc script for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
liujisi committed Jul 28, 2016
1 parent e8ae137 commit 1b1a8f4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions protoc-artifacts/build-protoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ cd "$(dirname "$0")"
WORKING_DIR=$(pwd)
CONFIGURE_ARGS="--disable-shared"

TARGET_FILE=target/$MAKE_TARGET.exe
if [[ "$OS" == windows ]]; then
MAKE_TARGET="${MAKE_TARGET}.exe"
fi
Expand Down Expand Up @@ -221,13 +222,10 @@ fi

export CXXFLAGS LDFLAGS

TARGET_FILE=target/$MAKE_TARGET.exe

cd "$WORKING_DIR"/.. && ./configure $CONFIGURE_ARGS &&
cd src && make clean && make $MAKE_TARGET -j4 &&
cd src && make clean && make $MAKE_TARGET &&
cd "$WORKING_DIR" && mkdir -p target &&
(cp ../src/$MAKE_TARGET $TARGET_FILE ||
cp ../src/$MAKE_TARGET.exe $TARGET_FILE) ||
cp ../src/$MAKE_TARGET $TARGET_FILE ||
exit 1

if [[ "$OS" == osx ]]; then
Expand Down

0 comments on commit 1b1a8f4

Please sign in to comment.