Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (63 sloc) 2.4 KB
<project name="clojure" default="all">
<description>
Build with "ant jar" and then start the REPL with:
"java -cp clojure.jar clojure.main"
</description>
<property name="src" location="src"/>
<property name="jsrc" location="${src}/jvm"/>
<property name="cljsrc" location="${src}/clj"/>
<property name="build" location="classes"/>
<property name="clojure_jar" location="clojure.jar"/>
<property name="slim_jar" location="clojure-slim.jar"/>
<target name="init" depends="clean">
<tstamp/>
<mkdir dir="${build}"/>
</target>
<target name="compile-java" depends="init"
description="Compile Java sources.">
<javac srcdir="${jsrc}" destdir="${build}" includeJavaRuntime="yes"
debug="true" target="1.5"/>
</target>
<target name="compile-clojure" depends="compile-java"
description="Compile Clojure sources.">
<java classname="clojure.lang.Compile"
classpath="${build}:${cljsrc}">
<sysproperty key="clojure.compile.path" value="${build}"/>
<arg value="clojure.core"/>
<arg value="clojure.main"/>
<arg value="clojure.set"/>
<arg value="clojure.xml"/>
<arg value="clojure.zip"/>
<arg value="clojure.inspector"/>
</java>
</target>
<target name="clojure" depends="compile-clojure"
description="Create clojure jar file.">
<jar jarfile="${clojure_jar}" basedir="${build}">
<fileset dir="${cljsrc}" includes="**/*.clj"/>
<manifest>
<attribute name="Main-Class" value="clojure.main"/>
<attribute name="Class-Path" value="."/>
</manifest>
</jar>
</target>
<target name="clojure-slim" depends="compile-java"
description="Create clojure-slim jar file (omits compiled Clojure code)">
<jar jarfile="${slim_jar}">
<fileset dir="${build}" includes="clojure/asm/**"/>
<fileset dir="${build}" includes="clojure/lang/**"/>
<fileset dir="${build}" includes="clojure/main.class"/>
<fileset dir="${cljsrc}" includes="**/*.clj"/>
<manifest>
<attribute name="Main-Class" value="clojure.main"/>
<attribute name="Class-Path" value="."/>
</manifest>
</jar>
</target>
<target name="jar" depends="clojure"/>
<target name="all" depends="clojure,clojure-slim"/>
<target name="clean"
description="Remove autogenerated files and directories.">
<delete dir="${build}"/>
</target>
</project>
Something went wrong with that request. Please try again.