X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/fe1dd1b9a0ed294042d3ca1e53fb369cea0b6192..db7a1e771d6aec41d0489b07c546d99ebbbc1019:/tools/autoexport.lisp diff --git a/tools/autoexport.lisp b/tools/autoexport.lisp index 6a1c13c..72cdeba 100644 --- a/tools/autoexport.lisp +++ b/tools/autoexport.lisp @@ -3,7 +3,7 @@ (:export "LIST-AUTOEXPORTED-SYMBOLS" "LIST-AUTOEXPORTED-SYMBOLS-IN-FILE" "DEFEXPORT" "EXPORT-FROM-FILE" "EXPORT-FROM-FILES" "INTERNAL" "WITH-EXPORT-HANDLERS" "EXPORT-HANDLER-MAKUNBOUND" - "EXPORT-DEFCLASS-FORM")) + "EXPORT-DEFCLASS-FORM" "EXPORT-FROM-SYSTEM")) (in-package "AUTOEXPORT") @@ -66,6 +66,15 @@ `(progn ,@(loop for file in files collect `(export-from-file ,file ,package)))) +(defmacro export-from-system (&optional package) + (let ((depends-on (cdar (asdf:component-depends-on asdf:*operation* asdf:*component*)))) + `(progn + ,@(loop + for component in depends-on + as pathname = (asdf:component-pathname + (asdf:find-component asdf:*system* component)) + collect `(export-from-file ,pathname ,package))))) + (defun copy-hash-table (hash-table) (let ((new-hash-table (make-hash-table :test (hash-table-test hash-table)