Guarantee that "comp.bcon" is constructed if it doesn't already exist.
authorChris Hanson <org/chris-hanson/cph>
Wed, 24 Aug 1988 22:28:55 +0000 (22:28 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 24 Aug 1988 22:28:55 +0000 (22:28 +0000)
v7/src/compiler/machines/bobcat/compiler.sf

index 90009ca137a186cd0f8d6c513431c6595a2c4be8..caa63da33434d831ebb9bdc808bef713cd49adce 100644 (file)
@@ -1,7 +1,17 @@
 ;;; -*- Scheme -*-
 
+(if (not (name->package '(CROSS-REFERENCE)))
+    (with-working-directory-pathname "/scheme/cref" (lambda () (load "make"))))
+
 (if (not (name->package '(COMPILER)))
-    (load "comp.bcon"))
+    (begin
+      (if (not (file-exists? "comp.bcon"))
+         (begin
+           ((package/reference (find-package '(CROSS-REFERENCE))
+                               'CREF/GENERATE-TRIVIAL-CONSTRUCTOR)
+            "comp")
+           (sf "comp.con" "comp.bcon")))
+      (load "comp.bcon")))
 
 (let ((sf-and-load
        (lambda (files package)
@@ -49,9 +59,6 @@
                      '("instr1" "instr2" "instr3" "instr4")))))))
 
 ((package/reference (find-package '(COMPILER DECLARATIONS)) 'SYNTAX-FILES!))
-
-(if (not (name->package '(CROSS-REFERENCE)))
-    (with-working-directory-pathname "/scheme/cref" (lambda () (load "make"))))
 (cref/generate-all "comp")
 (sf "comp.con" "comp.bcon")
 (sf "comp.ldr" "comp.bldr")
\ No newline at end of file