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-18 18:15:02 +03:00
mkdir -p ../build/exec/idris2sh_app
2020-05-18 18:02:30 +03:00
install idris2-boot ../build/exec/idris2sh
2020-05-18 20:02:56 +03:00
install idris2sh_app/* ../build/exec/idris2sh_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-19 23:05:52 +03:00
make libs SCHEME = ${ SCHEME } PREFIX = ${ PREFIX }
make install SCHEME = ${ SCHEME } PREFIX = ${ PREFIX }
2020-05-20 02:03:39 +03:00
make clean IDRIS2_BOOT = ${ PREFIX } /bin/idris2sh
2020-05-19 23:39:36 +03:00
make all IDRIS2_BOOT = ${ PREFIX } /bin/idris2sh SCHEME = ${ SCHEME } IDRIS2_PATH = ${ IDRIS2_BOOT_PATH }
2020-05-20 13:12:54 +03:00
make test INTERACTIVE = '' IDRIS2_BOOT = ${ PREFIX } /bin/idris2sh SCHEME = ${ SCHEME } IDRIS2_PATH = ${ IDRIS2_BOOT_PATH } IDRIS2_LIBS = ${ PREFIX } /idris2-0.2.0/lib IDRIS2_DATA = ${ PREFIX } /idris2-0.2.0/support