Commit 2662fd3d authored by Jisi Liu's avatar Jisi Liu Committed by GitHub

Merge pull request #1871 from pherl/fixwin

Fix build protoc script for windows
parents e8ae137c 1b1a8f40
......@@ -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
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment