From a4110e55bb05ec4e2b034417df4eb75375fdfeb9 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Wed, 23 May 2018 06:54:33 +0200 Subject: [PATCH] build: Install naive diff. * scripts/diff.scm: Move from build-aux. * install.sh: Install it. * build-aux/tests.sh: Update location. --- build-aux/test.sh | 2 +- install.sh | 8 ++++++++ {build-aux => scripts}/diff.scm | 6 +++++- scripts/mes | 1 - 4 files changed, 14 insertions(+), 3 deletions(-) rename {build-aux => scripts}/diff.scm (97%) delete mode 120000 scripts/mes diff --git a/build-aux/test.sh b/build-aux/test.sh index 023a4dd0..af8bc491 100755 --- a/build-aux/test.sh +++ b/build-aux/test.sh @@ -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 diff --git a/install.sh b/install.sh index b3036ab0..102fc00c 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/build-aux/diff.scm b/scripts/diff.scm similarity index 97% rename from build-aux/diff.scm rename to scripts/diff.scm index 68acdcba..d8ade78f 100755 --- a/build-aux/diff.scm +++ b/scripts/diff.scm @@ -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 diff --git a/scripts/mes b/scripts/mes deleted file mode 120000 index 2e8dd05b..00000000 --- a/scripts/mes +++ /dev/null @@ -1 +0,0 @@ -../src/mes.gcc \ No newline at end of file -- 2.31.1