- (make-pathname :defaults (ecase type
- (:source *sources-dir*)
- (:output *output-dir*))
- :name `,(pathname-name f)
- :type `,(pathname-type f))
+ (merge-pathnames
+ (make-pathname :name `,(pathname-name f)
+ :type `,(pathname-type f)
+ :directory `,(pathname-directory f))
+ (ecase type
+ (:source *sources-dir*)
+ (:output *output-dir*)))