2 ;;; ch-asdf.cl -- various lisp utilities that make my life easier
4 ;;; Author: Cyrus Harmon <ch-lisp@bobobeach.com>
5 ;;; Time-stamp: <2005-07-01 08:12:53 sly>
10 (defun pathname-in-parent (path system
)
15 (make-pathname :directory
'(:relative
:up
))
19 (asdf:system-definition-pathname system
)))))))
21 (defun list-module-files (module system
)
26 (truename (asdf:system-definition-pathname module
))
30 (asdf:module
(list-module-files x system
))
32 (pathname-in-parent (asdf:component-pathname x
)
34 (asdf:module-components module
))))
36 (defun make-dist (&rest module-keywords
)
37 (let ((modules (mapcar
38 #'(lambda (k) (asdf:find-system k
))
40 (let ((module (car modules
))
43 #'(lambda (module) (list-module-files module module
))
45 (with-open-file (gzip-file
47 (asdf:component-name module
)
49 (asdf:component-version module
)
51 :if-does-not-exist
:create
54 (let ((*default-pathname-defaults
*
57 (make-pathname :directory
'(:relative
:up
))
61 (asdf:system-definition-pathname module
)))))))
62 (with-current-directory *default-pathname-defaults
*
66 :input
(ch-util:process-output-stream
75 :if-error-exists
:append
))
76 :output gzip-file
)))))))
78 (defun unregister-system (name)
79 (remhash name asdf
::*defined-systems
*))