Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
abcl
abcl
Commits
54fa2163
Commit
54fa2163
authored
Mar 21, 2014
by
mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files
Normalized indentation.
parent
a5c53bdc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/org/armedbear/lisp/abcl-contrib.lisp
View file @
54fa2163
...
...
@@ -48,10 +48,10 @@ Used to determine relative pathname to find 'abcl-contrib.jar'."
(
defun
find-system-jar
()
"Return the pathname of the system jar, one of `abcl.jar` or `abcl-m.n.p.jar` or `abcl-m.n.p[.~-]something.jar`."
(
dolist
(
loader
(
java:dump-classpath
))
(
let
((
abcl-jar
(
some
#'
system-jar-p
loader
)))
(
when
abcl-jar
(
return
abcl-jar
)))))
(
dolist
(
loader
(
java:dump-classpath
))
(
let
((
abcl-jar
(
some
#'
system-jar-p
loader
)))
(
when
abcl-jar
(
return
abcl-jar
)))))
(
defvar
*abcl-contrib*
nil
"Pathname of the ABCL contrib.
...
...
@@ -63,41 +63,40 @@ Initialized via SYSTEM:FIND-CONTRIB.")
"Introspects ABCL-CONTRIB-JAR for asdf systems to add to ASDF:*CENTRAL-REGISTRY*"
(
when
abcl-contrib-jar
(
dolist
(
asdf-file
(
directory
(
make-pathname
:device
(
list
abcl-contrib-jar
)
:directory
'
(
:absolute
:wild
)
:name
:wild
:type
"asd"
)))
(
directory
(
make-pathname
:device
(
list
abcl-contrib-jar
)
:directory
'
(
:absolute
:wild
)
:name
:wild
:type
"asd"
)))
(
let
((
asdf-directory
(
make-pathname
:defaults
asdf-file
:name
nil
:type
nil
)))
(
unless
(
find
asdf-directory
asdf:*central-registry*
:test
#'
equal
)
(
push
asdf-directory
asdf:*central-registry*
)
(
format
*verbose*
"~&Added ~A to ASDF.~&"
asdf-directory
))))))
(
defun
find-and-add-contrib
(
&key
(
verbose
nil
))
"Attempt to find the ABCL contrib jar and add its contents to ASDF.
Returns the pathname of the contrib if it can be found."
(
if
*abcl-contrib*
(
format
verbose
"~&Using already initialized value of abcl-contrib:~&'~A'.~%"
*abcl-contrib*
)
(
progn
(
setf
*abcl-contrib*
(
find-contrib
))
(
format
verbose
"~&Using probed value of abcl-contrib:~&'~A'.~%"
*abcl-contrib*
)))
(
progn
(
setf
*abcl-contrib*
(
find-contrib
))
(
format
verbose
"~&Using probed value of abcl-contrib:~&'~A'.~%"
*abcl-contrib*
)))
(
add-contrib
*abcl-contrib*
))
(
defun
find-contrib
()
"Introspect runtime classpaths to find a loadable ABCL-CONTRIB."
(
or
(
ignore-errors
(
when
(
find-system-jar
)
(
probe-file
(
make-pathname
:defaults
(
find-system-jar
)
:name
"abcl-contrib"
))))
(
some
(
lambda
(
u
)
(
probe-file
(
make-pathname
:defaults
(
java:jcall
"toString"
u
)
:name
"abcl-contrib"
)))
(
java:jcall
"getURLs"
(
boot-classloader
)))))
(
when
(
find-system-jar
)
(
probe-file
(
make-pathname
:defaults
(
find-system-jar
)
:name
"abcl-contrib"
))))
(
some
(
lambda
(
u
)
(
probe-file
(
make-pathname
:defaults
(
java:jcall
"toString"
u
)
:name
"abcl-contrib"
)))
(
java:jcall
"getURLs"
(
boot-classloader
)))))
(
export
`
(
find-system
find-contrib
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment