Changeset 15875


Ignore:
Timestamp:
Aug 4, 2013, 3:42:25 PM (6 years ago)
Author:
gz
Message:

Extend use-interface-dir to take a optional directory arg, making it possible to store some interface dirs in the user sources rather than in the ccl installation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/foreign-types.lisp

    r14766 r15875  
    168168        (append-dll-node d (ftd-dirlist ftd)))))
    169169
    170 (defun use-interface-dir (name &optional (ftd *target-ftd*))
     170(defun use-interface-dir (name &optional (headers-dir nil) (ftd *target-ftd*))
    171171  "Tell Clozure CL to add the interface directory denoted by dir-id to the
    172172list of interface directories which it consults for foreign type and
    173173function information. Arrange that that directory is searched before any
    174174others.
     175
     176Optional headers-dir arg may be used to specify a non-standard location for
     177the interface directory.
    175178
    176179Note that use-interface-dir merely adds an entry to a search list. If the
     
    180183file whenever it needs to find any foreign type or function information.
    181184unuse-interface-dir may come in handy in that case."
     185  (when (foreign-type-data-p headers-dir) ;; backward compat
     186    (shiftf ftd headers-dir nil))
    182187  (let* ((d (ensure-interface-dir name ftd)))
    183188    (move-dll-nodes d (ftd-dirlist ftd))
     189    (when headers-dir
     190      (let ((target-dir (merge-pathnames (make-pathname :directory `(:relative ,@(cdb-subdirectory-path ftd))) headers-dir)))
     191        (setf (interface-dir-subdir d) (merge-pathnames (interface-dir-subdir d) target-dir))))
    184192    d))
    185193
Note: See TracChangeset for help on using the changeset viewer.