Changeset 12405


Ignore:
Timestamp:
01/28/10 08:49:36 (11 years ago)
Author:
Mark Evenson
Message:

Don't invoke the entire ABCL runtime just to get the version number during compilation.

Location:
trunk/abcl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/build.xml

    r12404 r12405  
    271271    <property name="abcl.version.path"
    272272        value="${build.classes.dir}/org/armedbear/lisp/version"/>
    273     <target name="abcl.stamp.version" depends="abcl.compile"  unless="abcl.compile.lisp.skip">
    274       <!-- Determine which ABCL version we have just built by parsing
    275            the output of LISP-IMPLEMENTATION-VERSION. -->
    276       <!-- TODO As an optimization, we could possibly compare the timestamp
    277       of 'abcl.version.path' vs. org.armedbear.lisp.Version -->
     273    <target name="abcl.stamp.version" depends="abcl.compile.java"  >
    278274      <java fork="true"
    279275      classpath="${build.classes.dir}"
    280276      outputproperty="abcl.version"
    281       classname="org.armedbear.lisp.Main"
    282             logerror="yes"> <!-- Don't catch stderr output -->
    283         <jvmarg value="-Dabcl.home=${abcl.home.dir}"/>
    284   <arg value="--noinit"/>
    285   <arg value="--noinform"/>
    286   <arg value="--eval"/>
    287   <arg value="(progn (format t (lisp-implementation-version)) (finish-output) (quit))"/>
    288       </java>
    289 
    290       <echo>Built ABCL version: ${abcl.version}</echo>
     277      classname="org.armedbear.lisp.Version"
     278            logerror="yes"/> <!-- Don't catch stderr output -->
     279
     280      <echo>ABCL version: ${abcl.version}</echo>
    291281      <mkdir dir="${abcl.version.path}/.."/>
    292282      <echo message="${abcl.version}" file="${abcl.version.path}"/>
  • trunk/abcl/src/org/armedbear/lisp/Version.java

    r12396 r12405  
    4444    return "0.19.0-dev";
    4545  }
     46 
     47  public static void main(String args[]) {
     48    System.out.println(Version.getVersion());
     49  }
    4650}
Note: See TracChangeset for help on using the changeset viewer.