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'."
...
@@ -48,10 +48,10 @@ Used to determine relative pathname to find 'abcl-contrib.jar'."
(
defun
find-system-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`."
"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
))
(
dolist
(
loader
(
java:dump-classpath
))
(
let
((
abcl-jar
(
some
#'
system-jar-p
loader
)))
(
let
((
abcl-jar
(
some
#'
system-jar-p
loader
)))
(
when
abcl-jar
(
when
abcl-jar
(
return
abcl-jar
)))))
(
return
abcl-jar
)))))
(
defvar
*abcl-contrib*
nil
(
defvar
*abcl-contrib*
nil
"Pathname of the ABCL contrib.
"Pathname of the ABCL contrib.
...
@@ -63,41 +63,40 @@ Initialized via SYSTEM:FIND-CONTRIB.")
...
@@ -63,41 +63,40 @@ Initialized via SYSTEM:FIND-CONTRIB.")
"Introspects ABCL-CONTRIB-JAR for asdf systems to add to ASDF:*CENTRAL-REGISTRY*"
"Introspects ABCL-CONTRIB-JAR for asdf systems to add to ASDF:*CENTRAL-REGISTRY*"
(
when
abcl-contrib-jar
(
when
abcl-contrib-jar
(
dolist
(
asdf-file
(
dolist
(
asdf-file
(
directory
(
make-pathname
:device
(
list
abcl-contrib-jar
)
(
directory
(
make-pathname
:device
(
list
abcl-contrib-jar
)
:directory
'
(
:absolute
:wild
)
:directory
'
(
:absolute
:wild
)
:name
:wild
:name
:wild
:type
"asd"
)))
:type
"asd"
)))
(
let
((
asdf-directory
(
make-pathname
:defaults
asdf-file
:name
nil
:type
nil
)))
(
let
((
asdf-directory
(
make-pathname
:defaults
asdf-file
:name
nil
:type
nil
)))
(
unless
(
find
asdf-directory
asdf:*central-registry*
:test
#'
equal
)
(
unless
(
find
asdf-directory
asdf:*central-registry*
:test
#'
equal
)
(
push
asdf-directory
asdf:*central-registry*
)
(
push
asdf-directory
asdf:*central-registry*
)
(
format
*verbose*
"~&Added ~A to ASDF.~&"
asdf-directory
))))))
(
format
*verbose*
"~&Added ~A to ASDF.~&"
asdf-directory
))))))
(
defun
find-and-add-contrib
(
&key
(
verbose
nil
))
(
defun
find-and-add-contrib
(
&key
(
verbose
nil
))
"Attempt to find the ABCL contrib jar and add its contents to ASDF.
"Attempt to find the ABCL contrib jar and add its contents to ASDF.
Returns the pathname of the contrib if it can be found."
Returns the pathname of the contrib if it can be found."
(
if
*abcl-contrib*
(
if
*abcl-contrib*
(
format
verbose
"~&Using already initialized value of abcl-contrib:~&'~A'.~%"
(
format
verbose
"~&Using already initialized value of abcl-contrib:~&'~A'.~%"
*abcl-contrib*
)
*abcl-contrib*
)
(
progn
(
progn
(
setf
*abcl-contrib*
(
find-contrib
))
(
setf
*abcl-contrib*
(
find-contrib
))
(
format
verbose
"~&Using probed value of abcl-contrib:~&'~A'.~%"
(
format
verbose
"~&Using probed value of abcl-contrib:~&'~A'.~%"
*abcl-contrib*
)))
*abcl-contrib*
)))
(
add-contrib
*abcl-contrib*
))
(
add-contrib
*abcl-contrib*
))
(
defun
find-contrib
()
(
defun
find-contrib
()
"Introspect runtime classpaths to find a loadable ABCL-CONTRIB."
"Introspect runtime classpaths to find a loadable ABCL-CONTRIB."
(
or
(
ignore-errors
(
or
(
ignore-errors
(
when
(
find-system-jar
)
(
when
(
find-system-jar
)
(
probe-file
(
probe-file
(
make-pathname
:defaults
(
find-system-jar
)
(
make-pathname
:defaults
(
find-system-jar
)
:name
"abcl-contrib"
))))
:name
"abcl-contrib"
))))
(
some
(
some
(
lambda
(
u
)
(
lambda
(
u
)
(
probe-file
(
make-pathname
(
probe-file
(
make-pathname
:defaults
(
java:jcall
"toString"
u
)
:defaults
(
java:jcall
"toString"
u
)
:name
"abcl-contrib"
)))
:name
"abcl-contrib"
)))
(
java:jcall
"getURLs"
(
boot-classloader
)))))
(
java:jcall
"getURLs"
(
boot-classloader
)))))
(
export
`
(
find-system
(
export
`
(
find-system
find-contrib
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