Source

vimclojure / build.xml

<project name="vimclojure" default="all">

	<description>
		Build with "ant all".
	</description>

	<property environment="env"/>

	<property name="src" location="src"/>
	<property name="build" location="classes"/>
	<property name="jarfile" location="vimclojure.jar"/>

	<property file="local.properties"/>

	<target name="init" depends="clean">
		<tstamp/>
		<mkdir dir="${build}"/>
	</target>

	<target name="aot" depends="init,nailgun-server"
		description="Compile Clojure sources.">
		<java classname="clojure.lang.Compile">
			<classpath>
				<pathelement location="${build}"/>
				<pathelement location="${src}"/>
				<pathelement location="${clojure.jar}"/>
				<pathelement location="${clojure-contrib.jar}"/>
			</classpath>
			<sysproperty key="clojure.compile.path" value="${build}"/>
			<arg value="de.kotka.vimclojure.gencompletions"/>
			<arg value="de.kotka.vimclojure.util"/>
			<arg value="de.kotka.vimclojure.repl"/>
			<arg value="de.kotka.vimclojure.backend"/>
			<arg value="de.kotka.vimclojure.nails"/>
		</java>
	</target>

	<target name="nailgun-server" depends="init"
		description="Compile the nailgun server.">
		<javac destdir="${build}" srcdir="${src}"
			includes="org/apache/**/*.java">
		</javac>
		<javac destdir="${build}" srcdir="${src}"
			includes="com/martiansoftware/**/*.java">
		</javac>
		<copy todir="${build}">
			<fileset dir="${src}" includes="com/martiansoftware/**"
				excludes="com/martiansoftware/**/*.java"/>
		</copy>
	</target>

	<target name="nailgun-client"
		description="Compile the nailgun client using make.">
		<exec executable="make">
			<arg value="${nailgun-client}"/>
		</exec>
	</target>

	<target name="jar" depends="aot,nailgun-server"
		description="Create jar file.">
		<jar jarfile="${jarfile}">
			<path location="README.txt"/>
			<path location="LICENSE.txt"/>
			<fileset dir="${src}" includes="**/*.clj"/>
			<fileset dir="${build}" includes="de/kotka/**"/>
			<fileset dir="${build}" includes="org/apache/**"/>
			<fileset dir="${build}" includes="com/martiansoftware/**"/>
			<fileset dir="${build}" includes="clojure/proxy/**"/>
			<manifest>
				<attribute name="Class-Path" value="."/>
			</manifest>
		</jar>
	</target>

	<target name="all" depends="jar,nailgun-client"/>

	<target name="clean"
		description="Remove autogenerated files and directories.">
		<delete dir="${build}"/>
		<delete file="${jarfile}"/>
		<delete file="${nailgun-client}"/>
	</target>

</project>
<!-- vim: set ts=4 sw=4 : -->