From: Guillermo J. Rozas Date: Tue, 9 Nov 1993 04:14:48 +0000 (+0000) Subject: Conditionalize output file extension. X-Git-Tag: 20090517-FFI~7574 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=983082fd3782818faea6cb2b928d863abe40025b;p=mit-scheme.git Conditionalize output file extension. --- diff --git a/v7/src/compiler/base/asstop.scm b/v7/src/compiler/base/asstop.scm index 546803b35..8a4ad13a3 100644 --- a/v7/src/compiler/base/asstop.scm +++ b/v7/src/compiler/base/asstop.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: asstop.scm,v 1.6 1993/08/26 05:49:41 gjr Exp $ +$Id: asstop.scm,v 1.7 1993/11/09 04:13:55 gjr Exp $ Copyright (c) 1988-1993 Massachusetts Institute of Technology @@ -39,6 +39,8 @@ MIT in each case. |# ;;;; Exports to the compiler +(define compiled-output-extension "com") + (define (compiler-file-output object pathname) (fasdump object pathname)) diff --git a/v7/src/compiler/base/toplev.scm b/v7/src/compiler/base/toplev.scm index 62d89fae7..4bb1c1881 100644 --- a/v7/src/compiler/base/toplev.scm +++ b/v7/src/compiler/base/toplev.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: toplev.scm,v 4.47 1992/10/24 16:00:50 jinx Exp $ +$Id: toplev.scm,v 4.48 1993/11/09 04:14:01 gjr Exp $ -Copyright (c) 1988-1992 Massachusetts Institute of Technology +Copyright (c) 1988-1993 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -95,7 +95,8 @@ MIT in each case. |# (let ((input-pathname (merge-pathnames input-string default))) (let ((output-pathname (let ((output-pathname - (pathname-new-type input-pathname "com"))) + (pathname-new-type input-pathname + compiled-output-extension))) (if output-string (merge-pathnames output-string output-pathname) output-pathname)))) @@ -106,7 +107,8 @@ MIT in each case. |# (write (enough-namestring input-pathname)) (write-string " => ") (write (enough-namestring output-pathname)))) - (compiler-file-output (transform input-pathname output-pathname) + (compiler-file-output + (transform input-pathname output-pathname) output-pathname))))) (kernel (if compiler:batch-mode? diff --git a/v7/src/compiler/machines/C/ctop.scm b/v7/src/compiler/machines/C/ctop.scm index cb474a96b..235826090 100644 --- a/v7/src/compiler/machines/C/ctop.scm +++ b/v7/src/compiler/machines/C/ctop.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: ctop.scm,v 1.2 1993/10/30 12:58:09 gjr Exp $ +$Id: ctop.scm,v 1.3 1993/11/09 04:14:48 gjr Exp $ -Copyright (c) 1992 Massachusetts Institute of Technology +Copyright (c) 1992-1993 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -39,15 +39,13 @@ MIT in each case. |# ;;;; Exports to the compiler -(define c-code-tag (string->symbol "#[C-code]")) +(define compiled-output-extension "c") (define (compiler-file-output object pathname) (let ((pair (vector-ref object 1))) - (call-with-output-file (pathname-new-type pathname "c") + (call-with-output-file pathname (lambda (port) - (write-string (cdr pair) port))) - (fasdump (cons c-code-tag (car pair)) - pathname))) + (write-string (cdr pair) port))))) (define (compiled-scode->procedure compiled-scode environment) environment ; ignored