mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-09 21:01:12 +03:00
36 lines
1.0 KiB
Bash
36 lines
1.0 KiB
Bash
#!/bin/sh
|
|
|
|
set -e # Exit on any error
|
|
|
|
PREFIX=$PWD/bootstrap
|
|
|
|
if [ "$OS" = "windows" ]; then
|
|
# IDRIS_PREFIX is only used to build IDRIS2_BOOT_PATH
|
|
IDRIS_PREFIX=$(cygpath -m "$PREFIX")
|
|
SEP=";"
|
|
else
|
|
IDRIS_PREFIX=$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/contrib$SEP $BOOT_PATH_BASE/network"
|
|
|
|
# PREFIX must be the "clean" build root, without cygpath -m
|
|
# Otherwise, we get 'git: Bad address'
|
|
echo "$PREFIX"
|
|
DYLIB_PATH="$PREFIX/lib"
|
|
|
|
$MAKE libs IDRIS2_CG="$IDRIS2_CG" LD_LIBRARY_PATH="$DYLIB_PATH" \
|
|
PREFIX="$PREFIX" SCHEME="$SCHEME"
|
|
$MAKE install IDRIS2_CG="$IDRIS2_CG" LD_LIBRARY_PATH="$DYLIB_PATH" \
|
|
PREFIX="$PREFIX" SCHEME="$SCHEME"
|
|
|
|
# Now rebuild everything properly
|
|
$MAKE clean-libs IDRIS2_BOOT="$PREFIX/bin/idris2"
|
|
$MAKE all IDRIS2_BOOT="$PREFIX/bin/idris2" IDRIS2_CG="$IDRIS2_CG" \
|
|
IDRIS2_PATH="$IDRIS2_BOOT_PATH" LD_LIBRARY_PATH="$DYLIB_PATH" \
|
|
SCHEME="$SCHEME"
|