build: Use GNU style lower case directory configure variable naming.
* GNUmakefile: Use GNU style lower case directory configure variable naming. * HACKING: Likewise. * INSTALL: Likewise. * build-aux/build-cc.sh: Likewise. * build-aux/build-cc32.sh: Likewise. * build-aux/cc-mes.sh: Likewise. * build-aux/cc.sh: Likewise. * build-aux/cc32-mes.sh: Likewise. * build-aux/export.make: Likewise. * build-aux/setup-mes.sh: Likewise. * build.sh: Likewise. * check.sh: Likewise. * configure: Likewise. * doc/mes.texi: Likewise. * install.sh: Likewise. * scripts/mescc: Likewise.
This commit is contained in:
parent
69813a6da3
commit
ec7d9f5d57
|
@ -21,7 +21,7 @@ GUILE_FLAGS:=--no-auto-compile -L . -L guile -C . -C guile
|
|||
include .config.make
|
||||
|
||||
.config.make:
|
||||
./configure --prefix=$(PREFIX)
|
||||
./configure --prefix=$(prefix)
|
||||
|
||||
PHONY_TARGETS:= all all-go build check clean clean-go default doc help install install-info man\
|
||||
cc mes mes-gcc mes-tcc
|
||||
|
@ -140,8 +140,8 @@ Targets:
|
|||
clean run git clean -dfx
|
||||
clean-go clean .go files
|
||||
info update info documentation
|
||||
install install in $(PREFIX)
|
||||
install-info install info docs in $(PREFIX)/share/info
|
||||
install install in $(prefix)
|
||||
install-info install info docs in $(prefix)/share/info
|
||||
seed update mes-seed in $(MES_SEED)
|
||||
endef
|
||||
export HELP_TOP
|
||||
|
|
2
HACKING
2
HACKING
|
@ -25,7 +25,7 @@ To help development we assume ./configure sets these variables for make
|
|||
HEX2 -- hex2
|
||||
MES -- unset
|
||||
M1 -- M1
|
||||
PREFIX -- ""
|
||||
prefix -- ""
|
||||
|
||||
Mes is supposed to serve as a full equivalent for Guile, however Mes
|
||||
~30 times slower than Guile. That's why we usually don't use Mes
|
||||
|
|
2
INSTALL
2
INSTALL
|
@ -51,7 +51,7 @@ https://gitlab.com/janneke/guix/blob/wip-bootstrap/gnu/packages/mes.scm
|
|||
- [[https://github.com/oriansj/mescc-tools][mes-seed]], 0.15 is known to work.
|
||||
|
||||
** Build it
|
||||
<setup environment, e.g. PREFIX, MES_SEED>
|
||||
<setup environment, e.g. prefix, MES_SEED>
|
||||
|
||||
./build.sh
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@ CFLAGS=${CFLAGS-"
|
|||
|
||||
CPPFLAGS=${CPPFLAGS-"
|
||||
-D VERSION=\"$VERSION\"
|
||||
-D MODULEDIR=\"$MODULEDIR\"
|
||||
-D PREFIX=\"$PREFIX\"
|
||||
-D MODULEDIR=\"$moduledir\"
|
||||
-D PREFIX=\"$prefix\"
|
||||
-I src
|
||||
-I lib
|
||||
-I include
|
||||
|
|
|
@ -24,7 +24,7 @@ if [ -n "$BUILD_DEBUG" ]; then
|
|||
set -x
|
||||
fi
|
||||
|
||||
MODULEDIR=${MODULEDIR-${DATADIR}${DATADIR:+/}module}
|
||||
moduledir=${moduledir-${datadir}${datadir:+/}module}
|
||||
export CC32 TCC CPPFLAGS C32FLAGS
|
||||
|
||||
CC32=${CC32-$(command -v i686-unknown-linux-gnu-gcc)}
|
||||
|
@ -46,8 +46,8 @@ build-aux/mes-snarf.scm src/vector.c
|
|||
|
||||
CPPFLAGS=${CPPFLAGS-"
|
||||
-D VERSION=\"$VERSION\"
|
||||
-D MODULEDIR=\"$MODULEDIR\"
|
||||
-D PREFIX=\"$PREFIX\"
|
||||
-D MODULEDIR=\"$moduledir\"
|
||||
-D PREFIX=\"$prefix\"
|
||||
-I src
|
||||
-I lib
|
||||
-I include
|
||||
|
|
|
@ -106,7 +106,6 @@ fi
|
|||
|
||||
ARCHDIR=1 NOLINK=1 bash build-aux/cc-mes.sh lib/crt0
|
||||
ARCHDIR=1 NOLINK=1 bash build-aux/cc-mes.sh lib/crt1
|
||||
ARCHDIR=1 NOLINK=1 bash build-aux/cc-mes.sh lib/crt1
|
||||
ARCHDIR=1 NOLINK=1 bash build-aux/cc-mes.sh lib/crti
|
||||
ARCHDIR=1 NOLINK=1 bash build-aux/cc-mes.sh lib/crtn
|
||||
ARCHDIR=1 NOLINK=1 bash build-aux/cc-mes.sh lib/libc-mini
|
||||
|
|
|
@ -35,8 +35,8 @@ MES=${MES-$(command -v mes)}
|
|||
|
||||
CPPFLAGS=${CPPFLAGS-"
|
||||
-D VERSION=\"$VERSION\"
|
||||
-D MODULEDIR=\"$MODULEDIR\"
|
||||
-D PREFIX=\"$PREFIX\"
|
||||
-D MODULEDIR=\"$moduledir\"
|
||||
-D PREFIX=\"$prefix\"
|
||||
-I src
|
||||
-I lib
|
||||
-I include
|
||||
|
|
|
@ -26,8 +26,8 @@ fi
|
|||
|
||||
CPPFLAGS=${CPPFLAGS-"
|
||||
-D VERSION=\"$VERSION\"
|
||||
-D MODULEDIR=\"$MODULEDIR\"
|
||||
-D PREFIX=\"$PREFIX\"
|
||||
-D MODULEDIR=\"$moduledir\"
|
||||
-D PREFIX=\"$prefix\"
|
||||
-I src
|
||||
-I lib
|
||||
-I include
|
||||
|
|
|
@ -26,8 +26,8 @@ fi
|
|||
|
||||
CPPFLAGS=${CPPFLAGS-"
|
||||
-D VERSION=\"$VERSION\"
|
||||
-D MODULEDIR=\"$MODULEDIR\"
|
||||
-D PREFIX=\"$PREFIX\"
|
||||
-D MODULEDIR=\"$moduledir\"
|
||||
-D PREFIX=\"$prefix\"
|
||||
-I src
|
||||
-I lib
|
||||
-I include
|
||||
|
|
|
@ -1,9 +1,21 @@
|
|||
ifdef BUILD_DEBUG
|
||||
export BUILD_DEBUG
|
||||
endif
|
||||
|
||||
ifdef DESTDIR
|
||||
export DESTDIR
|
||||
endif
|
||||
|
||||
ifdef PREFIX
|
||||
export PREFIX
|
||||
ifdef prefix
|
||||
export prefix
|
||||
endif
|
||||
|
||||
ifdef infodir
|
||||
export infodir
|
||||
endif
|
||||
|
||||
ifdef mandir
|
||||
export mandir
|
||||
endif
|
||||
|
||||
ifdef VERSION
|
||||
|
|
|
@ -10,10 +10,10 @@ mkdir -p src
|
|||
cd src
|
||||
|
||||
GUILE_EFFECTIVE_VERSION=2.2
|
||||
GUILE_SITE_DIR=/usr/local/share/guile/site/$GUILE_EFFECTIVE_VERSION
|
||||
GUILE_SITE_CCACHE_DIR=/usr/local/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache
|
||||
GUILE_LOAD_PATH=$GUILE_SITE_DIR
|
||||
GUILE_LOAD_COMPILED_PATH=$GUILE_SITE_CCACHE_DIR
|
||||
guile_site_dir=/usr/local/share/guile/site/$GUILE_EFFECTIVE_VERSION
|
||||
guile_site_ccache_dir=/usr/local/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache
|
||||
GUILE_LOAD_PATH=$guile_site_dir
|
||||
GUILE_LOAD_COMPILED_PATH=$guile_site_ccache_dir
|
||||
export GUILE_LOAD_PATH
|
||||
export GUILE_LOAD_COMPILED_PATH
|
||||
|
||||
|
|
12
build.sh
12
build.sh
|
@ -23,9 +23,9 @@ if [ -n "$BUILD_DEBUG" ]; then
|
|||
fi
|
||||
|
||||
# dash does not export foo=${foo-bar} for some values
|
||||
export prefix datadir moduledir
|
||||
export CC CC32 TCC GUILE MESCC MES_SEED
|
||||
export MES_ARENA MES_DEBUG
|
||||
export PREFIX DATADIR MODULEDIR
|
||||
export CPPFLAGS CFLAGS C32FLAGS MESCCFLAGS
|
||||
export BUILD_DEBUG
|
||||
|
||||
|
@ -37,15 +37,15 @@ GUILE=${GUILE-$(command -v guile)}
|
|||
MES_ARENA=${MES_ARENA-100000000}
|
||||
MES_DEBUG=${MES_DEBUG-1}
|
||||
|
||||
PREFIX=${PREFIX-/usr/local}
|
||||
DATADIR=${DATADIR-$PREFIX/share/mes}
|
||||
MODULEDIR=${MODULEDIR-${DATADIR}${DATADIR:+/}module}
|
||||
prefix=${prefix-/usr/local}
|
||||
datadir=${datadir-$prefix/share/mes}
|
||||
moduledir=${moduledir-${datadir}${datadir:+/}module}
|
||||
set -e
|
||||
|
||||
CPPFLAGS=${CPPFLAGS-"
|
||||
-D VERSION=\"$VERSION\"
|
||||
-D MODULEDIR=\"$MODULEDIR\"
|
||||
-D PREFIX=\"$PREFIX\"
|
||||
-D MODULEDIR=\"$moduledir\"
|
||||
-D PREFIX=\"$prefix\"
|
||||
-I src
|
||||
-I lib
|
||||
-I include
|
||||
|
|
2
check.sh
2
check.sh
|
@ -28,7 +28,7 @@ CC32=${CC32-$(command -v i686-unknown-linux-gnu-gcc)}
|
|||
GUILE=${GUILE-guile}
|
||||
MES=${MES-src/mes}
|
||||
MES_ARENA=${MES_ARENA-100000000}
|
||||
PREFIX=
|
||||
prefix=
|
||||
|
||||
if ! command -v $GUILE > /dev/null; then
|
||||
GUILE=true
|
||||
|
|
63
configure
vendored
63
configure
vendored
|
@ -59,10 +59,13 @@ exec ${GUILE-guile} -L . --no-auto-compile -e '(configure)' -s "$0" ${1+"$@"}
|
|||
(define *shell* "sh")
|
||||
(define PACKAGE "mes")
|
||||
(define VERSION "0.16")
|
||||
(define PREFIX "/usr/local")
|
||||
(define GUILE_EFFECTIVE_VERSION (effective-version))
|
||||
(define GUILE (or (getenv "guile") "guile"))
|
||||
(define SYSCONFDIR "$(PREFIX)/etc")
|
||||
(define GUILE_EFFECTIVE_VERSION (effective-version))
|
||||
|
||||
(define prefix "/usr/local")
|
||||
(define infodir "${prefix}/share/info")
|
||||
(define mandir "${prefix}/share/man")
|
||||
(define sysconfdir "${prefix}/etc")
|
||||
|
||||
;;; Utility
|
||||
(define (logf port string . rest)
|
||||
|
@ -189,8 +192,21 @@ exec ${GUILE-guile} -L . --no-auto-compile -e '(configure)' -s "$0" ${1+"$@"}
|
|||
(sysconfdir (value #t))
|
||||
(verbose (single-char #\v))
|
||||
(with-courage)
|
||||
;;ignore
|
||||
(enable-fast-install))))
|
||||
(infodir (value #t))
|
||||
(mandir (value #t))
|
||||
(disable-silent-rules)
|
||||
|
||||
(enable-fast-install) ; Ignored for Guix
|
||||
(includedir (value #t)) ; Ignored for Debian
|
||||
(mandir (value #t)) ; Ignored for Debian
|
||||
(localstatedir (value #t)) ; Ignored for Debian
|
||||
(libdir (value #t)) ; Ignored for Debian
|
||||
(libexecdir (value #t)) ; Ignored for Debian
|
||||
(runstatedir (value #t)) ; Ignored for Debian
|
||||
(disable-maintainer-mode) ; Ignored for Debian
|
||||
(disable-dependency-tracking) ; Ignored for Debian
|
||||
)))
|
||||
|
||||
(getopt-long args option-spec)))
|
||||
|
||||
(define* (print-help #:optional (port (current-output-port)))
|
||||
|
@ -207,13 +223,29 @@ Defaults for the options are specified in brackets.
|
|||
Options:
|
||||
-h, --help display this help
|
||||
--build=BUILD configure for building on BUILD [guessed]
|
||||
--disable-silent-rules
|
||||
verbose build output [BUILD_DEBUG=1]
|
||||
--host=HOST cross-compile to build programs to run on HOST [BUILD]
|
||||
-v, --verbose be verbose
|
||||
--with-courage assert being courageous to configure for unsupported platform
|
||||
|
||||
Installation directories:
|
||||
--prefix=DIR install in PREFIX [~a]
|
||||
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
||||
--prefix=DIR install in prefix DIR [~a]
|
||||
--infodir=DIR info documentation [PREFIX/share/info]
|
||||
--mandir=DIR man pages [PREFIX/share/man]
|
||||
|
||||
Ignored for Guix:
|
||||
--enable-fast-install
|
||||
|
||||
Ignored for Debian:
|
||||
--disable-dependency-tracking
|
||||
--disable-maintainer-mode
|
||||
--includedir=DIR
|
||||
--libdir=DIR
|
||||
--libexecdir=DIR
|
||||
--localstatedir=DIR
|
||||
--mandir=DIR
|
||||
--runstatedir=DIR
|
||||
|
||||
Some influential environment variables:
|
||||
CC C compiler command
|
||||
|
@ -226,7 +258,7 @@ Some influential environment variables:
|
|||
MESCC_TOOLS_SEED location of mescc-tools-seed
|
||||
TCC tcc C compiler command
|
||||
TINYCC_SEED location of tinycc-seed
|
||||
" PACKAGE VERSION (getenv "PREFIX")))
|
||||
" PACKAGE VERSION (getenv "prefix")))
|
||||
|
||||
(define (main args)
|
||||
(let* ((CC (or (getenv "CC") "gcc"))
|
||||
|
@ -235,10 +267,12 @@ Some influential environment variables:
|
|||
(options (parse-opts args))
|
||||
(build-triplet (option-ref options 'build BUILD_TRIPLET))
|
||||
(host-triplet (option-ref options 'host BUILD_TRIPLET))
|
||||
(prefix (option-ref options 'prefix PREFIX))
|
||||
(sysconfdir (option-ref options 'sysconfdir SYSCONFDIR))
|
||||
(prefix (option-ref options 'prefix prefix))
|
||||
(infodir (option-ref options 'infodir infodir))
|
||||
(sysconfdir (option-ref options 'sysconfdir sysconfdir))
|
||||
(verbose? (option-ref options 'verbose #f))
|
||||
(with-courage? (option-ref options 'with-courage #f))
|
||||
(disable-silent-rules? (option-ref options 'disable-silent-rules #f))
|
||||
(make? #f)
|
||||
(vars (filter (cut string-index <> #\=) (option-ref options '() '())))
|
||||
(help? (option-ref options 'help #f)))
|
||||
|
@ -305,6 +339,11 @@ Some influential environment variables:
|
|||
(stdout "build:=~a\n" build-triplet)
|
||||
(stdout "host:=~a\n" host-triplet)
|
||||
(stdout "srcdir:=.\n")
|
||||
(stdout "prefix:=~a\n" (gulp-pipe (string-append "echo " prefix)))
|
||||
(stdout "infodir:=~a\n" infodir)
|
||||
(stdout "mandir:=~a\n" mandir)
|
||||
(stdout "sysconfdir:=~a\n" sysconfdir)
|
||||
|
||||
(stdout "ARCH:=~a\n" ARCH)
|
||||
(stdout "CC:=~a\n" (or CC ""))
|
||||
(stdout "CC32:=~a\n" (or CC32 ""))
|
||||
|
@ -324,8 +363,8 @@ Some influential environment variables:
|
|||
(stdout "HEX2:=~a\n" (or HEX2 ""))
|
||||
(stdout "PACKAGE:=~a\n" PACKAGE)
|
||||
(stdout "VERSION:=~a\n" VERSION)
|
||||
(stdout "PREFIX:=~a\n" (gulp-pipe (string-append "echo " prefix)))
|
||||
(stdout "SYSCONFDIR:=~a\n" sysconfdir)
|
||||
(when disable-silent-rules?
|
||||
(stdout "BUILD_DEBUG:=1\n"))
|
||||
(when CFLAGS (stdout "CFLAGS:=~a\n" CFLAGS))
|
||||
(when C32FLAGS (stdout "C32FLAGS:=~a\n" C32FLAGS))
|
||||
(when HEX2FLAGS (stdout "HEX2FLAGS:=~a\n" HEX2FLAGS))
|
||||
|
|
|
@ -340,7 +340,7 @@ package. The bootstrap build procedure for Mes is similar to building
|
|||
GNU software and goes like this
|
||||
|
||||
@example
|
||||
export PREFIX=/usr/local # for example
|
||||
export prefix=/usr/local # for example
|
||||
export MES_SEED=../mes # for example
|
||||
# optionally set some other environment variables
|
||||
sh build.sh
|
||||
|
|
84
install.sh
84
install.sh
|
@ -9,71 +9,73 @@ fi
|
|||
[ -n "$BASH" ] && set -o pipefail
|
||||
|
||||
SHELL=${SHELL-$(command -v sh)}
|
||||
PREFIX=${PREFIX-/usr/local}
|
||||
MES_PREFIX=${MES_PREFIX-$PREFIX/share/mes}
|
||||
MES_SEED=${MES_SEED-../mes-seed}
|
||||
TINYCC_SEED=${TINYCC_SEED-../tinycc-seed}
|
||||
prefix=${prefix-/usr/local}
|
||||
|
||||
mkdir -p $DESTDIR$PREFIX/bin
|
||||
cp src/mes $DESTDIR$PREFIX/bin/mes
|
||||
MES_PREFIX=${MES_PREFIX-$prefix/share/mes}
|
||||
MES_SEED=${MES_SEED-../MES-SEED}
|
||||
TINYCC_SEED=${TINYCC_SEED-../TINYCC-SEED}
|
||||
|
||||
mkdir -p $DESTDIR$PREFIX/lib
|
||||
mkdir -p $DESTDIR$prefix/bin
|
||||
cp src/mes $DESTDIR$prefix/bin/mes
|
||||
|
||||
mkdir -p $DESTDIR$prefix/lib
|
||||
mkdir -p $DESTDIR$MES_PREFIX/lib
|
||||
cp scripts/mescc $DESTDIR$PREFIX/bin/mescc
|
||||
cp scripts/mescc $DESTDIR$prefix/bin/mescc
|
||||
|
||||
mkdir -p $DESTDIR$MES_PREFIX
|
||||
tar -cf- doc guile include lib module scaffold | tar -xf- -C $DESTDIR$MES_PREFIX
|
||||
|
||||
GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-2.2}
|
||||
DATADIR=${MODULEDIR-$PREFIX/share/mes}
|
||||
DOCDIR=${MODULEDIR-$PREFIX/share/doc/mes}
|
||||
MODULEDIR=${MODULEDIR-$DATADIR/module}
|
||||
GUILEDIR=${MODULEDIR-$PREFIX/share/guile/site/$GUILE_EFFECTIVE_VERSION}
|
||||
GODIR=${GODIR-$PREFIX/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache}
|
||||
DOCDIR=${MODULEDIR-$PREFIX/share/doc/mes}
|
||||
datadir=${moduledir-$prefix/share/mes}
|
||||
docdir=${moduledir-$prefix/share/doc/mes}
|
||||
mandir=${mandir-$prefix/share/man}
|
||||
moduledir=${moduledir-$datadir/module}
|
||||
guile_site_dir=${moduledir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION}
|
||||
guile_site_ccache_dir=${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache}
|
||||
docdir=${moduledir-$prefix/share/doc/mes}
|
||||
|
||||
chmod +w $DESTDIR$PREFIX/bin/mescc
|
||||
chmod +w $DESTDIR$prefix/bin/mescc
|
||||
sed \
|
||||
-e "s,^#! /bin/sh,#! $SHELL," \
|
||||
-e "s,module/,$MODULEDIR/," \
|
||||
-e "s,@DATADIR@,$DATADIR,g" \
|
||||
-e "s,@DOCDIR@,$DOCDIR,g" \
|
||||
-e "s,@GODIR@,$GODIR,g" \
|
||||
-e "s,@GUILEDIR@,$GUILEDIR,g" \
|
||||
-e "s,@MODULEDIR@,$MODULEDIR,g" \
|
||||
-e "s,@PREFIX@,$PREFIX,g" \
|
||||
-e "s,module/,$moduledir/," \
|
||||
-e "s,@datadir@,$datadir,g" \
|
||||
-e "s,@docdir@,$docdir,g" \
|
||||
-e "s,@guile_site_ccache_dir@,$guile_site_ccache_dir,g" \
|
||||
-e "s,@guile_site_dir@,$guile_site_dir,g" \
|
||||
-e "s,@moduledir@,$moduledir,g" \
|
||||
-e "s,@prefix@,$prefix,g" \
|
||||
-e "s,@VERSION@,$VERSION,g" \
|
||||
scripts/mescc > $DESTDIR$PREFIX/bin/mescc
|
||||
chmod +w $DESTDIR$MODULEDIR/mes/boot-0.scm
|
||||
scripts/mescc > $DESTDIR$prefix/bin/mescc
|
||||
chmod +w $DESTDIR$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" \
|
||||
-e "s,@GODIR@,$GODIR,g" \
|
||||
-e "s,@GUILEDIR@,$GUILEDIR,g" \
|
||||
-e "s,@MODULEDIR@,$MODULEDIR,g" \
|
||||
-e "s,@PREFIX@,$PREFIX,g" \
|
||||
-e "s,module/,$moduledir/," \
|
||||
-e "s,@datadir@,$datadir,g" \
|
||||
-e "s,@docdir@,$docdir,g" \
|
||||
-e "s,@guile_site_ccache_dir@,$guile_site_ccache_dir,g" \
|
||||
-e "s,@guile_site_dir@,$guile_site_dir,g" \
|
||||
-e "s,@moduledir@,$moduledir,g" \
|
||||
-e "s,@prefix@,$prefix,g" \
|
||||
-e "s,@VERSION@,$VERSION,g" \
|
||||
module/mes/boot-0.scm > $DESTDIR$MODULEDIR/mes/boot-0.scm
|
||||
module/mes/boot-0.scm > $DESTDIR$moduledir/mes/boot-0.scm
|
||||
|
||||
sed \
|
||||
-e "s,^#! /bin/sh,#! $SHELL," \
|
||||
scripts/diff.scm > $DESTDIR$PREFIX/bin/diff.scm
|
||||
chmod -w+x $DESTDIR$PREFIX/bin/diff.scm
|
||||
scripts/diff.scm > $DESTDIR$prefix/bin/diff.scm
|
||||
chmod -w+x $DESTDIR$prefix/bin/diff.scm
|
||||
|
||||
if [ -f doc/mes.info ]; then
|
||||
mkdir -p $DESTDIR$PREFIX/share/info
|
||||
install-info --info-dir=$DESTDIR$PREFIX/share/info doc/mes.info
|
||||
tar -cf- doc/mes.info* | tar -xf- --strip-components=1 -C $DESTDIR$PREFIX/share/info
|
||||
mkdir -p $DESTDIR$prefix/share/info
|
||||
install-info --info-dir=$DESTDIR$prefix/share/info doc/mes.info
|
||||
tar -cf- doc/mes.info* | tar -xf- --strip-components=1 -C $DESTDIR$prefix/share/info
|
||||
fi
|
||||
|
||||
if [ -f doc/mes.1 ]; then
|
||||
mkdir -p $DESTDIR$PREFIX/man/man1
|
||||
cp doc/mes.1 $DESTDIR$PREFIX/man/man1/
|
||||
mkdir -p $DESTDIR$mandir/man1
|
||||
cp doc/mes.1 $DESTDIR$mandir/man1/
|
||||
fi
|
||||
|
||||
if [ -f doc/mescc.1 ]; then
|
||||
mkdir -p $DESTDIR$PREFIX/man/man1
|
||||
cp doc/mescc.1 $DESTDIR$PREFIX/man/man1/
|
||||
mkdir -p $DESTDIR$mandir/man1
|
||||
cp doc/mescc.1 $DESTDIR$mandir/man1/
|
||||
fi
|
||||
|
|
|
@ -3,23 +3,24 @@
|
|||
if [ -n "$BUILD_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
PREFIX=${PREFIX-@PREFIX@}
|
||||
if [ "@PREFIX@" = @PREFIX""@ -o ! -d "$PREFIX/share/mes/module" ]
|
||||
prefix=${prefix-@prefix@}
|
||||
if [ "@prefix@" = @prefix""@ -o ! -d "$prefix/share/mes/module" ]
|
||||
then
|
||||
MES_PREFIX=${MES_PREFIX-$(cd $(dirname $0)/.. && pwd)}
|
||||
else
|
||||
MES_PREFIX=${MES_PREFIX-$PREFIX/share/mes}
|
||||
MES_PREFIX=${MES_PREFIX-$prefix/share/mes}
|
||||
fi
|
||||
export MES_PREFIX
|
||||
mes_p=$(command -v mes)
|
||||
if [ '(' -z "$mes_p" -a -z "$MES" ')' -o "$MES" = "guile" -o "$MES" = "mes.guile" ]; then
|
||||
GODIR=${GODIR-@GODIR@}
|
||||
GUILEDIR=${GUILEDIR-@GUILEDIR@}
|
||||
[ "$GODIR" = @"GODIR"@ ] && GODIR=$(dirname $0)/../guile
|
||||
[ "$GUILEDIR" = @"GUILEDIR"@ ] && GUILEDIR=$(dirname $0)/../guile
|
||||
export GUILE_AUTO_COMPILE=${GUILE_AUTO_COMPILE-0}
|
||||
GUILE_LOAD_COMPILED_PATH=$GODIR:$GUILE_LOAD_COMPILED_PATH
|
||||
exec ${GUILE-guile} -L $GUILEDIR -e '(mescc)' -s "$0" "$@"
|
||||
guile_site_ccache_dir=${guile_site_ccache_dir-@guile_site_ccache_dir@}
|
||||
guile_site_dir=${guile_site_dir-@guile_site_dir@}
|
||||
[ "$guile_site_ccache_dir" = @"guile_site_ccache_dir"@ ] && guile_site_ccache_dir=$(dirname $0)/../guile
|
||||
[ "$guile_site_dir" = @"guile_site_dir"@ ] && guile_site_dir=$(dirname $0)/../guile
|
||||
GUILE_AUTO_COMPILE=${GUILE_AUTO_COMPILE-0}
|
||||
export GUILE_AUTO_COMPILE
|
||||
GUILE_LOAD_COMPILED_PATH=$guile_site_ccache_dir:$GUILE_LOAD_COMPILED_PATH
|
||||
exec ${GUILE-guile} -L $guile_site_dir -e '(mescc)' -s "$0" "$@"
|
||||
else
|
||||
MES=${MES-$(dirname $0)/mes}
|
||||
exec ${MES-mes} -e '(mescc)' -s $0 "$@"
|
||||
|
@ -51,9 +52,9 @@ fi
|
|||
#:export (main))
|
||||
|
||||
(define %prefix (or (getenv "MES_PREFIX")
|
||||
(if (string-prefix? "@PREFIX" "@PREFIX@")
|
||||
(if (string-prefix? "@prefix" "@prefix@")
|
||||
""
|
||||
"@PREFIX@/share/mes")))
|
||||
"@prefix@/share/mes")))
|
||||
|
||||
(define %version (if (string-prefix? "@VERSION" "@VERSION@") "git"
|
||||
"@VERSION@"))
|
||||
|
|
Loading…
Reference in a new issue