2017-11-24 18:02:58 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
PREFIX=${PREFIX-usr}
|
|
|
|
MES_PREFIX=${MES_PREFIX-$PREFIX/share/mes}
|
|
|
|
MES_SEED=${MES_SEED-../mes-seed}
|
|
|
|
TINYCC_SEED=${TINYCC_SEED-../tinycc-seed}
|
|
|
|
|
|
|
|
mkdir -p $PREFIX/bin
|
2018-04-07 16:27:26 +00:00
|
|
|
cp src/mes $PREFIX/bin/mes
|
2017-11-24 18:02:58 +00:00
|
|
|
|
|
|
|
mkdir -p $PREFIX/lib
|
|
|
|
mkdir -p $MES_PREFIX/lib
|
|
|
|
cp $MES_SEED/crt1.M1 $MES_PREFIX/lib/crt1.M1
|
|
|
|
cp $MES_SEED/libc-mes.M1 $MES_PREFIX/lib/libc-mes.M1
|
2017-12-03 12:56:21 +00:00
|
|
|
cp $MES_SEED/libc+tcc-mes.M1 $MES_PREFIX/lib/libc+tcc-mes.M1
|
2017-11-24 18:02:58 +00:00
|
|
|
|
|
|
|
cp crt1.hex2 $MES_PREFIX/lib/crt1.hex2
|
|
|
|
cp libc-mes.hex2 $MES_PREFIX/lib/libc-mes.hex2
|
2017-12-03 12:56:21 +00:00
|
|
|
cp libc+tcc-mes.hex2 $MES_PREFIX/lib/libc+tcc-mes.hex2
|
2017-11-24 18:02:58 +00:00
|
|
|
|
|
|
|
cp scripts/mescc.mes $PREFIX/bin/mescc.mes
|
2018-04-08 15:01:59 +00:00
|
|
|
sed -e "s,@PREFIX@,$MES_PREFIX,g" \
|
|
|
|
scripts/mescc.mes > $PREFIX/bin/mescc.mes
|
|
|
|
sed -e "s,@PREFIX@,$MES_PREFIX,g" \
|
|
|
|
guile/mescc.scm > $PREFIX/bin/mescc.scm
|
2017-11-24 18:02:58 +00:00
|
|
|
|
|
|
|
mkdir -p $MES_PREFIX
|
|
|
|
tar -cf- doc guile include lib module scaffold stage0 | tar -xf- -C $MES_PREFIX
|