Commits

Meikel Brandmeyer  committed aaa3092

Added build.xml and precompile.clj for AOT

* build.xml, precompile.clj: new files

  • Participants
  • Parent commits 2a42029

Comments (0)

Files changed (1)

+<project name="monad" default="jar">
+
+	<description>
+		Build with "ant jar".
+	</description>
+
+	<property environment="env"/>
+
+	<property name="src" location="src"/>
+	<property name="build" location="classes"/>
+	<property name="monad_jar" location="monad.jar"/>
+	<property name="precompile" location="precompile.clj"/>
+	<property name="clojure.lib" location="${env.CLOJURE_LIB}"/>
+
+	<path id="clojurelib">
+		<fileset dir="${clojure.lib}" includes="**/*.jar"/>
+	</path>
+
+	<target name="init">
+		<tstamp/>
+		<mkdir dir="${build}"/>
+	</target>
+
+	<target name="aot" depends="init"
+		description="Compile Clojure sources.">
+		<java classname="clojure.lang.Compile">
+			<classpath>
+				<path location="${build}"/>
+				<path location="${src}"/>
+				<path refid="clojurelib"/>
+			</classpath>
+			<sysproperty key="clojure.compile.path"
+				value="${build}"/>
+			<arg value="de.kotka.monad"/>
+		</java>
+	</target>
+
+	<target name="jar" depends="aot"
+		description="Create jar file.">
+		<jar jarfile="${monad_jar}" basedir="${build}">
+			<fileset dir="${src}" includes="**/*.clj"/>
+			<manifest>
+				<attribute name="Class-Path" value="."/>
+			</manifest>
+		</jar>
+	</target>
+
+	<target name="clean"
+		description="Remove autogenerated files and directories.">
+		<delete dir="${build}"/>
+		<delete file="${jar}"/>
+	</target>
+
+</project>