From d808da608c04c20c0669dff6204c91f9b117c483 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 25 Sep 2006 05:57:34 +0000 Subject: [PATCH] Rewrite so that the script is run when the working directory is the root of the scheme tree, rather than the runtime subdirectory. Also do a little simplification. --- v7/src/etc/script.scm | 60 +++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/v7/src/etc/script.scm b/v7/src/etc/script.scm index c627b570b..e5e5543a1 100644 --- a/v7/src/etc/script.scm +++ b/v7/src/etc/script.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: script.scm,v 1.1 2006/09/16 11:19:09 gjr Exp $ +$Id: script.scm,v 1.2 2006/09/25 05:57:34 cph Exp $ Copyright 2006 Massachusetts Institute of Technology @@ -26,39 +26,25 @@ USA. ;;;; Program to compile MIT/GNU Scheme ;;; This is used to compile a part of the system written in Scheme. -;;; This is the part of the system statically linked into the microcode -;;; when using the C back end of the compiler. - -;; (set! compiler:invoke-c-compiler? false) - -(fluid-let ((compiler:invoke-c-compiler? false)) - (with-working-directory-pathname - "../microcode" - (lambda () - (if (or (not (file-exists? "utabmd.bin")) - (> (file-modification-time-indirect "utabmd.scm") - (file-modification-time-indirect "utabmd.bin"))) - (sf "utabmd")) - (cbf "utabmd"))) - (let ((dirs '("runtime" "sf" "cref" "compiler"))) - (for-each - (lambda (dir) - (with-working-directory-pathname - (string-append "../" dir) - (lambda () - (load (string-append dir ".sf"))))) - dirs) - (for-each - (lambda (dir) - (with-working-directory-pathname - (string-append "../" dir) - (lambda () - (load (string-append dir ".cbf")) - (cbf (string-append dir "-unx.pkd"))))) - dirs)) - (with-working-directory-pathname - "../star-parser" - (lambda () - (load "compile.scm") - (cbf "parser-unx.pkd"))) - ) +;;; This is the part of the system statically linked into the +;;; microcode when using the C back end of the compiler. + +(fluid-let ((compiler:invoke-c-compiler? #f)) + (with-working-directory-pathname "microcode" + (lambda () + (if (or (not (file-exists? "utabmd.bin")) + (> (file-modification-time-indirect "utabmd.scm") + (file-modification-time-indirect "utabmd.bin"))) + (sf "utabmd")) + (cbf "utabmd"))) + (for-each (lambda (dir) + (with-working-directory-pathname dir + (lambda () + (load (string-append dir ".sf")) + (load (string-append dir ".cbf")) + (cbf (string-append dir "-unx.pkd"))))) + '("runtime" "sf" "cref" "compiler")) + (with-working-directory-pathname "star-parser" + (lambda () + (load "compile.scm") + (cbf "parser-unx.pkd")))) \ No newline at end of file -- 2.25.1