build: Fix mescc installation on Debian.

* build-aux/pre-inst-env.in: Set bindir.
* scripts/mescc.in: Fix configure/prefix issues.
* mes/module/mes/boot-01.scm (integer->char): Remove.
(newline): Use "\n".
(%moduledir): Use string-append.
* mes/module/mes/boot-02.scm: Likewise.
* mes/module/mes/boot-0.scm: Likewise.
This commit is contained in:
Jan (janneke) Nieuwenhuizen 2019-02-13 22:26:52 +01:00 committed by Jan Nieuwenhuizen
parent 4a805ef8a1
commit fd63ef313e
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
6 changed files with 30 additions and 36 deletions

View File

@ -1,7 +1,7 @@
#! @BASH@ #! @BASH@
# GNU Mes --- Maxwell Equations of Software # GNU Mes --- Maxwell Equations of Software
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> # Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
# #
# This file is part of GNU Mes. # This file is part of GNU Mes.
# #
@ -40,6 +40,9 @@ export PATH
MES=${MES-${abs_top_builddir}/src/${program_prefix}mes} MES=${MES-${abs_top_builddir}/src/${program_prefix}mes}
export MES export MES
bindir=${abs_top_builddir}/scripts
export bindir
GUIX_PACKAGE_PATH="$abs_top_srcdir/guix${GUIX_PACKAGE_PATH:+:}$GUIX_PACKAGE_PATH" GUIX_PACKAGE_PATH="$abs_top_srcdir/guix${GUIX_PACKAGE_PATH:+:}$GUIX_PACKAGE_PATH"
export GUIX_PACKAGE_PATH export GUIX_PACKAGE_PATH

View File

@ -1,7 +1,7 @@
;;; -*-scheme-*- ;;; -*-scheme-*-
;;; GNU Mes --- Maxwell Equations of Software ;;; GNU Mes --- Maxwell Equations of Software
;;; Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; ;;;
;;; This file is part of GNU Mes. ;;; This file is part of GNU Mes.
;;; ;;;
@ -52,11 +52,8 @@
(if (null? rest) (core:write x) (if (null? rest) (core:write x)
(core:write-port x (car rest)))) (core:write-port x (car rest))))
(define (integer->char x)
(core:make-cell <cell:char> 0 x))
(define (newline . rest) (define (newline . rest)
(core:display (list->string (list (integer->char 10))))) (core:display "\n"))
(define (cadr x) (car (cdr x))) (define (cadr x) (car (cdr x)))
@ -142,11 +139,9 @@
(define %prefix (getenv "MES_PREFIX")) (define %prefix (getenv "MES_PREFIX"))
(define %moduledir (define %moduledir
(if (not %prefix) "mes/module/" (if (not %prefix) "mes/module/"
(list->string (string-append %prefix "/module/")))
(append (string->list %prefix) (string->list "/module/" )))))
(include (list->string (include (string-append %moduledir "mes/type-0.mes"))
(append2 (string->list %moduledir) (string->list "mes/type-0.mes"))))
(if (and (getenv "MES_DEBUG") (if (and (getenv "MES_DEBUG")
(not (equal2? (getenv "MES_DEBUG") "0")) (not (equal2? (getenv "MES_DEBUG") "0"))
@ -191,7 +186,7 @@
(mes-use-module (mes posix)) (mes-use-module (mes posix))
(define-macro (include-from-path file) (define-macro (include-from-path file)
(let loop ((path (cons* %moduledir "@srcdir@/module" (string-split (or (getenv "GUILE_LOAD_PATH")) #\:)))) (let loop ((path (cons* %moduledir "@srcdir@/module" (string-split (or (getenv "GUILE_LOAD_PATH") "") #\:))))
(cond ((and=> (getenv "MES_DEBUG") (compose (lambda (o) (> o 2)) string->number)) (cond ((and=> (getenv "MES_DEBUG") (compose (lambda (o) (> o 2)) string->number))
(core:display-error (string-append "include-from-path: " file " [PATH:" (string-join path ":") "]\n"))) (core:display-error (string-append "include-from-path: " file " [PATH:" (string-join path ":") "]\n")))
((and=> (getenv "MES_DEBUG") (compose (lambda (o) (> o 1)) string->number)) ((and=> (getenv "MES_DEBUG") (compose (lambda (o) (> o 1)) string->number))

View File

@ -1,5 +1,5 @@
;;; GNU Mes --- Maxwell Equations of Software ;;; GNU Mes --- Maxwell Equations of Software
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; ;;;
;;; This file is part of GNU Mes. ;;; This file is part of GNU Mes.
;;; ;;;
@ -42,11 +42,8 @@
(if (null? rest) (core:write x) (if (null? rest) (core:write x)
(core:write-port x (car rest)))) (core:write-port x (car rest))))
(define (integer->char x)
(core:make-cell <cell:char> 0 x))
(define (newline . rest) (define (newline . rest)
(core:display (list->string (list (integer->char 10))))) (core:display "\n"))
(define (cadr x) (car (cdr x))) (define (cadr x) (car (cdr x)))

View File

@ -1,7 +1,7 @@
;;; -*-scheme-*- ;;; -*-scheme-*-
;;; GNU Mes --- Maxwell Equations of Software ;;; GNU Mes --- Maxwell Equations of Software
;;; Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; ;;;
;;; This file is part of GNU Mes. ;;; This file is part of GNU Mes.
;;; ;;;
@ -52,11 +52,8 @@
(if (null? rest) (core:write x) (if (null? rest) (core:write x)
(core:write-port x (car rest)))) (core:write-port x (car rest))))
(define (integer->char x)
(core:make-cell <cell:char> 0 x))
(define (newline . rest) (define (newline . rest)
(core:display (list->string (list (integer->char 10))))) (core:display "\n"))
(define (cadr x) (car (cdr x))) (define (cadr x) (car (cdr x)))

View File

@ -1,7 +1,7 @@
;;; -*-scheme-*- ;;; -*-scheme-*-
;;; GNU Mes --- Maxwell Equations of Software ;;; GNU Mes --- Maxwell Equations of Software
;;; Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; ;;;
;;; This file is part of GNU Mes. ;;; This file is part of GNU Mes.
;;; ;;;
@ -52,11 +52,8 @@
(if (null? rest) (core:write x) (if (null? rest) (core:write x)
(core:write-port x (car rest)))) (core:write-port x (car rest))))
(define (integer->char x)
(core:make-cell <cell:char> 0 x))
(define (newline . rest) (define (newline . rest)
(core:display (list->string (list (integer->char 10))))) (core:display "\n"))
(define (cadr x) (car (cdr x))) (define (cadr x) (car (cdr x)))
@ -141,12 +138,10 @@
(define %prefix (getenv "MES_PREFIX")) (define %prefix (getenv "MES_PREFIX"))
(define %moduledir (define %moduledir
(if (not %prefix) "boe /share/mes/module/" (if (not %prefix) "mes/module/"
(list->string (string-append %prefix "/module/")))
(append (string->list %prefix) (string->list "/module/" )))))
(include (list->string (include (string-append %moduledir "mes/type-0.mes"))
(append2 (string->list %moduledir) (string->list "mes/type-0.mes"))))
(if (and (getenv "MES_DEBUG") (if (and (getenv "MES_DEBUG")
(not (equal2? (getenv "MES_DEBUG") "0")) (not (equal2? (getenv "MES_DEBUG") "0"))

View File

@ -1,7 +1,7 @@
#! @BASH@ #! @BASH@
# GNU Mes --- Maxwell Equations of Software # GNU Mes --- Maxwell Equations of Software
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> # Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
# #
# This file is part of GNU Mes. # This file is part of GNU Mes.
# #
@ -28,15 +28,22 @@ export MES_ARENA
MES_STACK=${MES_STACK-500000} MES_STACK=${MES_STACK-500000}
export MES_STACK export MES_STACK
MES_PREFIX=${MES_PREFIX-$prefix/share/mes} MES_PREFIX=${MES_PREFIX-/usr/share/mes}
export MES_PREFIX export MES_PREFIX
MES=${MES-src/mes} GUILE_LOAD_PATH=@guile_site_dir@${GUILE_LOAD_PATH+:}${GUILE_LOAD_PATH}
export GUILE_LOAD_PATH
MES=${MES-@prefix@/bin/mes}
bindir=${bindir-@prefix@/bin/mes}
if [ ! -f $bindir/mescc.scm ]; then
bindir=$(dirname $0)
fi
dir=$(dirname $0)
${SCHEME-$MES} \ ${SCHEME-$MES} \
--no-auto-compile\ --no-auto-compile\
-e main\ -e main\
-L @guile_site_dir@\ -L @guile_site_dir@\
-C @guile_site_ccache_dir@\ -C @guile_site_ccache_dir@\
$dir/mescc.scm "$@" $bindir/mescc.scm "$@"