Permalink
Switch branches/tags
clojure-1.9.0-alpha17 clojure-1.9.0-alpha16 clojure-1.9.0-alpha15 clojure-1.9.0-alpha14 clojure-1.9.0-alpha13 clojure-1.9.0-alpha12 clojure-1.9.0-alpha11 clojure-1.9.0-alpha10 clojure-1.9.0-alpha9 clojure-1.9.0-alpha8 clojure-1.9.0-alpha7 clojure-1.9.0-alpha6 clojure-1.9.0-alpha5 clojure-1.9.0-alpha4 clojure-1.9.0-alpha3 clojure-1.9.0-alpha2 clojure-1.9.0-alpha1 clojure-1.8.0 clojure-1.8.0-beta2 clojure-1.8.0-beta1 clojure-1.8.0-alpha5 clojure-1.8.0-alpha4 clojure-1.8.0-alpha3 clojure-1.8.0-alpha2 clojure-1.8.0-alpha1 clojure-1.8.0-RC5 clojure-1.8.0-RC4 clojure-1.8.0-RC3 clojure-1.8.0-RC2 clojure-1.8.0-RC1 clojure-1.7.0 clojure-1.7.0-beta3 clojure-1.7.0-beta2 clojure-1.7.0-beta1 clojure-1.7.0-alpha6 clojure-1.7.0-alpha5 clojure-1.7.0-alpha4 clojure-1.7.0-alpha3 clojure-1.7.0-alpha2 clojure-1.7.0-alpha1 clojure-1.7.0-RC2 clojure-1.7.0-RC1 clojure-1.6.0 clojure-1.6.0-beta2 clojure-1.6.0-beta1 clojure-1.6.0-alpha3 clojure-1.6.0-alpha2 clojure-1.6.0-alpha1 clojure-1.6.0-RC4 clojure-1.6.0-RC3 clojure-1.6.0-RC2 clojure-1.6.0-RC1 clojure-1.5.1 clojure-1.5.0 clojure-1.5.0-beta13 clojure-1.5.0-beta12 clojure-1.5.0-beta11 clojure-1.5.0-beta10 clojure-1.5.0-beta9 clojure-1.5.0-beta8 clojure-1.5.0-beta7 clojure-1.5.0-beta2 clojure-1.5.0-beta1 clojure-1.5.0-alpha7 clojure-1.5.0-alpha6 clojure-1.5.0-alpha5 clojure-1.5.0-alpha4 clojure-1.5.0-alpha3 clojure-1.5.0-alpha2 clojure-1.5.0-alpha1 clojure-1.5.0-RC17 clojure-1.5.0-RC16 clojure-1.5.0-RC15 clojure-1.5.0-RC14 clojure-1.5.0-RC6 clojure-1.5.0-RC5 clojure-1.5.0-RC4 clojure-1.5.0-RC3 clojure-1.5.0-RC2 clojure-1.5.0-RC1 clojure-1.4.0 clojure-1.4.0-beta7 clojure-1.4.0-beta6 clojure-1.4.0-beta5 clojure-1.4.0-beta4 clojure-1.4.0-beta3 clojure-1.4.0-beta2 clojure-1.4.0-beta1 clojure-1.4.0-alpha5 clojure-1.4.0-alpha4 clojure-1.4.0-alpha3 clojure-1.4.0-alpha2 clojure-1.4.0-alpha1 clojure-1.3.0 clojure-1.3.0-beta3 clojure-1.3.0-beta2 clojure-1.3.0-beta1 clojure-1.3.0-alpha8 clojure-1.3.0-alpha7 clojure-1.3.0-alpha6
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
198 lines (179 sloc) 7.78 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_test.clj"/>
<property name="test-generative-script" location="${cljscript}/run_test_generative.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"/>
<property file="maven-classpath.properties"/>
<!-- 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"/>
<property name="directlinking" value="true"/>
<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"
includeAntRuntime="false"
debug="true" source="1.6" target="1.6"/>
</target>
<target name="compile-clojure"
description="Compile Clojure sources.">
<java classname="clojure.lang.Compile"
classpath="${maven.compile.classpath}:${build}:${cljsrc}"
failonerror="true"
fork="true">
<sysproperty key="clojure.compile.path" value="${build}"/>
<!--<sysproperty key="clojure.compiler.elide-meta" value="[:doc :file :line :added]"/>-->
<!--<sysproperty key="clojure.compiler.disable-locals-clearing" value="true"/>-->
<!--<sysproperty key="clojure.compile.warn-on-reflection" value="true"/>-->
<sysproperty key="clojure.compiler.direct-linking" value="true"/>
<sysproperty key="java.awt.headless" value="true"/>
<arg value="clojure.core"/>
<arg value="clojure.core.protocols"/>
<arg value="clojure.core.server"/>
<arg value="clojure.main"/>
<arg value="clojure.set"/>
<arg value="clojure.edn"/>
<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">
<mkdir dir="${test-classes}"/>
<javac srcdir="${jtestsrc}" destdir="${test-classes}" includeJavaRuntime="yes"
debug="true" source="1.6" target="1.6" includeantruntime="no"/>
<echo>Direct linking = ${directlinking}</echo>
<java classname="clojure.lang.Compile"
classpath="${test-classes}:${test}:${build}:${cljsrc}:${maven.test.classpath}"
failonerror="true"
fork="true">
<sysproperty key="clojure.compile.path" value="${test-classes}"/>
<!--<sysproperty key="clojure.compiler.elide-meta" value="[:doc]"/>-->
<!--<sysproperty key="clojure.compiler.disable-locals-clearing" value="true"/>-->
<sysproperty key="clojure.compiler.direct-linking" value="${directlinking}"/>
<arg value="clojure.test-clojure.protocols.examples"/>
<arg value="clojure.test-clojure.genclass.examples"/>
<arg value="clojure.test-clojure.compilation.load-ns"/>
<arg value="clojure.test-clojure.annotations"/>
</java>
</target>
<target name="test-example"
description="Run clojure tests without recompiling clojure."
depends="compile-tests"
unless="maven.test.skip">
<java classname="clojure.main" failonerror="true" fork="true">
<sysproperty key="clojure.test-clojure.exclude-namespaces"
value="#{clojure.test-clojure.compilation.load-ns}"/>
<sysproperty key="clojure.compiler.direct-linking" value="${directlinking}"/>
<classpath>
<pathelement path="${maven.test.classpath}"/>
<path location="${test-classes}"/>
<path location="${test}"/>
<path location="${build}"/>
<path location="${cljsrc}"/>
</classpath>
<arg value="${test-script}"/>
</java>
</target>
<target name="test-generative"
description="Run test generative tests without recompiling clojure."
depends="compile-tests"
unless="maven.test.skip">
<java classname="clojure.main" failonerror="true" fork="true">
<sysproperty key="clojure.compiler.direct-linking" value="${directlinking}"/>
<classpath>
<pathelement path="${maven.test.classpath}"/>
<path location="${test-classes}"/>
<path location="${test}"/>
<path location="${build}"/>
<path location="${cljsrc}"/>
</classpath>
<arg value="${test-generative-script}"/>
</java>
</target>
<target name="test"
description="Run all the tests"
depends="test-example,test-generative"/>
<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="javadoc"
description="Creates javadoc for Clojure API.">
<copy file="src/jvm/clojure/lang/IFn.java" tofile="target/tmpjd/IFn.java"/>
<copy file="src/jvm/clojure/lang/package.html" tofile="target/tmpjd/package.html"/>
<replaceregexp file="target/tmpjd/IFn.java" match="(static public interface .*})" replace="" byline="true"/>
<javadoc destdir="target/javadoc"
nodeprecatedlist="true" nohelp="true" nonavbar="true" notree="true"
link="http://docs.oracle.com/javase/7/docs/api/"
windowtitle="Clojure API">
<classpath>
<path location="${build}"/>
</classpath>
<fileset dir="${basedir}">
<include name="src/jvm/clojure/java/api/Clojure.java"/>
<include name="target/tmpjd/IFn.java"/>
</fileset>
</javadoc>
</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>