Observe compiler:cross-compiling?
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 22 Aug 1992 15:03:25 +0000 (15:03 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sat, 22 Aug 1992 15:03:25 +0000 (15:03 +0000)
v7/src/compiler/etc/xcbfdir.scm
v7/src/sf/butils.scm
v8/src/compiler/etc/xcbfdir.scm

index b143401ac992b2060cfbc09a1ec15569bf417f0d..a1e616f7b7963cdce71d6ce95f0fdba5572aa6ed 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/etc/xcbfdir.scm,v 1.7 1991/05/27 17:56:12 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/etc/xcbfdir.scm,v 1.8 1992/08/22 15:00:49 jinx Exp $
 
-Copyright (c) 1989-91 Massachusetts Institute of Technology
+Copyright (c) 1989-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -78,7 +78,12 @@ MIT in each case. |#
                     (->pathname "*.bin")))))
 
 (define (recompile-directory dir)
-  (process-directory dir compile-bin-file "com"))
+  (let ((extn
+        (if (access compiler:cross-compiling?
+                    (->environment '(compiler)))
+            "moc"
+            "com")))
+    (process-directory dir compile-bin-file extn)))
 
 (define (cross-compile-directory dir)
   (process-directory dir cross-compile-bin-file "moc"))
\ No newline at end of file
index 79be514922a4c595a1a152123f40b4f0e82f4d65..bb32327eaa2a13a96f7a8b8df5d80001dffb7d85 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/sf/butils.scm,v 4.5 1991/11/04 20:31:36 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/sf/butils.scm,v 4.6 1992/08/22 15:03:25 jinx Exp $
 
-Copyright (c) 1988-91 Massachusetts Institute of Technology
+Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -48,7 +48,8 @@ MIT in each case. |#
     (lambda (input-directory #!optional output-directory force?)
       (let ((output-directory
             (if (default-object? output-directory) false output-directory))
-           (force? (if (default-object? force?) false force?)))
+           (force? (if (default-object? force?) false force?))
+           (output-type (output-type)))
        (for-each (lambda (pathname)
                    (if (or force?
                            (not (compare-file-modification-times
@@ -66,12 +67,18 @@ MIT in each case. |#
                      (directory-read input-directory)))))))
 
 (define sf-directory
-  (directory-processor "scm" "bin"
+  (directory-processor "scm"
+                      (lambda () "bin")
                       (lambda (pathname output-directory)
                         (sf pathname output-directory))))
 
 (define compile-directory
-  (directory-processor "bin" "com"
+  (directory-processor "bin"
+                      (lambda ()
+                        (if (access compiler:cross-compiling?
+                                    (->environment '(compiler)))
+                            "moc"
+                            "com"))
                       (lambda (pathname output-directory)
                         (compile-bin-file pathname output-directory))))
 
index b8aee03ba82979843734c0a555211ca5e26773c6..80e0482a6a406c8c9cee624bb5a1295e399f4962 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/compiler/etc/xcbfdir.scm,v 1.7 1991/05/27 17:56:12 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/compiler/etc/xcbfdir.scm,v 1.8 1992/08/22 15:00:49 jinx Exp $
 
-Copyright (c) 1989-91 Massachusetts Institute of Technology
+Copyright (c) 1989-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -78,7 +78,12 @@ MIT in each case. |#
                     (->pathname "*.bin")))))
 
 (define (recompile-directory dir)
-  (process-directory dir compile-bin-file "com"))
+  (let ((extn
+        (if (access compiler:cross-compiling?
+                    (->environment '(compiler)))
+            "moc"
+            "com")))
+    (process-directory dir compile-bin-file extn)))
 
 (define (cross-compile-directory dir)
   (process-directory dir cross-compile-bin-file "moc"))
\ No newline at end of file