Save the operating-system-specific loading files under separate names,
authorChris Hanson <org/chris-hanson/cph>
Tue, 31 Oct 1995 23:52:57 +0000 (23:52 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 31 Oct 1995 23:52:57 +0000 (23:52 +0000)
so that multiple operating systems may be supported from the same
build-directory.

v7/src/edwin/edwin.sf

index 365361ae9417ddcba7af0000b900cc253088e859..6c5faa721f5302235d872c37ca2c842a7a350621 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: edwin.sf,v 1.15 1995/10/31 23:41:39 cph Exp $
+;;;    $Id: edwin.sf,v 1.16 1995/10/31 23:52:57 cph Exp $
 ;;;
 ;;;    Copyright (c) 1991-95 Massachusetts Institute of Technology
 ;;;
 
 (load-option 'CREF)
 
+(let ((package-name
+       (case microcode-id/operating-system
+        ((DOS) "edwindos")
+        ((NT) "edwinw32")
+        ((OS/2) "edwinos2")
+        ((UNIX) "edwinunx")
+        (else "edwinunk"))))
+  (copy-file "edwin.pkg" (pathname-new-type package-name "pkg"))
+
 (if (not (name->package '(EDWIN)))
     (begin
       (if (not (file-exists? "edwin.bco"))
          (begin
            ((access cref/generate-trivial-constructor
                     (->environment '(CROSS-REFERENCE)))
-            "edwin")
-           (sf "edwin.con")))
-      (load "edwin.bco")))
+            package-name)
+           (sf (pathname-new-type package-name "con"))))
+      (load (pathname-new-type package-name "bco"))))
 
 (if (lexical-unreferenceable? (->environment '(EDWIN CLASS-CONSTRUCTOR))
                              'CLASS-DESCRIPTORS)
          (lambda (pathname pmodel)
            (write-cref-unusual pathname pmodel)
            (write-globals pathname pmodel)
-           (write-constructor pathname pmodel)))))
-      (name
-       (case microcode-id/operating-system
-        ((DOS) "edwindos")
-        ((NT) "edwinw32")
-        ((OS/2) "edwinos2")
-        ((UNIX) "edwinunx")
-        (else "edwinunk"))))
-  (copy-file "edwin.pkg" (pathname-new-type name "pkg"))
-  (generate name)
-  (sf (pathname-new-type name "con"))
-  (if (and (file-exists? (pathname-new-type name "avd"))
-          (not (file-processed? name "avd" "bad")))
-      (fasdump (read-file (pathname-new-type name "avd"))
-              (pathname-new-type name "bad"))))
+           (write-constructor pathname pmodel))))))
+  (generate package-name)
+  (sf (pathname-new-type package-name "con"))
+  (if (and (file-exists? (pathname-new-type package-name "avd"))
+          (not (file-processed? package-name "avd" "bad")))
+      (fasdump (read-file (pathname-new-type package-name "avd"))
+              (pathname-new-type package-name "bad"))))
 (if (not (file-processed? "edwin" "ldr" "bld"))
-    (sf "edwin.ldr"))
\ No newline at end of file
+    (sf "edwin.ldr"))
+
+)
\ No newline at end of file