Changeset 13430 for trunk/abcl/contrib/abcl-asdf/asdf-jar.lisp
- Timestamp:
- 08/01/11 21:34:26 (12 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/contrib/abcl-asdf/asdf-jar.lisp
r13429 r13430 1 (in-package :abcl-asdf) 2 3 (defvar *added-to-classpath* nil) 4 5 (defvar *inhibit-add-to-classpath* nil) 6 7 (defun add-directory-jars-to-class-path (directory recursive-p) 8 (loop :for jar :in (if recursive-p 9 (all-jars-below directory) 10 (directory (merge-pathnames "*.jar" directory))) 11 :do (java:add-to-classpath jar))) 12 13 (defun all-jars-below (directory) 14 (loop :with q = (system:list-directory directory) 15 :while q :for top = (pop q) 16 :if (null (pathname-name top)) 17 :do (setq q (append q (all-jars-below top))) 18 :if (equal (pathname-type top) "jar") 19 :collect top)) 20 21 (defun need-to-add-directory-jar? (directory recursive-p) 22 (loop :for jar :in (if recursive-p 23 (all-jars-below directory) 24 (directory (merge-pathnames "*.jar" directory))) 25 :doing (if (not (member (namestring (truename jar)) *added-to-classpath* :test 'equal)) 26 (return-from need-to-add-directory-jar? t))) 27 nil) 28 1 29 (in-package :asdf) 2 30 … … 4 32 5 33 (defmethod perform ((operation compile-op) (c jar-directory)) 6 (unless jss:*inhibit-add-to-classpath*7 ( jss:add-directory-jars-to-class-path (truename (component-pathname c)) t)))34 (unless abcl-asdf:*inhibit-add-to-classpath* 35 (abcl-asdf:add-directory-jars-to-class-path (truename (component-pathname c)) t))) 8 36 9 37 (defmethod perform ((operation load-op) (c jar-directory)) 10 (unless jss:*inhibit-add-to-classpath*11 ( jss:add-directory-jars-to-class-path (truename (component-pathname c)) t)))38 (unless abcl-asdf:*inhibit-add-to-classpath* 39 (abcl-asdf:add-directory-jars-to-class-path (truename (component-pathname c)) t))) 12 40 13 41 (defmethod operation-done-p ((operation load-op) (c jar-directory)) 14 (or jss:*inhibit-add-to-classpath*15 (not (jss:need-to-add-directory-jar? (component-pathname c) t))))42 (or abcl-asdf:*inhibit-add-to-classpath* 43 (not (abcl-asdf:need-to-add-directory-jar? (component-pathname c) t)))) 16 44 17 45 (defmethod operation-done-p ((operation compile-op) (c jar-directory)) … … 20 48 (defclass jar-file (static-file) ()) 21 49 50 (defmethod source-file-type ((c jar-file) (s module)) "jar") 51 22 52 (defmethod perform ((operation compile-op) (c jar-file)) 23 (j ss:add-to-classpath (component-pathname c)))53 (java:add-to-classpath (component-pathname c))) 24 54 25 55 (defmethod perform ((operation load-op) (c jar-file)) 26 (or jss:*inhibit-add-to-classpath*27 (j ss:add-to-classpath (component-pathname c))))56 (or abcl-asdf:*inhibit-add-to-classpath* 57 (java:add-to-classpath (component-pathname c)))) 28 58 29 59 (defmethod operation-done-p ((operation load-op) (c jar-file)) 30 (or jss:*inhibit-add-to-classpath* 31 (member (namestring (truename (component-pathname c))) jss:*added-to-classpath* :test 'equal))) 60 (or abcl-asdf:*inhibit-add-to-classpath* 61 (member (namestring (truename (component-pathname c))) 62 abcl-asdf:*added-to-classpath* :test 'equal))) 32 63 33 64 (defmethod operation-done-p ((operation compile-op) (c jar-file)) … … 37 68 38 69 (defmethod perform ((operation compile-op) (c class-file-directory)) 39 (j ss:add-to-classpath (component-pathname c)))70 (java:add-to-classpath (component-pathname c))) 40 71 41 72 (defmethod perform ((operation load-op) (c class-file-directory)) 42 (jss:add-to-classpath (component-pathname c))) 43 44 (defmethod source-file-type ((c jar-file) (s module)) "jar") 73 (java:add-to-classpath (component-pathname c))) 45 74 46 75 47 76 48 77 78
Note: See TracChangeset
for help on using the changeset viewer.