'abcl-aio.jar' all-in-one jar target creates dist/abcl-aio.jar (Alan Ruttenberg)

Corresponds to <https://github.com/armedbear/abcl/pull/7>.

Combines usual abcl.jar contents + contribs + lisp and java source.
Fixes find-system-jar accepts abcl-aio as well, so you can use this
single jar in your lib vs. abcl.jar + abcl-contrib.jar + sources
somewhere.

Combined with recent Slime enhancements in
<https://github.com/slime/slime/commit/30566b174be3186fde1ac224d4fffd3def0f4d9e>
ff., this will allow edit definition to find source for abcl-defined
functions and java primitives without extra configuration.
parent 9cf07e8c
......@@ -40,6 +40,8 @@ For help on the automatic tests available, use the Ant target 'help.test'.
value="${basedir}/dist"/>
<property name="abcl.jar.path"
value="${dist.dir}/abcl.jar"/>
<property name="abcl.aio.jar.path"
value="${dist.dir}/abcl-aio.jar"/>
<property name="abcl.ext.dir"
value="${basedir}/ext"/>
......@@ -489,6 +491,39 @@ from ${abcl.home.dir}
</metainf>
</jar>
</target>
<target name="abcl.aio" depends="abcl.compile,abcl.stamp">
<mkdir dir="${dist.dir}"/>
<jar destfile="${abcl.aio.jar.path}"
compress="true"
update="true"
basedir="${build.classes.dir}">
<fileset dir="${src.dir}">
<patternset refid="abcl.objects"/>
<patternset refid="abcl.source.java"/>
<patternset refid="abcl.source.lisp"/>
</fileset>
<fileset dir="${basedir}">
<patternset refid="abcl.contrib.source"/>
</fileset>
<manifest>
<attribute name="Main-Class" value="org.armedbear.lisp.Main"/>
<section name="org/armedbear/lisp">
<attribute name="Implementation-Title"
value="ABCL"/>
<attribute name="Implementation-Version"
value="${abcl.implementation.version}"/>
<attribute name="Implementation-Build"
value="${build}"/>
</section>
</manifest>
<metainf dir="${src.dir}/META-INF">
<exclude name="services/javax.script.ScriptEngineFactory"
unless="abcl.jsr-223.p"/>
</metainf>
</jar>
</target>
<target name="abcl.wrapper"
depends="abcl.jar,abcl.contrib,abcl.wrapper.unix,abcl.wrapper.windows">
......
......@@ -10,10 +10,13 @@
(java:jcall +get-classloader+ boot-class)))
(defun system-jar-p (p)
(named-jar-p "abcl" p))
(or (named-jar-p "abcl" p)
(named-jar-p "abcl-aio" p)))
(defun contrib-jar-p (p)
(named-jar-p "abcl-contrib" p))
(or
(named-jar-p "abcl-contrib" p)
(named-jar-p "abcl-aio" p)))
(defun named-jar-p (name p)
(and (pathnamep p)
......@@ -68,12 +71,12 @@ Initialized via SYSTEM:FIND-CONTRIB.")
(defparameter *verbose* t)
(defun add-contrib (abcl-contrib-jar)
(defun add-contrib (abcl-contrib-jar &optional relative)
"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)
:directory (if relative `(:absolute ,relative :wild) '(:absolute :wild))
:name :wild
:type "asd")))
(let ((asdf-directory (make-pathname :defaults asdf-file :name nil :type nil)))
......@@ -87,16 +90,27 @@ 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*)))
(add-contrib *abcl-contrib*))
(progn
(setf *abcl-contrib* (find-contrib))
(format verbose "~&Using probed value of abcl-contrib:~&'~A'.~%"
*abcl-contrib*)))
(add-contrib *abcl-contrib*
(and (equalp *abcl-contrib* (find-system-jar))
"contrib"))
)
(defun find-contrib ()
"Introspect runtime classpaths to find a loadable ABCL-CONTRIB."
(or (ignore-errors
(find-contrib-jar))
(let ((system-jar (find-system-jar)))
(and
(probe-file (make-pathname
:device (list system-jar)
:directory '(:absolute "contrib")
:name "README" :type "markdown" ))
system-jar)))
(ignore-errors
(find-contrib-jar))
(ignore-errors
(let ((system-jar (find-system-jar)))
(when system-jar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment