From 9e8eb8613d4e0c62372595717fa431b9e5ed2547 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 18 Aug 2000 20:23:03 +0000 Subject: [PATCH] Add loaders for SOS and IMAIL. --- v7/dist/optiondb.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/v7/dist/optiondb.scm b/v7/dist/optiondb.scm index cc17d75ad..e431865f5 100644 --- a/v7/dist/optiondb.scm +++ b/v7/dist/optiondb.scm @@ -1,3 +1,30 @@ ;; -*- Scheme -*- +(define (guarded-system-loader package-name place #!optional filename) + (let ((directory + (merge-pathnames place + (directory-pathname (current-load-pathname))))) + (lambda () + (if (not (name->package package-name)) + (with-working-directory-pathname directory + (lambda () + (load + (let ((test + (lambda (name) + (or (file-exists? name) + (there-exists? load/default-types + (lambda (type) + (file-exists? + (pathname-new-type name (car type))))))))) + (cond ((not (default-object? filename)) filename) + ((test "make") "make") + ((test "load") "load") + (else (error "Can't find loader."))))))))))) + +(define-load-option 'SOS + (guarded-system-loader '(runtime object-system) "sos")) + +(define-load-option 'IMAIL + (guarded-system-loader '(edwin imail) "imail")) + (further-load-options standard-load-options) \ No newline at end of file -- 2.25.1