From: Taylor R Campbell Date: Fri, 11 Jan 2019 04:50:02 +0000 (+0000) Subject: Tweaks to make Edwin cross-compilable. X-Git-Tag: mit-scheme-pucked-10.1.10~6^2~48 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=07fe9c2cb0e7c4c90a62ba90884e0e17e923ee0c;p=mit-scheme.git Tweaks to make Edwin cross-compilable. --- diff --git a/src/edwin/decls.scm b/src/edwin/decls.scm index f1e74de1b..41415ff3c 100644 --- a/src/edwin/decls.scm +++ b/src/edwin/decls.scm @@ -28,8 +28,9 @@ USA. (declare (usual-integrations)) -(let* ((scm-file (lambda (file) (string-append file ".scm"))) - (bin-file (lambda (file) (string-append file ".bin"))) +(let* ((sf-names (lambda (file) (sf/pathname-defaulting file #f #f))) + (scm-file (lambda (file) (receive (scm bin spec) (sf-names file) scm))) + (bin-file (lambda (file) (receive (scm bin spec) (sf-names file) bin))) (bin-time (lambda (file) (file-modification-time (bin-file file)))) (sf-dependent (lambda (environment) @@ -37,9 +38,10 @@ USA. (let ((reasons (let ((source-time (bin-time source))) (append - (if (not (file-processed? source "scm" "bin")) - (list (scm-file source)) - '()) + (receive (scm bin spec) (sf-names source) + (if (file-modification-time<=? scm bin) + '() + (list scm))) (map bin-file (if source-time (filter (lambda (dependency) diff --git a/src/edwin/edwin.sf b/src/edwin/edwin.sf index ab363fd6d..4a2d215a4 100644 --- a/src/edwin/edwin.sf +++ b/src/edwin/edwin.sf @@ -37,7 +37,9 @@ USA. (begin (fluid-let ((sf/default-syntax-table (->environment '(edwin)))) (sf-conditionally "string")) - (load "string.bin" '(edwin string)))) + (receive (scm bin spec) (sf/pathname-defaulting "string" #f #f) + scm spec + (load bin '(edwin string))))) (if (lexical-unreferenceable? (->environment '(edwin class-constructor)) 'class-descriptors) @@ -47,7 +49,10 @@ USA. (fluid-let ((sf/default-syntax-table (->environment '()))) (sf-conditionally files)) (for-each (lambda (file) - (load (string-append file ".bin") package)) + (receive (scm bin spec) + (sf/pathname-defaulting file #f #f) + scm spec + (load bin package))) files)))) (sf-and-load '("macros") '(edwin macros)) (sf-and-load '("clsmac") '(edwin class-macros)) diff --git a/src/edwin/utils.scm b/src/edwin/utils.scm index f6e085fb8..1a25274eb 100644 --- a/src/edwin/utils.scm +++ b/src/edwin/utils.scm @@ -73,7 +73,7 @@ USA. ;; This is written as a macro so that the shift will be a constant ;; in the compiled code. ;; It does not work when cross-compiled! - (let ((chars-per-word (bytes-per-object))) + (let ((chars-per-word (target-bytes-per-object))) (case chars-per-word ((4) -2) ((8) -3)