2020-05-18 16:43:12 +03:00
#!/bin/sh
2020-05-19 23:05:52 +03:00
if [ -z " $SCHEME " ]
then
echo "SCHEME not set. Invoke with SCHEME=[name of chez executable]"
exit 1
fi
# Compile the bootstrap scheme
2020-05-18 16:43:12 +03:00
cd bootstrap
2020-05-18 23:10:37 +03:00
${ SCHEME } --script compile.ss
2020-05-18 18:02:30 +03:00
2020-05-19 23:05:52 +03:00
# Put the result in the usual place where the target goes
2020-05-18 18:02:30 +03:00
mkdir -p ../build/exec
2020-05-20 16:00:15 +03:00
mkdir -p ../build/exec/idris2_app
install idris2-boot ../build/exec/idris2
2020-05-20 16:33:34 +03:00
install idris2_app/* ../build/exec/idris2_app
2020-05-19 23:05:52 +03:00
2020-05-19 23:39:36 +03:00
cd ..
2020-05-19 23:05:52 +03:00
# Install with the bootstrap directory as the PREFIX
DIR = " `realpath $0 ` "
2020-05-19 23:39:36 +03:00
PREFIX = " `dirname $DIR ` " /bootstrap
2020-05-19 23:05:52 +03:00
2020-05-19 23:39:36 +03:00
# Now rebuild everything properly
echo ${ PREFIX }
IDRIS2_BOOT_PATH = " ${ PREFIX } /idris2-0.2.0/prelude: ${ PREFIX } /idris2-0.2.0/base: ${ PREFIX } /idris2-0.2.0/contrib: ${ PREFIX } /idris2-0.2.0/network "
2020-05-21 18:48:26 +03:00
NEWPREFIX = " `dirname $DIR ` "
IDRIS2_NEW_PATH = " ${ NEWPREFIX } /libs/prelude/build/ttc: ${ NEWPREFIX } /libs/base/build/ttc: ${ NEWPREFIX } /libs/network/build/ttc "
2020-05-19 23:05:52 +03:00
make libs SCHEME = ${ SCHEME } PREFIX = ${ PREFIX }
make install SCHEME = ${ SCHEME } PREFIX = ${ PREFIX }
2020-05-20 16:00:15 +03:00
make clean IDRIS2_BOOT = ${ PREFIX } /bin/idris2
make all IDRIS2_BOOT = ${ PREFIX } /bin/idris2 SCHEME = ${ SCHEME } IDRIS2_PATH = ${ IDRIS2_BOOT_PATH }
2020-05-21 18:48:26 +03:00
echo " Testing using libraries in ${ IDRIS2_NEW_PATH } "
2020-05-21 19:47:46 +03:00
make test INTERACTIVE = '' IDRIS2_PATH = ${ IDRIS2_NEW_PATH } SCHEME = ${ SCHEME } IDRIS2_LIBS = ${ PREFIX } /idris2-0.2.0/lib:${ PREFIX } /idris2-0.2.0/network/lib IDRIS2_DATA = ${ PREFIX } /idris2-0.2.0/support