build: Install naive diff.

* scripts/diff.scm: Move from build-aux.
* install.sh: Install it.
* build-aux/tests.sh: Update location.
This commit is contained in:
Jan Nieuwenhuizen 2018-05-23 06:54:33 +02:00
parent c6d666bd67
commit a4110e55bb
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
4 changed files with 14 additions and 3 deletions

View File

@ -22,7 +22,7 @@ set -x
GUILE=${GUILE-$MES}
DIFF=${DIFF-$(command -v diff)}
[ -z "$DIFF" ] && DIFF="sh build-aux/diff.scm"
[ -z "$DIFF" ] && DIFF="sh scripts/diff.scm"
t=${1-scaffold/tests/t}
rm -f "$t".mes-out

View File

@ -3,6 +3,7 @@
set -e
export PREFIX
SHELL=${SHELL-$(command -v sh)}
PREFIX=${PREFIX-/usr/local}
MES_PREFIX=${MES_PREFIX-$PREFIX/share/mes}
MES_SEED=${MES_SEED-../mes-seed}
@ -28,6 +29,7 @@ DOCDIR=${MODULEDIR-$PREFIX/share/doc/mes}
chmod +w $PREFIX/bin/mescc
sed \
-e "s,^#! /bin/sh,#! $SHELL/," \
-e "s,module/,$MODULEDIR/," \
-e "s,@DATADIR@,$DATADIR,g" \
-e "s,@DOCDIR@,$DOCDIR,g" \
@ -39,6 +41,7 @@ sed \
scripts/mescc > $PREFIX/bin/mescc
chmod +w $MODULEDIR/mes/boot-0.scm
sed \
-e "s,^#! /bin/sh,#! $SHELL/," \
-e "s,module/,$MODULEDIR/," \
-e "s,@DATADIR@,$DATADIR,g" \
-e "s,@DOCDIR@,$DOCDIR,g" \
@ -48,3 +51,8 @@ sed \
-e "s,@PREFIX@,$PREFIX,g" \
-e "s,@VERSION@,$VERSION,g" \
module/mes/boot-0.scm > $MODULEDIR/mes/boot-0.scm
cp scripts/diff.scm $PREFIX/bin/diff.scm
sed \
-e "s,^#! /bin/sh,#! $SHELL/," \
scripts/diff.scm > $PREFIX/bin/diff.scm

View File

@ -1,6 +1,10 @@
#! /bin/sh
# -*-scheme-*-
exec ${GUILE-guile} -L $(dirname 0) -e '(diff)' -s "$0" "$@"
mes_p=$(command -v mes)
if [ "$mes_p" -a -z "$MES" ]; then
MES=guile
fi
exec ${MES-mes} -L $(dirname 0) -e '(diff)' -s "$0" "$@"
!#
;;; Mes --- Maxwell Equations of Software

View File

@ -1 +0,0 @@
../src/mes.gcc