[armedbear-cvs] r13985 - trunk/abcl

mevenson at common-lisp.net mevenson at common-lisp.net
Wed Jun 27 18:55:54 UTC 2012


Author: mevenson
Date: Wed Jun 27 11:55:53 2012
New Revision: 13985

Log:
build: 'abcl.snapshot' will introspect other possible DVCs for more version information.

Use case: I use Mercurial to snapshot the SVN trunk in order to manage
patch submission.  I'd like to create a snapshot target that allows me
to more effciently package things with the appropiate metainformation
from my patche queues.

Only tested on Solaris oi-151a3.

TODO: generalize to other people's flavors of build enviroment (git,
darcs, etc.)

FIXME: Work through MSFT Windows kinks.

Added:
   trunk/abcl/build-snapshot.xml
Modified:
   trunk/abcl/build.xml

Added: trunk/abcl/build-snapshot.xml
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/abcl/build-snapshot.xml	Wed Jun 27 11:55:53 2012	(r13985)
@@ -0,0 +1,65 @@
+<project xmlns="antlib:org.apache.tools.ant">
+
+<target name="abcl.snapshot" 
+        depends="abcl.release,abcl.diagnostic,abcl.version"
+        description="Introspect and dump the current build and
+  (presumed ) runtime targets as binary executable JVM objects.">
+
+  <copy file="${dist.dir}/abcl-bin-${abcl.version}.tar.gz"
+        verbose="true"
+        toFile="${dist.dir}/abcl-bin-${abcl.src.version}.tar.gz"/>
+
+  <copy file="${dist.dir}/abcl-src-${abcl.version}.tar.gz"
+        verbose="true"
+        toFile="${dist.dir}/abcl-src-${abcl.src.version}.tar.gz"/>
+
+        <echo>
+abcl.version: ${abcl.version}
+abcl.version.hg: ${abcl.version.hg}
+abcl.src.version: ${abcl.src.version}
+
+</echo>
+</target>
+
+<target name="abcl.version" depends="abcl.stamp,abcl.version.hg"/>
+
+<!-- Introspect for other versioning systems if we haven't determined an upstream SVN version -->
+<target name="abcl.version.hg"
+        depends="abcl.stamp">
+  <exec executable="hg" 
+    outputproperty="abcl.version.hg.raw"
+    failifexecutionfails="false"
+    searchpath="true">
+        <arg value="id"/>
+        <arg value="--id"/>
+  </exec>
+
+  <property name="abcl.version.hg"
+            value="hg-${abcl.version.hg.raw}"/>
+  <property name="abcl.version"
+            value="${abcl.version.hg}"/>
+  <property name="abcl.src.version"
+            value="${abcl.version.hg}"/>
+</target>
+
+<!-- Writing the corresponding task for abcl.version.git.raw is an exercise left to the reader. -->
+
+
+<!-- FIXME Some macrology would be helpful as the basic rules seem obvious ?!? -->
+
+<target name="urn:org.abcl.build.ant.targets.diagnostic"
+        depends="abcl.release"/>
+
+<target name="snap" 
+        depends="abcl.snapshot"/>
+
+<target name="snapshot" 
+        depends="abcl.snapshot"/>
+
+<target name="org.not.abcl.build.ant.targets.diagnostic"
+        depends="abcl.diagnostic"/>
+
+<target name="org.not.abcl.build.ant.targets.snapshot"
+        depends="abcl.snapshot"/>
+
+</project>

Modified: trunk/abcl/build.xml
==============================================================================
--- trunk/abcl/build.xml	Sun Jun 24 07:57:25 2012	(r13984)
+++ trunk/abcl/build.xml	Wed Jun 27 11:55:53 2012	(r13985)
@@ -960,11 +960,19 @@
     </target>
 
 
-<target name="abcl.diagnostic" description="Emit diagnostics describing available hosting JVM properties."
+<target name="abcl.diagnostic" 
+        description="Emit diagnostics describing available hosting JVM properties."
         depends="abcl.build.diagnostic"/>
 <!-- 
 
-Possible JVM values from http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#getProperties 
+urn:org.abcl.build.ant.targets.diagnostic
+
+"Possible JVM values from"
+
+http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#getProperties 
+
+.
+
 
 java.version 	Java Runtime Environment version
 java.vendor 	Java Runtime Environment vendor
@@ -1022,6 +1030,8 @@
     <import file="netbeans-build.xml" optional="true"/> 
 <!--    <import file="j-build.xml" optional="true"/>  -->
     <import file="not.org-build.xml" optional="true"/> 
+    
+    <import file="build-snapshot.xml" optional="true"/>
 </project>
 
 




More information about the armedbear-cvs mailing list