This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: building Kawa with Ant
- From: Jim White <jim at pagesmiths dot com>
- To: Per Bothner <per at bothner dot com>,kawa at sources dot redhat dot com
- Date: Wed, 14 Nov 2001 03:52:44 -0800
- Subject: Re: building Kawa with Ant
At 12:06 AM 11/14/2001 -0800, Per Bothner wrote:
>I've started hacking together a build.xml for building Kawa with Ant.
>My first attempt is attached below, but I could do with some help from
>people with experience with Ant. (Jim White offered to do this, but
>then I started reading the Ant manual and hacking things together and
>shortly I had what you see below!)
Sorry I wasn't more timely with this.
>The most immediate problem is the "jar" target. It builds a .jar
>file - but one without a single .class files. Anyone see what I am doing wrong?
Add the basedir attribute, and it's happy.
Also the java task should have a classpath attribute (not everyone includes "." in their classpath).
Works dandy on Windows.
Here it is with those adjustments:
<?xml version="1.0"?>
<!-- A build file for use by Ant to build Kawa. -->
<project name="Kawa" default="all">
<property name="version" value="1.6.97"/>
<property name="debug" value="true" />
<property name="deprecation" value="false" />
<property name="optimize" value="true" />
<property name="srcdir" value="."/>
<property name="builddir" value="."/>
<target name="all" depends="classes,jar"/>
<target name="classes">
<copy todir="gnu/lists">
<fileset dir="gnu/lists"/>
<mapper type="glob" from="*.java.in" to="*.java"/>
<filterset>
<filter token="if WITHOUT COLLECTIONS" value="/*" />
<filter token="endif WITHOUT COLLECTIONS" value="*/" />
<filter token="if WITH COLLECTIONS" value="" />
<filter token="endif WITH COLLECTIONS" value="" />
<filter token="-*-Java-*-" value="Automatically generated file - DO NOT EDIT!. -*- buffer-read-only: t -*-" />
</filterset>
</copy>
<javac srcdir="${srcdir}"
destdir="${builddir}"
debug="${debug}"
deprecation="${deprecation}"
optimize="${optimize}" >
<include name="gnu/bytecode/"/>
<include name="gnu/lists/"/>
<include name="gnu/math/"/>
<include name="gnu/text/"/>
<include name="gnu/mapping/"/>
<include name="gnu/expr/"/>
<include name="gnu/kawa/functions/"/>
<include name="gnu/kawa/lispexpr/"/>
<include name="gnu/kawa/reflect/"/>
<include name="gnu/commonlisp/lang/"/>
<include name="kawa/lang/"/>
<include name="kawa/standard/"/>
<include name="kawa/*.java"/>
</javac>
<java classname="kawa.repl" classpath="${builddir}">
<arg line="-d . -P kawa.lib. --module-static -C"/>
<arg path="kawa/lib/std_syntax.scm"/>
<arg path="kawa/lib/reflection.scm"/>
<arg path="kawa/lib/syntax.scm"/>
<arg path="kawa/lib/lists.scm"/>
<arg path="kawa/lib/thread.scm"/>
<arg path="kawa/lib/characters.scm"/>
<arg path="kawa/lib/files.scm"/>
<arg path="kawa/lib/keywords.scm"/>
<arg path="kawa/lib/ports.scm"/>
<arg path="kawa/lib/misc.scm"/>
<arg path="kawa/lib/numbers.scm"/>
<arg path="kawa/lib/strings.scm"/>
<arg path="kawa/lib/vectors.scm"/>
<arg path="kawa/lib/uniform.scm"/>
<arg path="kawa/lib/system.scm"/>
<arg path="kawa/lib/trace.scm"/>
<arg path="kawa/lib/windows.scm"/>
</java>
</target>
<target name="jar">
<jar jarfile="kawa-${version}.jar" manifest="${srcdir}/jar-manifest" basedir="${builddir}">
<include name="gnu/**/*.class"/>
<include name="kawa/**/*.class"/>
</jar>
</target>
<target name="clean">
<delete>
<fileset dir="gnu/lists" includes="AbstractSequence.java,Convert.java,Sequence.java,SeqPosition.java,SimpleVector.java"/>
<fileset dir="." includes="**/*.class"/>
</delete>
</target>
</project>
jim
----------------------------------------------------------------
James P. White Netscape DevEdge Champion for IFC
IFC Exchange * Insanely great Java * http://www.ifcx.org
jim@pagesmiths.com Pagesmiths' home is http://www.pagesmiths.com