mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-25 20:51:43 +03:00
1f3809c49a
Co-authored-by: Ben Hormann <benhormann@users.noreply.github.com>
36 lines
1.2 KiB
Bash
Executable File
36 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e # exit on any error
|
|
|
|
BOOTSTRAP_PREFIX=$PWD/bootstrap-build
|
|
|
|
if [ "$OS" = "windows" ]; then
|
|
# IDRIS_PREFIX is only used to build IDRIS2_BOOT_PATH
|
|
IDRIS_PREFIX=$(cygpath -m "$BOOTSTRAP_PREFIX")
|
|
SEP=";"
|
|
else
|
|
IDRIS_PREFIX=$BOOTSTRAP_PREFIX
|
|
SEP=":"
|
|
fi
|
|
|
|
IDRIS2_CG="${IDRIS2_CG-"chez"}"
|
|
|
|
BOOT_PATH_BASE=$IDRIS_PREFIX/idris2-$IDRIS2_VERSION
|
|
IDRIS2_BOOT_PATH="$BOOT_PATH_BASE/prelude$SEP$BOOT_PATH_BASE/base$SEP$BOOT_PATH_BASE/linear$SEP$BOOT_PATH_BASE/network$SEP$BOOT_PATH_BASE/contrib"
|
|
|
|
# BOOTSTRAP_PREFIX must be the "clean" build root, without cygpath -m
|
|
# Otherwise, we get 'git: Bad address'
|
|
echo "$BOOTSTRAP_PREFIX"
|
|
DYLIB_PATH="$BOOTSTRAP_PREFIX/lib"
|
|
|
|
$MAKE bootstrap-libs IDRIS2_CG="$IDRIS2_CG" LD_LIBRARY_PATH="$DYLIB_PATH" \
|
|
PREFIX="$BOOTSTRAP_PREFIX" SCHEME="$SCHEME"
|
|
$MAKE bootstrap-install IDRIS2_CG="$IDRIS2_CG" LD_LIBRARY_PATH="$DYLIB_PATH" \
|
|
PREFIX="$BOOTSTRAP_PREFIX" SCHEME="$SCHEME"
|
|
|
|
# Now rebuild everything properly
|
|
$MAKE clean-libs IDRIS2_BOOT="$BOOTSTRAP_PREFIX/bin/idris2"
|
|
$MAKE all IDRIS2_BOOT="$BOOTSTRAP_PREFIX/bin/idris2" IDRIS2_CG="$IDRIS2_CG" \
|
|
IDRIS2_PATH="$IDRIS2_BOOT_PATH" LD_LIBRARY_PATH="$DYLIB_PATH" \
|
|
SCHEME="$SCHEME"
|