Changeset 13347
- Timestamp:
- 06/18/11 06:39:58 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/contrib/asdf-jar/asdf-jar.lisp
r13346 r13347 11 11 (defun package (system-name 12 12 &key (out #p"/var/tmp/") 13 (recursive t) 13 (recursive t) ; whether to package dependencies 14 (force t) ; whether to force ASDF compilation 14 15 (verbose t)) 16 "Compile and package the asdf SYSTEM-NAME in a jar. 17 18 Place the resulting packaging in the OUT directory." 15 19 (let* ((system 16 20 (asdf:find-system system-name)) … … 20 24 (slot-value system 'asdf:version)) 21 25 (package-jar-name 22 (format nil "~A~A-~A.jar" name ( when recursive "-all") version))26 (format nil "~A~A-~A.jar" name (if recursive "-all" "") version)) 23 27 (package-jar 24 28 (make-pathname :directory (pathname-directory out) :defaults package-jar-name)) 25 29 (mapping (make-hash-table :test 'equal))) 26 30 (when verbose 27 (format verbose "~&Packaging ASDF definition of ~A~& as ~A." system package-jar))31 (format verbose "~&Packaging ASDF definition of ~A~& as ~A." system package-jar)) 28 32 (setf *systems* nil) 29 33 (when verbose 30 34 (format verbose "~&Forcing recursive compilation of ~A." package-jar)) 31 (asdf:compile-system system :force t)35 (asdf:compile-system system :force force) 32 36 (when verbose 33 37 (format verbose "~&Packaging contents in ~A." package-jar)) … … 37 41 (asdf (slot-value system 'asdf::source-file))) 38 42 (setf (gethash asdf mapping) (relative-path base name asdf)) 39 40 ;;; XXX iterate through the rest of the contents of the41 ;;; system, adding appropiate entries42 43 (let ((sources 43 44 (mapwalk system … … 45 46 (lambda (c) (slot-value c 'asdf::absolute-pathname))))) 46 47 (loop :for source :in sources 47 :for source-entry = (relative-path name base source)48 :for source-entry = (relative-path base name source) 48 49 :for output = (make-pathname 49 50 :defaults (asdf:apply-output-translations source) 50 51 :type "abcl") 51 :for output-entry = (relative-pathname base output) 52 :for output-entry = (make-pathname 53 :defaults source-entry 54 :type "abcl") 52 55 :do (setf (gethash (namestring source) mapping) 53 56 source-entry) … … 56 59 (system:zip package-jar mapping))) 57 60 58 (defun relative-pathname (base source)59 (declare (ignore base source))60 (error "unimplemented."))61 62 61 ;;; This more Map than Walk at this point ... 63 62 (defun mapwalk (system test-if callable) 63 "Apply CALLABLE to all components of asdf SYSTEM which satisfy TEST-IF. 64 65 Both CALLABLE and TEST-IF are functions taking an asdf:component as their argument." 64 66 (declare (type system asdf:system)) 65 67 (loop … … 101 103 102 104 105 103 106 104 107
Note: See TracChangeset
for help on using the changeset viewer.