0
0
mirror of https://github.com/zeromq/libzmq.git synced 2025-01-14 01:37:56 +08:00

Problem: Android build script may fail silently

Solution: Use `set -e`

Note:
To be reported in ZPROJECT, when generating the same for CZMQ & ZYRE.

Note:
`make clean` may fail when Makefile is not yet generated
(case of 1st call of build.sh after git clone).

Additionnaly, cleaned the dependency folder
(report of ZPROJECT generated scripts).
This commit is contained in:
Stephan Guilloux (cos) 2022-10-02 02:27:12 +02:00
parent a782d79d45
commit 0d49eddf16
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -e
function usage {
echo "Usage ./build.sh [ arm | arm64 | x86 | x86_64 ]"
}
@ -86,7 +88,7 @@ LIBTOOL_EXTRA_LDFLAGS='-avoid-version'
(android_build_verify_so ${VERIFY} &> /dev/null) || {
rm -rf "${cache}/libzmq"
(cp -r ../.. "${cache}/libzmq" && cd "${cache}/libzmq" && make clean)
(cp -r ../.. "${cache}/libzmq" && cd "${cache}/libzmq" && ( make clean || : ))
(cd "${cache}/libzmq" && ./autogen.sh \
&& ./configure --quiet "${ANDROID_BUILD_OPTS[@]}" ${CURVE} --without-docs \

View File

@ -1,8 +1,15 @@
#!/usr/bin/env bash
#
# Exit if any step fails
set -e
export NDK_VERSION=android-ndk-r25
export ANDROID_NDK_ROOT="/tmp/${NDK_VERSION}"
# Cleanup.
rm -rf /tmp/tmp-deps
mkdir -p /tmp/tmp-deps
case $(uname | tr '[:upper:]' '[:lower:]') in
linux*)
HOST_PLATFORM=linux