Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 47 lines (40 sloc) 1.485 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
<project name="hiccup" default="jar">
  <description>
    Pack all hiccup sources into a JAR. Compile those that can be compiled
    standalone if the clojure.jar property points to clojure.jar, and the
    clojure-contrib.jar property points to clojure-contrib.jar.
  </description>

  <available property="hasclojure" file="${clojure.jar}"/>
  
  <property name="build.dir" location="classes"/>
  <property name="source.dir" location="src"/>
  <property name="hiccup.jar" location="hiccup.jar"/>

  <target name="clean" description="Remove generated files">
    <delete file="${hiccup.jar}"/>
    <delete dir="${build.dir}"/>
  </target>

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

  <target name="compile"
          depends="init"
          description="Compile sources"
          if="hasclojure">
    <java classname="clojure.lang.Compile">
      <classpath>
        <path location="${build.dir}"/>
        <path location="${source.dir}"/>
        <path location="${clojure.jar}"/>
        <path location="${clojure-contrib.jar}"/>
      </classpath>
      <sysproperty key="clojure.compile.path" value="${build.dir}"/>
      <arg value="hiccup"/>
    </java>
  </target>

  <target name="jar" description="Create jar file" depends="compile">
    <jar jarfile="${hiccup.jar}">
      <fileset dir="${source.dir}" includes="**/*.clj"/>
      <fileset dir="${build.dir}" includes="**/*.class"/>
    </jar>
  </target>
</project>
Something went wrong with that request. Please try again.