+;;; a helper function for COMPILE-FILE-PATHNAME: the default for
+;;; the OUTPUT-FILE argument
+;;;
+;;; ANSI: The defaults for the OUTPUT-FILE are taken from the pathname
+;;; that results from merging the INPUT-FILE with the value of
+;;; *DEFAULT-PATHNAME-DEFAULTS*, except that the type component should
+;;; default to the appropriate implementation-defined default type for
+;;; compiled files.
+(defun cfp-output-file-default (input-file)
+ (let* ((defaults (merge-pathnames input-file
+ *default-pathname-defaults*))
+ (retyped (make-pathname :type *backend-fasl-file-type*
+ :defaults defaults)))
+ retyped))
+
+;;; KLUDGE: Part of the ANSI spec for this seems contradictory:
+;;; If INPUT-FILE is a logical pathname and OUTPUT-FILE is unsupplied,
+;;; the result is a logical pathname. If INPUT-FILE is a logical
+;;; pathname, it is translated into a physical pathname as if by
+;;; calling TRANSLATE-LOGICAL-PATHNAME.
+;;; So I haven't really tried to make this precisely ANSI-compatible
+;;; at the level of e.g. whether it returns logical pathname or a
+;;; physical pathname. Patches to make it more correct are welcome.
+;;; -- WHN 2000-12-09
+(defun sb!xc:compile-file-pathname (input-file
+ &key
+ (output-file (cfp-output-file-default
+ input-file))