Skip to content

Commit 5e4a19f

Browse files
committed
Support multiple local project directories.
1 parent cfd745a commit 5e4a19f

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

local-projects.lisp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131

3232
(in-package #:quicklisp-client)
3333

34-
(defparameter *local-projects-directory*
35-
(qmerge "local-projects/")
34+
(defparameter *local-project-directories*
35+
(list (qmerge "local-projects/"))
3636
"The default local projects directory.")
3737

3838
(defun system-index-file (pathname)
@@ -84,12 +84,13 @@ SYSTEM, return its full pathname."
8484
(defun local-projects-searcher (system-name)
8585
"This function is added to ASDF:*SYSTEM-DEFINITION-SEARCH-FUNCTIONS*
8686
to use the local project directory and cache to find systems."
87-
(when (probe-directory *local-projects-directory*)
88-
(let ((system-index (ensure-system-index *local-projects-directory*)))
89-
(when system-index
90-
(find-system-in-index system-name system-index)))))
87+
(dolist (directory *local-project-directories*)
88+
(when (probe-directory directory)
89+
(let ((system-index (ensure-system-index directory)))
90+
(when system-index
91+
(return (find-system-in-index system-name system-index)))))))
9192

9293
(defun register-local-projects ()
9394
"Force a scan of the local projects directory to create the system
9495
file index."
95-
(make-system-index *local-projects-directory*))
96+
(map nil 'make-system-index *local-project-directories*))

package.lisp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,9 @@
266266
#:write-asdf-manifest-file
267267
#:where-is-system
268268
#:help
269-
#:register-local-projects))
269+
#:register-local-projects
270+
#:local-projects-searcher
271+
#:*local-project-directories*))
270272

271273
(in-package #:quicklisp-client)
272274

0 commit comments

Comments
 (0)