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-05-15 23:26:52 +02:00 committed by Jan Nieuwenhuizen
parent 9f4a4e47b2
commit e0eee55bf3
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@
# 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.
#
@ -40,6 +40,9 @@ export PATH
MES=${MES-${abs_top_builddir}/src/${program_prefix}mes}
export MES
bindir=${abs_top_builddir}/scripts
export bindir
GUIX_PACKAGE_PATH="$abs_top_srcdir/guix${GUIX_PACKAGE_PATH:+:}$GUIX_PACKAGE_PATH"
export GUIX_PACKAGE_PATH

View file

@ -1,7 +1,7 @@
;;; -*-scheme-*-
;;; 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.
;;;
@ -52,11 +52,8 @@
(if (null? rest) (core:write x)
(core:write-port x (car rest))))
(define (integer->char x)
(core:make-cell <cell:char> 0 x))
(define (newline . rest)
(core:display (list->string (list (integer->char 10)))))
(core:display "\n"))
(define (cadr x) (car (cdr x)))
@ -142,11 +139,9 @@
(define %prefix (getenv "MES_PREFIX"))
(define %moduledir
(if (not %prefix) "mes/module/"
(list->string
(append (string->list %prefix) (string->list "/module/" )))))
(string-append %prefix "/module/")))
(include (list->string
(append2 (string->list %moduledir) (string->list "mes/type-0.mes"))))
(include (string-append %moduledir "mes/type-0.mes"))
(if (and (getenv "MES_DEBUG")
(not (equal2? (getenv "MES_DEBUG") "0"))
@ -191,7 +186,7 @@
(mes-use-module (mes posix))
(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))
(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))

View file

@ -1,5 +1,5 @@
;;; 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.
;;;
@ -42,11 +42,8 @@
(if (null? rest) (core:write x)
(core:write-port x (car rest))))
(define (integer->char x)
(core:make-cell <cell:char> 0 x))
(define (newline . rest)
(core:display (list->string (list (integer->char 10)))))
(core:display "\n"))
(define (cadr x) (car (cdr x)))

View file

@ -1,7 +1,7 @@
;;; -*-scheme-*-
;;; 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.
;;;
@ -52,11 +52,8 @@
(if (null? rest) (core:write x)
(core:write-port x (car rest))))
(define (integer->char x)
(core:make-cell <cell:char> 0 x))
(define (newline . rest)
(core:display (list->string (list (integer->char 10)))))
(core:display "\n"))
(define (cadr x) (car (cdr x)))

View file

@ -1,7 +1,7 @@
;;; -*-scheme-*-
;;; 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.
;;;
@ -52,11 +52,8 @@
(if (null? rest) (core:write x)
(core:write-port x (car rest))))
(define (integer->char x)
(core:make-cell <cell:char> 0 x))
(define (newline . rest)
(core:display (list->string (list (integer->char 10)))))
(core:display "\n"))
(define (cadr x) (car (cdr x)))
@ -141,12 +138,10 @@
(define %prefix (getenv "MES_PREFIX"))
(define %moduledir
(if (not %prefix) "boe /share/mes/module/"
(list->string
(append (string->list %prefix) (string->list "/module/" )))))
(if (not %prefix) "mes/module/"
(string-append %prefix "/module/")))
(include (list->string
(append2 (string->list %moduledir) (string->list "mes/type-0.mes"))))
(include (string-append %moduledir "mes/type-0.mes"))
(if (and (getenv "MES_DEBUG")
(not (equal2? (getenv "MES_DEBUG") "0"))

View file

@ -1,7 +1,7 @@
#! @BASH@
# 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.
#
@ -28,15 +28,22 @@ export MES_ARENA
MES_STACK=${MES_STACK-500000}
export MES_STACK
MES_PREFIX=${MES_PREFIX-$prefix/share/mes}
MES_PREFIX=${MES_PREFIX-/usr/share/mes}
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} \
--no-auto-compile\
-e main\
-L @guile_site_dir@\
-C @guile_site_ccache_dir@\
$dir/mescc.scm "$@"
$bindir/mescc.scm "$@"