[armedbear-cvs] r11347 - trunk/j

Erik Huelsmann,,, ehuelsmann at common-lisp.net
Sun Oct 12 06:35:41 UTC 2008


Author: ehuelsmann
Date: Sun Oct 12 06:35:40 2008
New Revision: 11347

Log:
Fix Windows wrapper creation.

Modified:
   trunk/j/abcl.bat.in
   trunk/j/build.xml

Modified: trunk/j/abcl.bat.in
==============================================================================
--- trunk/j/abcl.bat.in	(original)
+++ trunk/j/abcl.bat.in	Sun Oct 12 06:35:40 2008
@@ -1 +1 @@
-"@JAVA@" @JAVA_OPTIONS@ -cp "@ABCL_CLASSPATH@" org.armedbear.lisp.Main %1 %2 %3 %4 %5 %6 %7 %8 %9
+"@JAVA@" @ABCL_JAVA_OPTIONS@ -cp "@ABCL_CLASSPATH@" org.armedbear.lisp.Main %1 %2 %3 %4 %5 %6 %7 %8 %9

Modified: trunk/j/build.xml
==============================================================================
--- trunk/j/build.xml	(original)
+++ trunk/j/build.xml	Sun Oct 12 06:35:40 2008
@@ -1,526 +1,528 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="antlib:org.apache.tools.ant"
-	 name="abcl-master" default="help" basedir=".">
-    <description>Armed Bear Common Lisp</description>
-
-    <target name="abcl" depends="abcl.wrapper"/>
-
-    <property file="build.properties"/>
-
-    <property name="build.dir" 
-	      value="${basedir}/build"/>
-    <property name="build.classes.dir" 
-	      value="${build.dir}/classes"/>
-    <property name="src.dir" 
-	      value="${basedir}/src"/>
-    <property name="dist.dir" 
-	      value="${basedir}/dist"/>
-    <property name="abcl.jar.path"
-	      value="${dist.dir}/abcl.jar"/>
-    <property name="j.jar.path"
-	      value="${dist.dir}/j.jar"/>
-
-    <target name="help">
-      <echo>Main Ant targets:
- abcl.compile  
-   -- compile ABCL to ${build.classes.dir}
- abcl.jar      
-   -- create packaged ${abcl.jar.path}
- abcl.wrapper  
-   -- create executable wrapper for ABCL
- abcl.source.zip abcl.source.tar
-    -- create source distributions in ${dist.dir}
- abcl.clean 
-    -- remove ABCL intermediate files</echo>
-      <echo>Corresponding targets for J exist, but currently aren't as well tested.
-      </echo>
-    </target>
-
-    <property name="abcl.version.path"
-	      value="${build.classes.dir}/org/armedbear/lisp/version"/>
-    <property name="abcl.build.path"
-	      value="${build.classes.dir}/org/armedbear/lisp/build"/>
-    <property name="j.version.path"
-	      value="${build.classes.dir}/org/armedbear/j/version"/>
-    <property name="j.build.path"
-	      value="${build.classes.dir}/org/armedbear/j/build"/>
-
-    <target name="abcl.stamp" depends="abcl.compile">
-      <tstamp>
-         <format property="build" pattern="EEE MMM dd yyyy HH:mm:ss zzz"/>
-      </tstamp>
-      <mkdir dir="${abcl.build.path}/.."/>
-      <echo message="${build}" file="${abcl.build.path}"/>    
-      <condition property="unix"> 
-	<or>
-	  <os family="unix"/>
-	  <os family="mac"/>
-	</or>
-      </condition>
-
-      <condition property="windows"> <os family="windows"/></condition>
-
-      <available file="${src.dir}org/armedbear/lisp/Interpreter.java" 
-		 property="abcl.lisp.p"/>
-
-      <antcall target="abcl.stamp.version"/>
-      <antcall target="abcl.stamp.hostname"/>
-    </target>
-
-    <target name="j.stamp" depends="abcl.stamp,j.compile">
-      <echo message="${build}" file="${j.build.path}"/>    
-    </target>
-
-    <target name="abcl.stamp.version">
-      <java fork="true"
-	    classpath="${build.classes.dir}"
-	    outputproperty="abcl.version"
-	    classname="org.armedbear.lisp.Main">
-	<arg value="--noinit"/>
-	<arg value="--noinform"/>
-	<arg value="--eval"/>
-	<arg value="(progn (format t (lisp-implementation-version)) (finish-output) (quit))"/>
-      </java>
-
-      <echo>Building ABCL version: ${abcl.version}</echo>
-      <mkdir dir="${abcl.version.path}/.."/>
-      <echo message="${abcl.version}" file="${abcl.version.path}"/> 
-    </target>
-
-    <target name="abcl.stamp.hostname">
-      <property name="j.build.path"
-		value="${build.classes.dir}/org/armedbear/j/build"/>
-      <exec executable="hostname" outputproperty="abcl.hostname"/>
-      <echo>abcl.hostname: ${abcl.hostname}</echo>
-    </target>
-
-    <target name="j.stamp.hostname">
-      <echo message="${abcl.hostname}" file="${j.build.path}" append="yes"/>
-    </target>
-
-    <patternset id="abcl.source.java">
-      <include name="org/armedbear/lisp/*.java"/>
-      <include name="org/armedbear/Main.java"/>
-    </patternset>
-    
-    <patternset id="abcl.source.lisp">
-      <include name="org/armedbear/lisp/*.lisp"/>
-      <include name="org/armedbear/lisp/tests/*.lisp"/>
-    </patternset>
-
-    <!-- Lisp files required at runtime -->
-    <patternset id="abcl.source.lisp.dist">
-      <include name="org/armedbear/lisp/boot.lisp"/>
-      <include name="org/armedbear/lisp/top-level.lisp"/>
-      <include name="org/armedbear/lisp/*.lisp"/> 
-    </patternset>
-
-    <patternset id="abcl.objects">
-      <include name="org/armedbear/lisp/*.class"/>
-      <include name="org/armedbear/lisp/*.cls"/> 
-      <include name="org/armedbear/lisp/*.abcl"/>
-      <patternset refid="abcl.source.lisp.dist"/>
-    </patternset>
-    
-    <patternset id="j.source">
-      <include name="Main.java"/>
-      <include name="gnu/regexp/*.java"/>
-      <include name="org/armedbear/j/**/*.java"/>
-      <!-- Assumed to need the org.armedbear.lisp.awt.* classes as ABCL
-           itself doesn't seem to need them. -->
-      <include name="org/armedbear/lisp/awt/*.class"/>
-    </patternset>
-
-    <patternset id="j.objects">
-      <patternset refid="abcl.objects"/>
-      <include name="Main.class"/>
-      <include name="gnu/regexp/*.class"/>
-      <include name="org/armedbear/j/**/*.class"/>
-    </patternset>
-
-    <patternset id="j.resources.src">
-      <include name="**/*.keywords"/>
-      <include name="org/armedbear/j/version"/>
-      <include name="org/armedbear/j/build"/>
-      <include name="org/armedbear/j/snapshot"/>
-      <include name="org/armedbear/j/images/*.png"/>
-      <include name="gnu/regexp/MessagesBundle.properties"/>
-    </patternset>
-
-    <patternset id="j.resources.top">
-      <include name="COPYING"/>
-      <include name="doc/*.html"/>
-      <include name="doc/*.css"/>
-      <include name="themes/*"/>
-      <include name="examples/*"/>
-    </patternset>
-
-    <path id="abcl.classpath.dist">
-      <pathelement location="${abcl.jar.path}"/>
-    </path>
-    
-    <path id="abcl.classpath.build">
-      <pathelement location="${build.classes.dir}"/>
-    </path>
-
-    <target name="abcl.compile" depends="abcl.pre-compile,abcl.compile.lisp">
-      <echo>Compiled ABCL with java version: ${java.version}</echo>
-    </target>
-
-    <target name="j.pre-compile" depends="abcl.pre-compile"/>
-
-    <target name="abcl.pre-compile">
-      <!--- antversion fails in ant 1.7.1 <antversion property="ant.version" 
-	                                              atleast="1.7"/> -->
-      <mkdir dir="${build.dir}"/>
-      <mkdir dir="${build.classes.dir}"/>
-
-      <property name="j.compile.version.path"
-		value="${build.classes.dir}/org/armedbear/j/version"/>
-
-      <property name="java.path"
-		value="${java.home}/bin/java"/>
-
-      <exec executable="hostname" os="unix" 
-	    outputproperty="abcl.compile.hostname"/>
-      <exec executable="uname" os="unix" 
-	    outputproperty="abcl.compile.uname">
-	<arg value="-a"/>
-      </exec>
-
-      <exec executable="hostname" os="Linux" outputproperty="hostname"/>
-
-      <condition property="abcl.java.version">
-	<matches string="${java.version}" pattern="1\.5"/>
-      </condition>
-      <echo>java.version: ${java.version}</echo>
-    </target>
-    
-    <target name="abcl.java.warning" unless="abcl.java.version">
-      <echo>WARNING: Java version ${java.version} not recommended.</echo>
-    </target>
-	
-    <target name="abcl.compile.java" 
-	    depends="abcl.pre-compile,abcl.java.warning">
-      <tstamp>
-	<format property="build" pattern="EEE MMM dd yyyy HH:mm:ss zzz"/>
-      </tstamp>
-
-      <javac destdir="${build.classes.dir}"
-	     debug="true"
-	     target="1.5">
-	<src path="${src.dir}"/>
-	<patternset refid="abcl.source.java"/>
-      </javac>
-      <echo message="${build}" 
-	    file="${build.classes.dir}/org/armedbear/lisp/build"/>
-    </target>
-
-    <target name="j.compile" depends="j.pre-compile">
-      <javac destdir="${build.classes.dir}"
-	     debug="true"
-	     target="1.5">
-	<src path="${src.dir}"/>
-	<patternset refid="j.source"/>
-      </javac>
-    </target>
-
-    <target name="abcl.copy.lisp">
-      <copy todir="${build.classes.dir}" preservelastmodified="yes">
-	<fileset dir="${src.dir}">
-	  <patternset refid="abcl.source.lisp"/>
-	</fileset>
-      </copy>
-    </target>
-
-
-    <!-- Adjust the patternset for ABCL source to use the much faster
-         Ant 'uptodate' task to check if we need to compile the system
-         fasls. -->
-    <patternset id="abcl.source.lisp.fasls">
-      <patternset refid="abcl.source.lisp"/>
-      <exclude name="org/armedbear/lisp/tests/*.lisp"/>
-      <exclude name="org/armedbear/lisp/autoloads.lisp"/>
-      <exclude name="org/armedbear/lisp/boot.lisp"/>
-      <exclude name="org/armedbear/lisp/emacs.lisp"/>
-      <exclude name="org/armedbear/lisp/with-mutex.lisp"/>
-      <exclude name="org/armedbear/lisp/swank-xcl.lisp"/>
-      <exclude name="org/armedbear/lisp/swank-sbcl.lisp"/>
-      <exclude name="org/armedbear/lisp/swank-package.lisp"/>
-      <exclude name="org/armedbear/lisp/swank-loader.lisp"/>
-      <exclude name="org/armedbear/lisp/swank-allegro.lisp"/>
-      <exclude name="org/armedbear/lisp/slime-loader.lisp"/>
-      <exclude name="org/armedbear/lisp/runtime-class.lisp"/>
-      <exclude name="org/armedbear/lisp/run-benchmarks.lisp"/>
-      <exclude name="org/armedbear/lisp/print-object.lisp"/>
-      <exclude name="org/armedbear/lisp/package.lisp"/>
-      <exclude name="org/armedbear/lisp/j.lisp"/>
-    </patternset>
-
-    <target name="abcl.fasls.uptodate">
-      <uptodate property="abcl.fasls.uptodate.p" value="true">
-	<srcfiles dir="${build.classes.dir}">
-	  <patternset refid="abcl.source.lisp.fasls"/>
-	</srcfiles>
-	<mapper type="glob" from="*.lisp" to="*.abcl"/>
-      </uptodate>
-    </target>
-    
-    <target name="abcl.compile.lisp" 
-	    depends="abcl.copy.lisp,abcl.compile.java,abcl.fasls.uptodate"
-	    unless="abcl.fasls.uptodate.p">
-      <java classpath="${build.classes.dir}"
-	    fork="true"
-	    classname="org.armedbear.lisp.Main">
-	<arg value="--noinit"/>
-	<arg value="--eval"/>
-	<arg value="(compile-system :zip nil :quit t)"/>
-      </java>
-    </target>
-
-    <target name="abcl.jar" depends="abcl.compile,abcl.stamp">
-      <loadfile property="abcl.version"
-		  srcFile="${abcl.version.path}"/>
-      <jar destfile="${abcl.jar.path}"
-	   compress="true"
-	   basedir="${build.classes.dir}">
-	<patternset refid="abcl.objects"/>
-	<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.version}"/>
-	    <attribute name="Implementation-Build" 
-		       value="${build}"/>
-	  </section>
-	</manifest>
-      </jar>
-    </target>
-    
-    <target name="abcl.debug.jpda" depends="abcl.jar">
-      <description>Invoke ABCL with JPDA listener on port 6789</description>
-      <java fork="true"
-	    classpathref="abcl.classpath.dist"
-	    classname="org.armedbear.lisp.Main">
-	<jvmarg 
-	    value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/>
-      </java>
-    </target>
-
-    <target name="abcl.run" depends="abcl.jar">
-      <java fork="true"
-	    classpathref="abcl.classpath.dist"
-	    classname="org.armedbear.lisp.Main">
-      </java>
-    </target>
-
-    <target name="abcl.wrapper" 
-	    depends="abcl.jar,abcl.wrapper.unix,abcl.wrapper.windows">
-      <description>
-	Creates in-place exectuable shell wrapper in '${abcl.wrapper.file}'
-      </description>
-      <!-- Set from commandline or in 'build.properties' -->
-      <property name="additional.jars" value=""/>
-      <path id="abcl.runtime.classpath">
-	<pathelement location="${abcl.jar.path}"/>
-	<pathelement path="${additional.jars}"/>
-      </path>
-      <!-- set via '-Djava.options=JAVA_OPTIONS' or in 'build.properties -->
-      <property name="java.options" value=""/>
-
-      <copy file="abcl.in" toFile="${abcl.wrapper.file}" overwrite="yes">
-	<filterset>
-	  <filter token="JAVA" 
-		  value="${java.path}"/>
-	  <filter token="ABCL_JAVA_OPTIONS" 
-		  value= "${java.options}"/>
-	  <filter token="ABCL_LIBPATH" 
-		  value="${basedir}/src/org/armedbear/lisp/libabcl.so"/>
-	  <filter token="ABCL_CLASSPATH" 
-		  value="${toString:abcl.runtime.classpath}"/>
-	</filterset>
-      </copy>
-      <chmod file="${abcl.wrapper.file}" perm="a+x"/>
-      <echo>N.B. This wrapper requires '${abcl.jar.path}' not be moved.</echo>
-    </target>
-
-    <target name="abcl.wrapper.unix" if="unix">
-      <property name="abcl.wrapper.file" value="abcl"/>
-    </target>
-
-    <target name="abcl.wrapper.windows" if="windows">
-      <property name="abcl.wrapper.file" value="abcl.bat"/>
-    </target>
-
-    <target name="j.jar" depends="j.compile,j.stamp">
-      <copy todir="${build.classes.dir}">
-	<fileset dir="${basedir}/src">
-	  <patternset refid="j.objects"/>
-	  <patternset refid="j.resources.src"/>
-	</fileset>
-      </copy>
-      <jar destfile="${j.jar.path}" 
-	   compress="true"
-	   basedir="${build.classes.dir}">
-	<patternset refid="j.objects"/>
-	<patternset refid="j.resources.src"/>
-	<manifest>
-	  <attribute name="Main-Class" value="Main"/>
-	  <section name="org/armedbear/lisp">
-	    <attribute name="Implementation-Title" value="ABCL"/>
-	    <attribute name="Implementation-Version"  value="${abcl.version}"/>
-	  </section>
-	</manifest>
-      </jar>
-    </target>
-
-    <target name="j.dist" depends="j.jar">
-      <mkdir dir="${dist.dir}"/>
-      <copy todir="dist">
-	<fileset dir="${basedir}">
-	  <patternset refid="j.resources.top"/>
-	</fileset>
-      </copy>
-    </target>
-
-    <target name="abcl.clean">
-      <delete dir="${build.dir}"/>
-      <delete file="abcl"/>
-    </target>
-
-    <target name="abcl.dist" depends="abcl.jar">
-      <copy file="${abcl.jar.path}"
-	    toFile="${dist.dir}/abcl-${abcl.version}.jar"/>
-    </target>
-
-    <target name="abcl.distclean" depends="abcl.clean">
-      <delete dir="${dist.dir}"/>
-      <delete file="abcl"/>
-      <delete file="j"/>
-    </target>
-
-    <target name="TAGS">
-      <apply executable="etags" parallel="true" verbose="true">
-	<fileset dir="${src.dir}">
-	  <patternset refid="abcl.source.java"/>
-	  <patternset refid="abcl.source.lisp"/>
-	</fileset>
-      </apply>
-    </target>
-
-    <target name="j.jpty" depends="j.jpty.compile"/>
-
-    <target name="j.jpty.compile" if="unix">
-      <exec executable="gcc" dir="${src.dir}/jpty">
-	<arg line="-Wall -O2 jpty.c -o jpty"/>
-      </exec>
-    </target>
-
-    <target name="j.install" depends="j.jar,j.install.unix,j.install.windows">
-      <property name="j.install.data.dir" value="${j.install.root}/share"/>
-      <property name="j.install.bin.dir" value="${j.install.root}/bin"/>
-
-      <mkdir dir="${j.install.data.dir}/j"/>
-      <copy file="${dist.dir}/j.jar" todir="${j.install.data.dir}/j"/>
-      <!-- set via '-Djava.options=JAVA_OPTIONS' or in 'build.properties -->
-      <property name="java.options" value=""/>
-      <copy file="${j.wrapper.file}.in" toFile="${j.install.bin.dir}/${j.wrapper.file}">
-	<filterset>
-	  <filter token="JAVA" 
-		  value="${java.path}"/>
-	  <filter token="JAVA_OPTIONS" 
-		  value="${java.options}"/>
-	  <filter token="CLASSPATH"
-		  value="${j.install.data.dir}/j/j.jar"/>
-	</filterset>
-      </copy>
-      <chmod file="${j.install.bin.dir}/j" perm="ugo+rx"/>
-
-      <property name="j.install.themes.path"
-		value="${j.install.data.dir}/j/themes"/>
-      <mkdir dir="${j.install.themes.dir}"/>
-      <copy todir="{j.install.themes.dir}">
-	<fileset dir="${basedir}/themes"/>
-      </copy>
-
-      <property name="j.install.doc.path"
-		value="${j.install.data.dir}/doc/j"/>
-      <mkdir dir="${j.install.doc.dir}" />
-
-      <copy file="${basedir}/src/jpty/jpty" 
-            todir="${j.install.bin.dir}"
-	    failonerror="false"/>
-      <chmod file="${j.install.bin.dir}/jpty" perm="ugo+rx"/>
-      <copy todir="${j.install.data.dir}/doc/j">
-	<fileset dir="${basedir}/doc"/>
-      </copy>
-    </target>
-
-    <target name="j.install.unix" depends="j.jpty" if="unix">
-      <property name="j.install.root" value="/usr/local"/>
-      <property name="j.wrapper.file" value="j"/>
-    </target>
-
-    <target name="j.install.windows" depends="j.jpty" if="windows">
-      <property name="j.install.root" value="c:/j"/>
-      <property name="j.wrapper.file" value="j.bat"/>
-    </target>
-
-    <patternset id="abcl.source.misc"
-		description="Additional includes in the source distributions relative to basedir">
-      <include name="build.xml"/>
-      <include name="build.properties.in"/>
-      <include name="COPYING"/>
-      <include name="abcl.in"/>
-      <include name="test-abcl.asd"/>
-      <include name="build-abcl.asd"/>
-      <include name="build-abcl.lisp"/>
-      <include name="customizations.lisp.in"/>
-    </patternset>
-
-    <target name="abcl.source.prepare" depends="abcl.stamp.version">
-      <property name="abcl.source.eol" value="asis"/>
-      <echo>Using '${abcl.source.eol}' to drive line-ending transformations.</echo>
-      <property name="abcl.build.src.dir"
-		value="${build.dir}/abcl-src-${abcl.version}"/>
-      <mkdir dir="${abcl.build.src.dir}/src"/>
-      <fixcrlf srcdir="${src.dir}" 
-	       eol="${abcl.source.eol}"
-	       destdir="${abcl.build.src.dir}/src"
-	       preservelastmodified="true">
-	<patternset refid="abcl.source.java"/>
-	<patternset refid="abcl.source.lisp"/>
-      </fixcrlf>
-      <fixcrlf srcdir="${basedir}" 
-	       eol="${abcl.source.eol}"
-	       destdir="${abcl.build.src.dir}"
-	       preservelastmodified="true">
-	<patternset refid="abcl.source.misc"/>
-      </fixcrlf>
-    </target>
-
-    <target name="abcl.source.tar" depends="abcl.source.prepare">
-      <mkdir dir="${dist.dir}"/>
-      <tar destfile="${dist.dir}/abcl-src-${abcl.version}.tar.gz"
-	   compression="gzip">
-	<tarfileset dir="${build.dir}">
-	  <include name="abcl-src-${abcl.version}/**"/>
-	</tarfileset>
-      </tar>
-    </target>
-
-    <target name="abcl.source.zip" depends="abcl.source.prepare">
-      <mkdir dir="${dist.dir}"/>
-      <zip destfile="${dist.dir}/abcl-src-${abcl.version}.zip"
-	   compress="true">
-	<zipfileset dir="${abcl.build.src.dir}" prefix="abcl-src-${abcl.version}"/>
-      </zip>
-    </target>
-
-    <import file="netbeans-build.xml" optional="true"/> 
-<!--    <import file="j-build.xml" optional="true"/>  -->
-    <import file="not.org-build.xml" optional="true"/> 
-</project>
-
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="antlib:org.apache.tools.ant"
+	 name="abcl-master" default="help" basedir=".">
+    <description>Armed Bear Common Lisp</description>
+
+    <target name="abcl" depends="abcl.wrapper"/>
+
+    <property file="build.properties"/>
+
+    <property name="build.dir" 
+	      value="${basedir}/build"/>
+    <property name="build.classes.dir" 
+	      value="${build.dir}/classes"/>
+    <property name="src.dir" 
+	      value="${basedir}/src"/>
+    <property name="dist.dir" 
+	      value="${basedir}/dist"/>
+    <property name="abcl.jar.path"
+	      value="${dist.dir}/abcl.jar"/>
+    <property name="j.jar.path"
+	      value="${dist.dir}/j.jar"/>
+
+    <target name="help">
+      <echo>Main Ant targets:
+ abcl.compile  
+   -- compile ABCL to ${build.classes.dir}
+ abcl.jar      
+   -- create packaged ${abcl.jar.path}
+ abcl.wrapper  
+   -- create executable wrapper for ABCL
+ abcl.source.zip abcl.source.tar
+    -- create source distributions in ${dist.dir}
+ abcl.clean 
+    -- remove ABCL intermediate files</echo>
+      <echo>Corresponding targets for J exist, but currently aren't as well tested.
+      </echo>
+    </target>
+
+    <property name="abcl.version.path"
+	      value="${build.classes.dir}/org/armedbear/lisp/version"/>
+    <property name="abcl.build.path"
+	      value="${build.classes.dir}/org/armedbear/lisp/build"/>
+    <property name="j.version.path"
+	      value="${build.classes.dir}/org/armedbear/j/version"/>
+    <property name="j.build.path"
+	      value="${build.classes.dir}/org/armedbear/j/build"/>
+
+    <target name="abcl.stamp" depends="abcl.compile">
+      <tstamp>
+         <format property="build" pattern="EEE MMM dd yyyy HH:mm:ss zzz"/>
+      </tstamp>
+      <mkdir dir="${abcl.build.path}/.."/>
+      <echo message="${build}" file="${abcl.build.path}"/>    
+      <condition property="unix"> 
+	<or>
+	  <os family="unix"/>
+	  <os family="mac"/>
+	</or>
+      </condition>
+
+      <condition property="windows"> <os family="windows"/></condition>
+
+      <available file="${src.dir}org/armedbear/lisp/Interpreter.java" 
+		 property="abcl.lisp.p"/>
+
+      <antcall target="abcl.stamp.version"/>
+      <antcall target="abcl.stamp.hostname"/>
+    </target>
+
+    <target name="j.stamp" depends="abcl.stamp,j.compile">
+      <echo message="${build}" file="${j.build.path}"/>    
+    </target>
+
+    <target name="abcl.stamp.version">
+      <java fork="true"
+	    classpath="${build.classes.dir}"
+	    outputproperty="abcl.version"
+	    classname="org.armedbear.lisp.Main">
+	<arg value="--noinit"/>
+	<arg value="--noinform"/>
+	<arg value="--eval"/>
+	<arg value="(progn (format t (lisp-implementation-version)) (finish-output) (quit))"/>
+      </java>
+
+      <echo>Building ABCL version: ${abcl.version}</echo>
+      <mkdir dir="${abcl.version.path}/.."/>
+      <echo message="${abcl.version}" file="${abcl.version.path}"/> 
+    </target>
+
+    <target name="abcl.stamp.hostname">
+      <property name="j.build.path"
+		value="${build.classes.dir}/org/armedbear/j/build"/>
+      <exec executable="hostname" outputproperty="abcl.hostname"/>
+      <echo>abcl.hostname: ${abcl.hostname}</echo>
+    </target>
+
+    <target name="j.stamp.hostname">
+      <echo message="${abcl.hostname}" file="${j.build.path}" append="yes"/>
+    </target>
+
+    <patternset id="abcl.source.java">
+      <include name="org/armedbear/lisp/*.java"/>
+      <include name="org/armedbear/Main.java"/>
+    </patternset>
+    
+    <patternset id="abcl.source.lisp">
+      <include name="org/armedbear/lisp/*.lisp"/>
+      <include name="org/armedbear/lisp/tests/*.lisp"/>
+    </patternset>
+
+    <!-- Lisp files required at runtime -->
+    <patternset id="abcl.source.lisp.dist">
+      <include name="org/armedbear/lisp/boot.lisp"/>
+      <include name="org/armedbear/lisp/top-level.lisp"/>
+      <include name="org/armedbear/lisp/*.lisp"/> 
+    </patternset>
+
+    <patternset id="abcl.objects">
+      <include name="org/armedbear/lisp/*.class"/>
+      <include name="org/armedbear/lisp/*.cls"/> 
+      <include name="org/armedbear/lisp/*.abcl"/>
+      <patternset refid="abcl.source.lisp.dist"/>
+    </patternset>
+    
+    <patternset id="j.source">
+      <include name="Main.java"/>
+      <include name="gnu/regexp/*.java"/>
+      <include name="org/armedbear/j/**/*.java"/>
+      <!-- Assumed to need the org.armedbear.lisp.awt.* classes as ABCL
+           itself doesn't seem to need them. -->
+      <include name="org/armedbear/lisp/awt/*.class"/>
+    </patternset>
+
+    <patternset id="j.objects">
+      <patternset refid="abcl.objects"/>
+      <include name="Main.class"/>
+      <include name="gnu/regexp/*.class"/>
+      <include name="org/armedbear/j/**/*.class"/>
+    </patternset>
+
+    <patternset id="j.resources.src">
+      <include name="**/*.keywords"/>
+      <include name="org/armedbear/j/version"/>
+      <include name="org/armedbear/j/build"/>
+      <include name="org/armedbear/j/snapshot"/>
+      <include name="org/armedbear/j/images/*.png"/>
+      <include name="gnu/regexp/MessagesBundle.properties"/>
+    </patternset>
+
+    <patternset id="j.resources.top">
+      <include name="COPYING"/>
+      <include name="doc/*.html"/>
+      <include name="doc/*.css"/>
+      <include name="themes/*"/>
+      <include name="examples/*"/>
+    </patternset>
+
+    <path id="abcl.classpath.dist">
+      <pathelement location="${abcl.jar.path}"/>
+    </path>
+    
+    <path id="abcl.classpath.build">
+      <pathelement location="${build.classes.dir}"/>
+    </path>
+
+    <target name="abcl.compile" depends="abcl.pre-compile,abcl.compile.lisp">
+      <echo>Compiled ABCL with java version: ${java.version}</echo>
+    </target>
+
+    <target name="j.pre-compile" depends="abcl.pre-compile"/>
+
+    <target name="abcl.pre-compile">
+      <!--- antversion fails in ant 1.7.1 <antversion property="ant.version" 
+	                                              atleast="1.7"/> -->
+      <mkdir dir="${build.dir}"/>
+      <mkdir dir="${build.classes.dir}"/>
+
+      <property name="j.compile.version.path"
+		value="${build.classes.dir}/org/armedbear/j/version"/>
+
+      <property name="java.path"
+		value="${java.home}/bin/java"/>
+
+      <exec executable="hostname" os="unix" 
+	    outputproperty="abcl.compile.hostname"/>
+      <exec executable="uname" os="unix" 
+	    outputproperty="abcl.compile.uname">
+	<arg value="-a"/>
+      </exec>
+
+      <exec executable="hostname" os="Linux" outputproperty="hostname"/>
+
+      <condition property="abcl.java.version">
+	<matches string="${java.version}" pattern="1\.5"/>
+      </condition>
+      <echo>java.version: ${java.version}</echo>
+    </target>
+    
+    <target name="abcl.java.warning" unless="abcl.java.version">
+      <echo>WARNING: Java version ${java.version} not recommended.</echo>
+    </target>
+	
+    <target name="abcl.compile.java" 
+	    depends="abcl.pre-compile,abcl.java.warning">
+      <tstamp>
+	<format property="build" pattern="EEE MMM dd yyyy HH:mm:ss zzz"/>
+      </tstamp>
+
+      <javac destdir="${build.classes.dir}"
+	     debug="true"
+	     target="1.5">
+	<src path="${src.dir}"/>
+	<patternset refid="abcl.source.java"/>
+      </javac>
+      <echo message="${build}" 
+	    file="${build.classes.dir}/org/armedbear/lisp/build"/>
+    </target>
+
+    <target name="j.compile" depends="j.pre-compile">
+      <javac destdir="${build.classes.dir}"
+	     debug="true"
+	     target="1.5">
+	<src path="${src.dir}"/>
+	<patternset refid="j.source"/>
+      </javac>
+    </target>
+
+    <target name="abcl.copy.lisp">
+      <copy todir="${build.classes.dir}" preservelastmodified="yes">
+	<fileset dir="${src.dir}">
+	  <patternset refid="abcl.source.lisp"/>
+	</fileset>
+      </copy>
+    </target>
+
+
+    <!-- Adjust the patternset for ABCL source to use the much faster
+         Ant 'uptodate' task to check if we need to compile the system
+         fasls. -->
+    <patternset id="abcl.source.lisp.fasls">
+      <patternset refid="abcl.source.lisp"/>
+      <exclude name="org/armedbear/lisp/tests/*.lisp"/>
+      <exclude name="org/armedbear/lisp/autoloads.lisp"/>
+      <exclude name="org/armedbear/lisp/boot.lisp"/>
+      <exclude name="org/armedbear/lisp/emacs.lisp"/>
+      <exclude name="org/armedbear/lisp/with-mutex.lisp"/>
+      <exclude name="org/armedbear/lisp/swank-xcl.lisp"/>
+      <exclude name="org/armedbear/lisp/swank-sbcl.lisp"/>
+      <exclude name="org/armedbear/lisp/swank-package.lisp"/>
+      <exclude name="org/armedbear/lisp/swank-loader.lisp"/>
+      <exclude name="org/armedbear/lisp/swank-allegro.lisp"/>
+      <exclude name="org/armedbear/lisp/slime-loader.lisp"/>
+      <exclude name="org/armedbear/lisp/runtime-class.lisp"/>
+      <exclude name="org/armedbear/lisp/run-benchmarks.lisp"/>
+      <exclude name="org/armedbear/lisp/print-object.lisp"/>
+      <exclude name="org/armedbear/lisp/package.lisp"/>
+      <exclude name="org/armedbear/lisp/j.lisp"/>
+    </patternset>
+
+    <target name="abcl.fasls.uptodate">
+      <uptodate property="abcl.fasls.uptodate.p" value="true">
+	<srcfiles dir="${build.classes.dir}">
+	  <patternset refid="abcl.source.lisp.fasls"/>
+	</srcfiles>
+	<mapper type="glob" from="*.lisp" to="*.abcl"/>
+      </uptodate>
+    </target>
+    
+    <target name="abcl.compile.lisp" 
+	    depends="abcl.copy.lisp,abcl.compile.java,abcl.fasls.uptodate"
+	    unless="abcl.fasls.uptodate.p">
+      <java classpath="${build.classes.dir}"
+	    fork="true"
+	    classname="org.armedbear.lisp.Main">
+	<arg value="--noinit"/>
+	<arg value="--eval"/>
+	<arg value="(compile-system :zip nil :quit t)"/>
+      </java>
+    </target>
+
+    <target name="abcl.jar" depends="abcl.compile,abcl.stamp">
+      <loadfile property="abcl.version"
+		  srcFile="${abcl.version.path}"/>
+      <jar destfile="${abcl.jar.path}"
+	   compress="true"
+	   basedir="${build.classes.dir}">
+	<patternset refid="abcl.objects"/>
+	<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.version}"/>
+	    <attribute name="Implementation-Build" 
+		       value="${build}"/>
+	  </section>
+	</manifest>
+      </jar>
+    </target>
+    
+    <target name="abcl.debug.jpda" depends="abcl.jar">
+      <description>Invoke ABCL with JPDA listener on port 6789</description>
+      <java fork="true"
+	    classpathref="abcl.classpath.dist"
+	    classname="org.armedbear.lisp.Main">
+	<jvmarg 
+	    value="-agentlib:jdwp=transport=dt_socket,address=6789,server=y"/>
+      </java>
+    </target>
+
+    <target name="abcl.run" depends="abcl.jar">
+      <java fork="true"
+	    classpathref="abcl.classpath.dist"
+	    classname="org.armedbear.lisp.Main">
+      </java>
+    </target>
+
+    <target name="abcl.wrapper" 
+	    depends="abcl.jar,abcl.wrapper.unix,abcl.wrapper.windows">
+      <description>
+	Creates in-place exectuable shell wrapper in '${abcl.wrapper.file}'
+      </description>
+      <!-- Set from commandline or in 'build.properties' -->
+      <property name="additional.jars" value=""/>
+      <path id="abcl.runtime.classpath">
+	<pathelement location="${abcl.jar.path}"/>
+	<pathelement path="${additional.jars}"/>
+      </path>
+      <!-- set via '-Djava.options=JAVA_OPTIONS' or in 'build.properties -->
+      <property name="java.options" value=""/>
+
+      <copy file="${abcl.wrapper.in.file}" toFile="${abcl.wrapper.file}" overwrite="yes">
+	<filterset>
+	  <filter token="JAVA" 
+		  value="${java.path}"/>
+	  <filter token="ABCL_JAVA_OPTIONS" 
+		  value= "${java.options}"/>
+	  <filter token="ABCL_LIBPATH" 
+		  value="${basedir}/src/org/armedbear/lisp/libabcl.so"/>
+	  <filter token="ABCL_CLASSPATH" 
+		  value="${toString:abcl.runtime.classpath}"/>
+	</filterset>
+      </copy>
+      <chmod file="${abcl.wrapper.file}" perm="a+x"/>
+      <echo>N.B. This wrapper requires '${abcl.jar.path}' not be moved.</echo>
+    </target>
+
+    <target name="abcl.wrapper.unix" if="unix">
+      <property name="abcl.wrapper.file" value="abcl"/>
+      <property name="abcl.wrapper.in.file" value="abcl.in"/>
+    </target>
+
+    <target name="abcl.wrapper.windows" if="windows">
+      <property name="abcl.wrapper.file" value="abcl.bat"/>
+      <property name="abcl.wrapper.in.file" value="abcl.bat.in"/>
+    </target>
+
+    <target name="j.jar" depends="j.compile,j.stamp">
+      <copy todir="${build.classes.dir}">
+	<fileset dir="${basedir}/src">
+	  <patternset refid="j.objects"/>
+	  <patternset refid="j.resources.src"/>
+	</fileset>
+      </copy>
+      <jar destfile="${j.jar.path}" 
+	   compress="true"
+	   basedir="${build.classes.dir}">
+	<patternset refid="j.objects"/>
+	<patternset refid="j.resources.src"/>
+	<manifest>
+	  <attribute name="Main-Class" value="Main"/>
+	  <section name="org/armedbear/lisp">
+	    <attribute name="Implementation-Title" value="ABCL"/>
+	    <attribute name="Implementation-Version"  value="${abcl.version}"/>
+	  </section>
+	</manifest>
+      </jar>
+    </target>
+
+    <target name="j.dist" depends="j.jar">
+      <mkdir dir="${dist.dir}"/>
+      <copy todir="dist">
+	<fileset dir="${basedir}">
+	  <patternset refid="j.resources.top"/>
+	</fileset>
+      </copy>
+    </target>
+
+    <target name="abcl.clean">
+      <delete dir="${build.dir}"/>
+      <delete file="abcl"/>
+    </target>
+
+    <target name="abcl.dist" depends="abcl.jar">
+      <copy file="${abcl.jar.path}"
+	    toFile="${dist.dir}/abcl-${abcl.version}.jar"/>
+    </target>
+
+    <target name="abcl.distclean" depends="abcl.clean">
+      <delete dir="${dist.dir}"/>
+      <delete file="abcl"/>
+      <delete file="j"/>
+    </target>
+
+    <target name="TAGS">
+      <apply executable="etags" parallel="true" verbose="true">
+	<fileset dir="${src.dir}">
+	  <patternset refid="abcl.source.java"/>
+	  <patternset refid="abcl.source.lisp"/>
+	</fileset>
+      </apply>
+    </target>
+
+    <target name="j.jpty" depends="j.jpty.compile"/>
+
+    <target name="j.jpty.compile" if="unix">
+      <exec executable="gcc" dir="${src.dir}/jpty">
+	<arg line="-Wall -O2 jpty.c -o jpty"/>
+      </exec>
+    </target>
+
+    <target name="j.install" depends="j.jar,j.install.unix,j.install.windows">
+      <property name="j.install.data.dir" value="${j.install.root}/share"/>
+      <property name="j.install.bin.dir" value="${j.install.root}/bin"/>
+
+      <mkdir dir="${j.install.data.dir}/j"/>
+      <copy file="${dist.dir}/j.jar" todir="${j.install.data.dir}/j"/>
+      <!-- set via '-Djava.options=JAVA_OPTIONS' or in 'build.properties -->
+      <property name="java.options" value=""/>
+      <copy file="${j.wrapper.file}.in" toFile="${j.install.bin.dir}/${j.wrapper.file}">
+	<filterset>
+	  <filter token="JAVA" 
+		  value="${java.path}"/>
+	  <filter token="JAVA_OPTIONS" 
+		  value="${java.options}"/>
+	  <filter token="CLASSPATH"
+		  value="${j.install.data.dir}/j/j.jar"/>
+	</filterset>
+      </copy>
+      <chmod file="${j.install.bin.dir}/j" perm="ugo+rx"/>
+
+      <property name="j.install.themes.path"
+		value="${j.install.data.dir}/j/themes"/>
+      <mkdir dir="${j.install.themes.dir}"/>
+      <copy todir="{j.install.themes.dir}">
+	<fileset dir="${basedir}/themes"/>
+      </copy>
+
+      <property name="j.install.doc.path"
+		value="${j.install.data.dir}/doc/j"/>
+      <mkdir dir="${j.install.doc.dir}" />
+
+      <copy file="${basedir}/src/jpty/jpty" 
+            todir="${j.install.bin.dir}"
+	    failonerror="false"/>
+      <chmod file="${j.install.bin.dir}/jpty" perm="ugo+rx"/>
+      <copy todir="${j.install.data.dir}/doc/j">
+	<fileset dir="${basedir}/doc"/>
+      </copy>
+    </target>
+
+    <target name="j.install.unix" depends="j.jpty" if="unix">
+      <property name="j.install.root" value="/usr/local"/>
+      <property name="j.wrapper.file" value="j"/>
+    </target>
+
+    <target name="j.install.windows" depends="j.jpty" if="windows">
+      <property name="j.install.root" value="c:/j"/>
+      <property name="j.wrapper.file" value="j.bat"/>
+    </target>
+
+    <patternset id="abcl.source.misc"
+		description="Additional includes in the source distributions relative to basedir">
+      <include name="build.xml"/>
+      <include name="build.properties.in"/>
+      <include name="COPYING"/>
+      <include name="abcl.in"/>
+      <include name="test-abcl.asd"/>
+      <include name="build-abcl.asd"/>
+      <include name="build-abcl.lisp"/>
+      <include name="customizations.lisp.in"/>
+    </patternset>
+
+    <target name="abcl.source.prepare" depends="abcl.stamp.version">
+      <property name="abcl.source.eol" value="asis"/>
+      <echo>Using '${abcl.source.eol}' to drive line-ending transformations.</echo>
+      <property name="abcl.build.src.dir"
+		value="${build.dir}/abcl-src-${abcl.version}"/>
+      <mkdir dir="${abcl.build.src.dir}/src"/>
+      <fixcrlf srcdir="${src.dir}" 
+	       eol="${abcl.source.eol}"
+	       destdir="${abcl.build.src.dir}/src"
+	       preservelastmodified="true">
+	<patternset refid="abcl.source.java"/>
+	<patternset refid="abcl.source.lisp"/>
+      </fixcrlf>
+      <fixcrlf srcdir="${basedir}" 
+	       eol="${abcl.source.eol}"
+	       destdir="${abcl.build.src.dir}"
+	       preservelastmodified="true">
+	<patternset refid="abcl.source.misc"/>
+      </fixcrlf>
+    </target>
+
+    <target name="abcl.source.tar" depends="abcl.source.prepare">
+      <mkdir dir="${dist.dir}"/>
+      <tar destfile="${dist.dir}/abcl-src-${abcl.version}.tar.gz"
+	   compression="gzip">
+	<tarfileset dir="${build.dir}">
+	  <include name="abcl-src-${abcl.version}/**"/>
+	</tarfileset>
+      </tar>
+    </target>
+
+    <target name="abcl.source.zip" depends="abcl.source.prepare">
+      <mkdir dir="${dist.dir}"/>
+      <zip destfile="${dist.dir}/abcl-src-${abcl.version}.zip"
+	   compress="true">
+	<zipfileset dir="${abcl.build.src.dir}" prefix="abcl-src-${abcl.version}"/>
+      </zip>
+    </target>
+
+    <import file="netbeans-build.xml" optional="true"/> 
+<!--    <import file="j-build.xml" optional="true"/>  -->
+    <import file="not.org-build.xml" optional="true"/> 
+</project>
+




More information about the armedbear-cvs mailing list