Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (37 sloc) 1.64 KB
;;;; asdf-files.lisp
(in-package #:buildapp)
(defun manifest-file-files (file)
"Return a list of all system files contained in FILE. The syntax is
one namestring per line. Relative namestrings are resolved relative to
the truename of FILE."
(let ((truename (truename file)))
(remove-if #'null
(mapcar (lambda (namestring)
(probe-file (merge-pathnames namestring
(file-lines file)))))
(defun asdf-path-files (pathname)
(directory (merge-pathnames "*.asd" pathname)))
(defun asdf-tree-files (pathname)
(directory (merge-pathnames "**/*.asd" pathname)))
(defun asdf-directive-files (directive-list)
"Convert a list of directives to a list of pathnames. No two
pathnames in th eresult have the same pathname-name. A directive
should be a list of a symbol and a pathname. The directive can be
(let ((result '())
(table (make-hash-table :test 'equalp)))
(flet ((add-files (files)
(dolist (file files)
(unless (gethash (pathname-name file) table)
(setf (gethash (pathname-name file) table) file)
(push file result)))))
(loop for (directive pathname) in directive-list
do (ecase directive
(add-files (manifest-file-files pathname)))
(add-files (asdf-path-files pathname)))
(add-files (asdf-tree-files pathname)))))
(nreverse result))))
Something went wrong with that request. Please try again.