Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: clojure-1.3.0-…
Fetching contributors…

Cannot retrieve contributors at this time

138 lines (123 sloc) 5.065 kb
<project name="clojure" default="all">
<description>
Build with "ant" and then start the
REPL with: "java -cp clojure.jar clojure.main".
</description>
<property name="src" location="src"/>
<property name="test" location="test"/>
<property name="jsrc" location="${src}/jvm"/>
<property name="jtestsrc" location="${test}/java"/>
<property name="cljsrc" location="${src}/clj"/>
<property name="cljscript" location="${src}/script"/>
<property name="test-script" location="${cljscript}/run_tests.clj"/>
<property name="compile-script" location="${cljscript}/bootstrap_compile.clj"/>
<property name="target" location="target"/>
<property name="build" location="${target}/classes"/>
<property name="test-classes" location="${target}/test-classes"/>
<property name="dist" location="dist"/>
<!-- Get the version string out of the POM -->
<xmlproperty file="pom.xml" prefix="pom"/>
<property name="clojure.version.label" value="${pom.project.version}"/>
<property name="version.properties" value="${build}/clojure/version.properties"/>
<property name="clojure_jar" location="clojure-${clojure.version.label}.jar"/>
<property name="clojure_noversion_jar" location="clojure.jar"/>
<target name="init" depends="clean">
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${build}/clojure"/>
<echo file="${version.properties}">version=${clojure.version.label}</echo>
</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"
description="Compile Clojure sources.">
<java classname="clojure.lang.Compile"
classpath="${build}:${cljsrc}"
failonerror="true"
fork="true">
<sysproperty key="clojure.compile.path" value="${build}"/>
<!-- <sysproperty key="clojure.compile.warn-on-reflection" value="true"/> -->
<arg value="clojure.core"/>
<arg value="clojure.core.protocols"/>
<arg value="clojure.main"/>
<arg value="clojure.set"/>
<arg value="clojure.xml"/>
<arg value="clojure.zip"/>
<arg value="clojure.inspector"/>
<arg value="clojure.walk"/>
<arg value="clojure.stacktrace"/>
<arg value="clojure.template"/>
<arg value="clojure.test"/>
<arg value="clojure.test.tap"/>
<arg value="clojure.test.junit"/>
<arg value="clojure.pprint"/>
<arg value="clojure.java.io"/>
<arg value="clojure.repl"/>
<arg value="clojure.java.browse"/>
<arg value="clojure.java.javadoc"/>
<arg value="clojure.java.shell"/>
<arg value="clojure.java.browse-ui"/>
<arg value="clojure.string"/>
<arg value="clojure.data"/>
<arg value="clojure.reflect"/>
</java>
</target>
<target name="compile-tests"
description="Compile the subset of tests that require compilation."
unless="maven.test.skip">
<delete dir="${test-classes}"/>
<mkdir dir="${test-classes}"/>
<!-- <javac srcdir="${jtestsrc}" destdir="${test-classes}" includeJavaRuntime="yes" -->
<!-- debug="true" target="1.5" includeantruntime="no"/> -->
<java classname="clojure.lang.Compile"
classpath="${test-classes}:${test}:${build}:${cljsrc}"
failonerror="true"
fork="true">
<sysproperty key="clojure.compile.path" value="${test-classes}"/>
<arg value="clojure.test-clojure.protocols.examples"/>
<arg value="clojure.test-clojure.genclass.examples"/>
</java>
</target>
<target name="test"
description="Run clojure tests without recompiling clojure."
depends="compile-tests"
unless="maven.test.skip">
<java classname="clojure.main" failonerror="true" fork="true">
<classpath>
<path location="${test-classes}"/>
<path location="${test}"/>
<path location="${build}"/>
<path location="${cljsrc}"/>
</classpath>
<arg value="${test-script}"/>
</java>
</target>
<target name="build"
description="Build Clojure (compilation only, no tests)."
depends="compile-java, compile-clojure"/>
<target name="jar" depends="build"
description="Create clojure jar file.">
<jar jarfile="${clojure_jar}" basedir="${build}">
<fileset dir="${cljsrc}">
<include name="**/*.clj"/>
</fileset>
<manifest>
<attribute name="Main-Class" value="clojure.main"/>
<attribute name="Class-Path" value="."/>
</manifest>
</jar>
<copy file="${clojure_jar}" tofile="${clojure_noversion_jar}"/>
</target>
<target name="all" depends="build,test,jar"/>
<target name="clean"
description="Remove autogenerated files and directories.">
<delete dir="${target}"/>
<delete verbose="true">
<fileset dir="${basedir}" includes="*.jar"/>
<fileset dir="${basedir}" includes="*.zip"/>
</delete>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.