Generate the trivial constructor in the objdir, not srcdir.
authorTaylor R Campbell <campbell@mumble.net>
Mon, 7 Jan 2019 00:25:26 +0000 (00:25 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Mon, 7 Jan 2019 08:11:36 +0000 (08:11 +0000)
Define cref/source-root and cref/object-root in host-adapter.scm so
we can still load compiler.sf into old Schemes, which will never have
this distinction.

src/compiler/machines/C/compiler.sf
src/compiler/machines/i386/compiler.sf
src/compiler/machines/svm/compiler.sf
src/compiler/machines/x86-64/compiler.sf
src/runtime/host-adapter.scm

index 62e0db5d83d1e6930cfb797ade171dedc105590c..819d6ac764857d5e65a950dfaa6e8178630c0951 100644 (file)
@@ -31,7 +31,12 @@ USA.
 
 ;; Guarantee that the compiler's package structure exists.
 (if (not (name->package '(compiler)))
-    (let ((package-set (package-set-pathname "compiler")))
+    (let ((package-set
+          (merge-pathnames
+           (enough-pathname
+            (merge-pathnames (package-set-pathname "compiler"))
+            cref/source-root)
+           cref/object-root)))
       (if (not (file-exists? package-set))
          (cref/generate-trivial-constructor "compiler"))
       (construct-packages-from-file (fasload package-set))))
index f134bc3b753bb1d5029d4d72bad7a84239234413..8679c8cee845964b8dd44e6abc2799748e6bfaa3 100644 (file)
@@ -31,7 +31,12 @@ USA.
 
 ;; Guarantee that the compiler's package structure exists.
 (if (not (name->package '(compiler)))
-    (let ((package-set (package-set-pathname "compiler")))
+    (let ((package-set
+          (merge-pathnames
+           (enough-pathname
+            (merge-pathnames (package-set-pathname "compiler"))
+            cref/source-root)
+           cref/object-root)))
       (if (not (file-exists? package-set))
          (cref/generate-trivial-constructor "compiler"))
       (construct-packages-from-file (fasload package-set))))
index 20ed4deb4e1eec3bd6aebc300941ab5abcb54273..c18784556ca623b7a913c6d31b5db496412ec382 100644 (file)
@@ -31,7 +31,12 @@ USA.
 
 ;; Guarantee that the compiler's package structure exists.
 (if (not (name->package '(compiler)))
-    (let ((package-set (package-set-pathname "compiler")))
+    (let ((package-set
+          (merge-pathnames
+           (enough-pathname
+            (merge-pathnames (package-set-pathname "compiler"))
+            cref/source-root)
+           cref/object-root)))
       (if (not (file-exists? package-set))
          (cref/generate-trivial-constructor "compiler"))
       (construct-packages-from-file (fasload package-set))))
index 68ee38b5be3c030b397bf8b720e4e23fc93f3989..25ec926588eacc9c0a1cabedd349f7780cffd7f7 100644 (file)
@@ -31,7 +31,12 @@ USA.
 
 ;; Guarantee that the compiler's package structure exists.
 (if (not (name->package '(compiler)))
-    (let ((package-set (package-set-pathname "compiler")))
+    (let ((package-set
+          (merge-pathnames
+           (enough-pathname
+            (merge-pathnames (package-set-pathname "compiler"))
+            cref/source-root)
+           cref/object-root)))
       (if (not (file-exists? package-set))
          (cref/generate-trivial-constructor "compiler"))
       (construct-packages-from-file (fasload package-set))))
index 240ab0c4ccee845409d8de7141002764a6adcc49..524f126d8eae1eb4c95d1af3bd01ad5f3ad595b6 100644 (file)
@@ -40,4 +40,14 @@ USA.
                        'target-bytes-per-object
                        bytes-per-object))
 
+(if (lexical-unreferenceable? (->environment '()) 'cref/source-root)
+    (environment-define (->environment '())
+                       'cref/source-root
+                       #!default))
+
+(if (lexical-unreferenceable? (->environment '()) 'cref/object-root)
+    (environment-define (->environment '())
+                       'cref/object-root
+                       #!default))
+
 unspecific
\ No newline at end of file