;;;; This file contains functions, classes etc that are not part of
;;;; asdf itself, but extend it in various ways useful for maintainers
;;;; of new-style cCLan packages
;;;; This file does not contain references to asdf internals - or
;;;; shouldn't, anyway. Send bug reports
(defunmapappend(functionlist)
(let((f(coercefunction'function)))
(loopforiinlistappend(funcallfi))))
(defgenericlist-files(component))
(defmethodlist-files((csource-file))
(list(component-pathnamec)))
(defmethodlist-files((cmodule))
(mapappend'list-files(module-componentsc)))
(defunmake-tar-file(system)
"Make a tar file named SYSTEM-NAME_VERSION.tar containing all the files in SYSTEM. The file is created in the directory containing the system directory. Returns T on success"
(let*((system(find-systemsystem))
(sys-path(component-pathnamesystem))
(base-path(make-pathname
:directory(butlast(pathname-directorysys-path))
:defaultssys-path))
(files
(mapcar(lambda(x)(enough-namestringxbase-path))
(cons
(truename(system-definition-pathnamesystem))
(list-filessystem)))))
(=0
(run-shell-command"cd ~A && tar cf ~A_~A.tar ~{~D ~}"