2021-01-20 23:15:24 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-04-06 17:42:04 +03:00
|
|
|
set -e # exit on any error
|
2021-01-20 23:15:24 +03:00
|
|
|
|
2021-07-21 16:35:21 +03:00
|
|
|
BOOTSTRAP_PREFIX=$PWD/bootstrap-build
|
2021-01-20 23:15:24 +03:00
|
|
|
|
|
|
|
if [ "$OS" = "windows" ]; then
|
|
|
|
# IDRIS_PREFIX is only used to build IDRIS2_BOOT_PATH
|
2021-07-21 16:35:21 +03:00
|
|
|
IDRIS_PREFIX=$(cygpath -m "$BOOTSTRAP_PREFIX")
|
2021-01-20 23:15:24 +03:00
|
|
|
SEP=";"
|
|
|
|
else
|
2021-07-21 16:35:21 +03:00
|
|
|
IDRIS_PREFIX=$BOOTSTRAP_PREFIX
|
2021-01-20 23:15:24 +03:00
|
|
|
SEP=":"
|
|
|
|
fi
|
|
|
|
|
|
|
|
IDRIS2_CG="${IDRIS2_CG-"chez"}"
|
|
|
|
|
|
|
|
BOOT_PATH_BASE=$IDRIS_PREFIX/idris2-$IDRIS2_VERSION
|
2021-03-09 21:27:05 +03:00
|
|
|
IDRIS2_BOOT_PATH="$BOOT_PATH_BASE/prelude$SEP $BOOT_PATH_BASE/base$SEP $BOOT_PATH_BASE/contrib$SEP $BOOT_PATH_BASE/network $BOOT_PATH_BASE/test"
|
2021-01-20 23:15:24 +03:00
|
|
|
|
2021-07-21 16:35:21 +03:00
|
|
|
# BOOTSTRAP_PREFIX must be the "clean" build root, without cygpath -m
|
2021-01-20 23:15:24 +03:00
|
|
|
# Otherwise, we get 'git: Bad address'
|
2021-07-21 16:35:21 +03:00
|
|
|
echo "$BOOTSTRAP_PREFIX"
|
|
|
|
DYLIB_PATH="$BOOTSTRAP_PREFIX/lib"
|
2021-01-20 23:15:24 +03:00
|
|
|
|
|
|
|
$MAKE libs IDRIS2_CG="$IDRIS2_CG" LD_LIBRARY_PATH="$DYLIB_PATH" \
|
2021-07-21 16:35:21 +03:00
|
|
|
PREFIX="$BOOTSTRAP_PREFIX" SCHEME="$SCHEME"
|
2021-01-20 23:15:24 +03:00
|
|
|
$MAKE install IDRIS2_CG="$IDRIS2_CG" LD_LIBRARY_PATH="$DYLIB_PATH" \
|
2021-07-21 16:35:21 +03:00
|
|
|
PREFIX="$BOOTSTRAP_PREFIX" SCHEME="$SCHEME"
|
2021-01-20 23:15:24 +03:00
|
|
|
|
|
|
|
# Now rebuild everything properly
|
2021-07-21 16:35:21 +03:00
|
|
|
$MAKE clean-libs IDRIS2_BOOT="$BOOTSTRAP_PREFIX/bin/idris2"
|
|
|
|
$MAKE all IDRIS2_BOOT="$BOOTSTRAP_PREFIX/bin/idris2" IDRIS2_CG="$IDRIS2_CG" \
|
2021-01-20 23:15:24 +03:00
|
|
|
IDRIS2_PATH="$IDRIS2_BOOT_PATH" LD_LIBRARY_PATH="$DYLIB_PATH" \
|
|
|
|
SCHEME="$SCHEME"
|