<project name="reddit Pig UDFs" default="dist" basedir=".">
    <property name="src" location="src/" />
    <property name="build" location="build/" />
    <property name="dist" location="dist/" />
    <property environment="env" />

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

    <target name="compile" depends="init">
        <javac srcdir="${src}" destdir="${build}" includeantruntime="false">
            <classpath>
                <pathelement location="${env.PIG_HOME}/pig.jar" />
            </classpath>
        </javac>
    </target>

    <target name="dist" depends="compile">
        <mkdir dir="${dist}/lib" />
        <jar jarfile="${dist}/lib/reddit-pig-udfs.jar" basedir="${build}" />
    </target>

    <target name="clean">
        <delete dir="${build}" />
        <delete dir="${dist}" />
    </target>
</project>
