forked from idris-lang/Idris2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap-stage2.sh
executable file
·35 lines (27 loc) · 1.15 KB
/
bootstrap-stage2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/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/contrib$SEP $BOOT_PATH_BASE/network $BOOT_PATH_BASE/test"
# 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 libs IDRIS2_CG="$IDRIS2_CG" LD_LIBRARY_PATH="$DYLIB_PATH" \
PREFIX="$BOOTSTRAP_PREFIX" SCHEME="$SCHEME"
$MAKE 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"