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