[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sbcl-devel
Subject:    [Sbcl-devel] compile-file-pathname behavior
From:       Jianshi Huang <huang () msi ! co ! jp>
Date:       2009-11-30 5:20:31
Message-ID: 20091130.142031.912333854964281224.huang () msi ! co ! jp
[Download RAW message or body]

Hi SBCL developers,

Here's the currently definition of compile-file-pathname which is used
by compile-file.

I don't think it makes sense to merge the output-file with the
default, instead, when output-file is specified, it should just return
the logical-pathname. Does that make sense?

(defun sb!xc:compile-file-pathname (input-file
                                    &key
                                    (output-file nil output-file-p)
                                    &allow-other-keys)
  #!+sb-doc
  "Return a pathname describing what file COMPILE-FILE would write to given
   these arguments."
  (if output-file-p
      (merge-pathnames output-file (cfp-output-file-default input-file))
      (cfp-output-file-default input-file)))


e.g.

I want to compile "foo/foo.lisp" to "foo/foo.fasl" and I write:

(compile-file  #p"foo/foo.lisp" :output-file #p"foo/foo.fasl")

=>

Signals an error.

Since

(compile-file-pathname  #p"foo/foo.lisp" :output-file #p"foo/foo.fasl")

=>

#P"/tmp/foo/foo/foo.fasl"


Cheers,

----
Jianshi Huang
Mathematical Systems, Inc.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Sbcl-devel mailing list
Sbcl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic