scripts/{linux,mac}/build-all: cleanup

- remove commented out lines that are unlikely to be useful
- enable set -u
- allow to skip mbedtls build on linux
This commit is contained in:
Frank Lichtenheld
2022-01-28 12:20:02 +01:00
parent e82303ad2a
commit 7b2413eee2
2 changed files with 25 additions and 28 deletions

View File

@@ -1,23 +1,25 @@
#!/usr/bin/env bash
set -e
if [ -z "$O3" ]; then
set -u
if [ -z "${O3:-}" ]; then
echo O3 var must point to ovpn3 tree ; exit 1
fi
export DEP_DIR=${DEP_DIR:-$HOME/linux}
export TARGET=${TARGET:-linux}
cd $DEP_DIR
export DEP_DIR="${DEP_DIR:-$HOME/linux}"
export TARGET="${TARGET:-linux}"
cd "$DEP_DIR"
rm -rf asio* boost* lz4* lzo* minicrypto openssl* polarssl* snappy*
echo "******* ASIO"
$O3/core/deps/asio/build-asio
"$O3"/core/deps/asio/build-asio
echo "******* xxHash"
$O3/core/deps/xxHash/build-xxHash
echo "******* MBEDTLS"
$O3/core/scripts/linux/build-mbedtls
"$O3"/core/deps/xxHash/build-xxHash
if [ "${MTLS:-1}" = 0 ] ; then
echo "******* MBEDTLS (skipped)"
else
echo "******* MBEDTLS"
"$O3"/core/scripts/linux/build-mbedtls
fi
echo "******* LZ4"
$O3/core/scripts/linux/build-lz4
"$O3"/core/scripts/linux/build-lz4
#$O3/core/scripts/linux/build-openssl x64
#$O3/core/scripts/linux/build-lzo
#$O3/core/scripts/linux/build-boost
#$O3/core/scripts/linux/build-snappy
#$O3/core/scripts/linux/consolidate-so

View File

@@ -1,41 +1,36 @@
#!/usr/bin/env bash
set -e
export DEP_DIR=${DEP_DIR:-$HOME/src/mac}
if [ -z "$O3" ]; then
set -u
export DEP_DIR="${DEP_DIR:-$HOME/src/mac}"
if [ -z "${O3:-}" ]; then
echo O3 var must point to ovpn3 tree ; exit 1
fi
cd $DEP_DIR
rm -rf asio* boost* lz4* lzo* minicrypto openssl* polarssl* mbedtls* snappy* jsoncpp*
echo "******* ASIO"
$O3/core/deps/asio/build-asio
"$O3"/core/deps/asio/build-asio
if [ "$MTLS" = 0 ] ; then
if [ "${MTLS:-1}" = 0 ] ; then
echo "******* MBEDTLS (skipped)"
else
echo "******* MBEDTLS"
# consider OSX_SERVER=0
$O3/core/scripts/mac/build-mbedtls
"$O3"/core/scripts/mac/build-mbedtls
fi
if [ "$OSSL" = 1 ] ; then
if [ "${OSSL:-0}" = 1 ] ; then
echo "******* OPENSSL"
$O3/core/scripts/mac/build-openssl
"$O3"/core/scripts/mac/build-openssl
else
echo "******* OPENSSL (skipped)"
fi
echo "******* LZ4"
$O3/core/scripts/mac/build-lz4
"$O3"/core/scripts/mac/build-lz4
echo "******* xxHash"
$O3/core/deps/xxHash/build-xxHash
"$O3"/core/deps/xxHash/build-xxHash
echo "******* JSONCPP"
$O3/core/scripts/mac/build-jsoncpp
#echo "******* MINICRYPTO"
#$O3/core/scripts/mac/build-minicrypto
#echo "******* SNAPPY"
#$O3/core/scripts/mac/build-snappy
"$O3"/core/scripts/mac/build-jsoncpp