[armedbear-cvs] r12405 - in trunk/abcl: . src/org/armedbear/lisp

Mark Evenson mevenson at common-lisp.net
Thu Jan 28 08:49:39 UTC 2010


Author: mevenson
Date: Thu Jan 28 03:49:36 2010
New Revision: 12405

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


Modified:
   trunk/abcl/build.xml
   trunk/abcl/src/org/armedbear/lisp/Version.java

Modified: trunk/abcl/build.xml
==============================================================================
--- trunk/abcl/build.xml	(original)
+++ trunk/abcl/build.xml	Thu Jan 28 03:49:36 2010
@@ -270,24 +270,14 @@
               value="${src.dir}/org/armedbear/lisp/"/>
     <property name="abcl.version.path"
 	      value="${build.classes.dir}/org/armedbear/lisp/version"/>
-    <target name="abcl.stamp.version" depends="abcl.compile"  unless="abcl.compile.lisp.skip">
-      <!-- Determine which ABCL version we have just built by parsing
-           the output of LISP-IMPLEMENTATION-VERSION. -->
-      <!-- TODO As an optimization, we could possibly compare the timestamp
-      of 'abcl.version.path' vs. org.armedbear.lisp.Version -->
+    <target name="abcl.stamp.version" depends="abcl.compile.java"  >
       <java fork="true"
 	    classpath="${build.classes.dir}"
 	    outputproperty="abcl.version"
-	    classname="org.armedbear.lisp.Main"
-            logerror="yes"> <!-- Don't catch stderr output -->
-        <jvmarg value="-Dabcl.home=${abcl.home.dir}"/>
-	<arg value="--noinit"/>
-	<arg value="--noinform"/>
-	<arg value="--eval"/>
-	<arg value="(progn (format t (lisp-implementation-version)) (finish-output) (quit))"/>
-      </java>
+	    classname="org.armedbear.lisp.Version"
+            logerror="yes"/> <!-- Don't catch stderr output -->
 
-      <echo>Built ABCL version: ${abcl.version}</echo>
+      <echo>ABCL version: ${abcl.version}</echo>
       <mkdir dir="${abcl.version.path}/.."/>
       <echo message="${abcl.version}" file="${abcl.version.path}"/> 
     </target>

Modified: trunk/abcl/src/org/armedbear/lisp/Version.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Version.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Version.java	Thu Jan 28 03:49:36 2010
@@ -43,4 +43,8 @@
   {
     return "0.19.0-dev";
   }
+  
+  public static void main(String args[]) {
+    System.out.println(Version.getVersion());
+  }
 }




More information about the armedbear-cvs mailing list