-(defmacro lml-file-name (file &optional (type :source))
- (let ((f file))
- (when (and (consp f) (eql (car f) 'cl:quote))
- (setq f (cadr f)))
- (when (symbolp f)
- (setq f (string-downcase (symbol-name f))))
- (when (stringp f)
- (unless (position #\. f)
- (setq f (concatenate 'string f ".html"))))
- (if *sources-dir*
- (make-pathname :defaults (ecase type
- (:source *sources-dir*)
- (:output *output-dir*))
- :name `,(pathname-name f)
- :type `,(pathname-type f))
+(defun lml-file-name (f &optional (type :source))
+ (when (and (consp f) (eql (car f) 'cl:quote))
+ (setq f (cadr f)))
+ (when (symbolp f)
+ (setq f (string-downcase (symbol-name f))))
+ (when (stringp f)
+ (unless (position #\. f)
+ (setq f (concatenate 'string f ".html"))))
+ (if (or (and (eq type :source) *sources-dir*)
+ (and (eq type :output) *output-dir*))
+ (merge-pathnames
+ (make-pathname :name (pathname-name f)
+ :type (pathname-type f)
+ :directory (pathname-directory f))
+ (ecase type
+ (:source *sources-dir*)
+ (:output *output-dir*)))