Changeset 14907


Ignore:
Timestamp:
11/16/16 12:47:33 (5 years ago)
Author:
Mark Evenson
Message:

'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.

Location:
trunk/abcl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/build.xml

    r14891 r14907  
    4141    <property name="abcl.jar.path"
    4242              value="${dist.dir}/abcl.jar"/>
     43    <property name="abcl.aio.jar.path"
     44              value="${dist.dir}/abcl-aio.jar"/>
    4345    <property name="abcl.ext.dir"
    4446              value="${basedir}/ext"/>
     
    490492      </jar>
    491493    </target>
     494
     495    <target name="abcl.aio" depends="abcl.compile,abcl.stamp">
     496      <mkdir dir="${dist.dir}"/>
     497      <jar destfile="${abcl.aio.jar.path}"
     498           compress="true"
     499           update="true"
     500           basedir="${build.classes.dir}">
     501  <fileset dir="${src.dir}">
     502          <patternset refid="abcl.objects"/>
     503    <patternset refid="abcl.source.java"/>
     504    <patternset refid="abcl.source.lisp"/>
     505  </fileset>
     506  <fileset dir="${basedir}">
     507    <patternset refid="abcl.contrib.source"/>
     508  </fileset>
     509        <manifest>
     510          <attribute name="Main-Class" value="org.armedbear.lisp.Main"/>
     511          <section name="org/armedbear/lisp">
     512            <attribute name="Implementation-Title"
     513                       value="ABCL"/>
     514            <attribute name="Implementation-Version" 
     515                       value="${abcl.implementation.version}"/>
     516            <attribute name="Implementation-Build"
     517                       value="${build}"/>
     518          </section>
     519        </manifest>
     520        <metainf dir="${src.dir}/META-INF">
     521          <exclude name="services/javax.script.ScriptEngineFactory"
     522                   unless="abcl.jsr-223.p"/>
     523        </metainf>
     524      </jar>
     525    </target>
     526
    492527   
    493528    <target name="abcl.wrapper"
  • trunk/abcl/src/org/armedbear/lisp/abcl-contrib.lisp

    r14657 r14907  
    1111
    1212(defun system-jar-p (p)
    13   (named-jar-p "abcl" p))
     13  (or (named-jar-p "abcl" p)
     14      (named-jar-p "abcl-aio" p)))
    1415
    1516(defun contrib-jar-p (p)
    16   (named-jar-p "abcl-contrib" p))
     17  (or
     18   (named-jar-p "abcl-contrib" p)
     19   (named-jar-p "abcl-aio" p)))
    1720
    1821(defun named-jar-p (name p)
     
    6972(defparameter *verbose* t)
    7073
    71 (defun add-contrib (abcl-contrib-jar)
     74(defun add-contrib (abcl-contrib-jar &optional relative)
    7275  "Introspects ABCL-CONTRIB-JAR for asdf systems to add to ASDF:*CENTRAL-REGISTRY*"
    7376  (when abcl-contrib-jar
    7477    (dolist (asdf-file
    7578             (directory (make-pathname :device (list abcl-contrib-jar)
    76                                        :directory '(:absolute :wild)
     79                                       :directory (if relative `(:absolute ,relative :wild) '(:absolute :wild))
    7780                                       :name :wild
    7881                                       :type "asd")))
     
    8891      (format verbose "~&Using already initialized value of abcl-contrib:~&'~A'.~%"
    8992              *abcl-contrib*)
    90     (progn
    91       (setf *abcl-contrib* (find-contrib))
    92       (format verbose "~&Using probed value of abcl-contrib:~&'~A'.~%"
    93               *abcl-contrib*)))
    94   (add-contrib *abcl-contrib*))
     93      (progn
     94  (setf *abcl-contrib* (find-contrib))
     95  (format verbose "~&Using probed value of abcl-contrib:~&'~A'.~%"
     96    *abcl-contrib*)))
     97  (add-contrib *abcl-contrib*
     98         (and (equalp *abcl-contrib* (find-system-jar))
     99        "contrib"))
     100  )
    95101
    96102(defun find-contrib ()
    97103  "Introspect runtime classpaths to find a loadable ABCL-CONTRIB."
    98104  (or (ignore-errors
    99         (find-contrib-jar))
     105       (let ((system-jar (find-system-jar)))
     106   (and
     107    (probe-file (make-pathname
     108      :device (list system-jar)
     109      :directory '(:absolute "contrib")
     110      :name "README" :type "markdown" ))
     111    system-jar)))
     112      (ignore-errors
     113       (find-contrib-jar))
    100114      (ignore-errors
    101115        (let ((system-jar (find-system-jar)))
Note: See TracChangeset for help on using the changeset viewer.