4203a427d0
* build-aux/config.sh: New file. * build-aux/trace.sh: New file. * build-aux/GNUmakefile.in: New file. * configure: Support srcdir configure. * GNUmakefile: Support srcdir build. * build-aux/build-cc.sh: Likewise. * build-aux/build-cc32.sh: Likewise. * build-aux/build-guile.sh: Likewise. * build-aux/build-mes.sh: Likewise. * build-aux/cc-mes.sh: Likewise. * build-aux/cc.sh: Likewise. * build-aux/cc32-mes.sh: Likewise. * build-aux/check-mes.sh: Likewise. * build-aux/check-mescc.sh: Likewise. * build-aux/export.make: Likewise. * build-aux/mes-snarf.scm: Likewise. * build-aux/pre-inst-env.in: Likewise. * build-aux/test.sh: Likewise. * build.sh: Likewise. * check.sh: Likewise. * install.sh: Likewise. * module/mescc/mescc.scm: Likewise. * scripts/mescc.in: Likewise. * src/mes.c: Likewise.
101 lines
2.8 KiB
Bash
Executable file
101 lines
2.8 KiB
Bash
Executable file
#! /bin/sh
|
|
|
|
set -e
|
|
|
|
VERSION=0.17
|
|
|
|
# parse --prefix=prefix
|
|
cmdline=$(echo "$@")
|
|
p=${cmdline##*--prefix=}
|
|
p=${p% *}
|
|
p=${p% -*}
|
|
prefix=${p-${prefix}}
|
|
if [ -z "$prefix" ]; then
|
|
prefix=/usr/local
|
|
fi
|
|
|
|
. build-aux/trace.sh
|
|
|
|
BASH=${BASH-$(command -v bash)}
|
|
GUILE=${GUILE-$(command -v guile)} || true
|
|
|
|
srcdir=${srcdir-.}
|
|
top_builddest=${top_builddest-}
|
|
top_builddir=${top_builddest-.}
|
|
abs_top_srcdir=${abs_top_srcdir-$PWD}
|
|
abs_top_builddir=${abs_top_srcdir-$abs_top_builddir}
|
|
|
|
if [ -z "$GUILE" -o "$GUILE" = true ]; then
|
|
GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-2.2}
|
|
else
|
|
GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-$(guile -c '(display (effective-version))')}
|
|
fi
|
|
datadir=${datadir-$prefix/share}
|
|
docdir=${docdir-$datadir/doc/mes-$VERSION}
|
|
infodir=${infodir-$datadir/info}
|
|
mandir=${mandir-$datadir/man}
|
|
moduledir=${moduledir-$datadir/mes/module}
|
|
guile_site_dir=${guile_site_dir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION}
|
|
guile_site_ccache_dir=${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache}
|
|
|
|
sed \
|
|
-e s,"@srcdir@,$srcdir,"\
|
|
-e s,"@abs_top_srcdir@,$abs_top_srcdir,"\
|
|
-e s,"@abs_top_builddir@,$abs_top_builddir,"\
|
|
-e s,"@top_builddir@,$top_builddir,"\
|
|
-e s,"@top_builddest@,$top_builddest,"\
|
|
-e s,"@BASH@,$BASH,"\
|
|
-e s,"@GUILE@,$GUILE,"\
|
|
-e s,"@guile_site_dir@,$guile_site_dir,"\
|
|
-e s,"@guile_site_ccache_dir@,$guile_site_ccache_dir,"\
|
|
-e s,"@VERSION@,$VERSION,"\
|
|
-e s,"mes/module/,$moduledir,"\
|
|
build-aux/pre-inst-env.in\
|
|
> pre-inst-env
|
|
|
|
chmod +x pre-inst-env
|
|
|
|
sed \
|
|
-e s,"@srcdir@,$srcdir,"\
|
|
-e s,"@abs_top_srcdir@,$abs_top_srcdir,"\
|
|
-e s,"@abs_top_builddir@,$abs_top_builddir,"\
|
|
-e s,"@top_builddir@,$top_builddir,"\
|
|
-e s,"@top_builddest@,$top_builddest,"\
|
|
-e s,"@BASH@,$BASH,"\
|
|
-e s,"@GUILE@,$GUILE,"\
|
|
-e s,"@guile_site_dir@,$guile_site_dir,"\
|
|
-e s,"@guile_site_ccache_dir@,$guile_site_ccache_dir,"\
|
|
-e s,"@VERSION@,$VERSION,"\
|
|
-e s,"mes/module/,$moduledir,"\
|
|
mes/module/mes/boot-0.scm.in\
|
|
> mes/module/mes/boot-0.scm
|
|
|
|
sed \
|
|
-e s,"@srcdir@,$srcdir,"\
|
|
-e s,"@abs_top_srcdir@,$abs_top_srcdir,"\
|
|
-e s,"@abs_top_builddir@,$abs_top_builddir,"\
|
|
-e s,"@top_builddir@,$top_builddir,"\
|
|
-e s,"@top_builddest@,$top_builddest,"\
|
|
-e s,"@BASH@,$BASH,"\
|
|
-e s,"@GUILE@,$GUILE,"\
|
|
-e s,"@guile_site_dir@,$guile_site_dir,"\
|
|
-e s,"@guile_site_ccache_dir@,$guile_site_ccache_dir,"\
|
|
-e s,"@VERSION@,$VERSION,"\
|
|
-e s,"mes/module/,$moduledir,"\
|
|
scripts/mescc.in\
|
|
> scripts/mescc
|
|
|
|
chmod +x scripts/mescc
|
|
|
|
if [ "$srcdir" != . ]; then
|
|
mkdir -p mes/module/mes
|
|
{ cd mes/module/mes; ln -sf $abs_top_srcdir/mes/module/mes/*.mes .; }
|
|
fi
|
|
|
|
cat <<EOF
|
|
Run:
|
|
prefix=$prefix ./build.sh to build mes
|
|
prefix=$prefix ./check.sh to check mes
|
|
prefix=$prefix ./install.sh to install mes
|
|
EOF
|