<project name="AntManual" default="taskdocs" basedir=".">

  <property file="${basedir}/build.properties"/>

  <property name="lib.dir" location="${basedir}/lib" />
  <property name="build.dir" location="${basedir}/../build" />
  <property name="docs.src" location="${basedir}/../../../xdocs" />
  <property name="taskdocs.src" location="${build.dir}/gen" />
  <property name="stylesheet" location="${docs.src}/stylesheets/project.xml"/>

  <!-- The docs destination directory  -->
  <property name="docs.dest" location="${build.dir}/docs"/>
  <property name="manual.dest" location="${docs.dest}/manual" />
  <property name="xdocs.dir" location="${basedir}/xdocs"/>
  <property name="stylesheet.dir" location="${xdocs.dir}/stylesheets"/>

  <!-- Construct compile classpath -->
  <path id="classpath">
    <fileset dir="${lib.dir}">
      <include name="**/*.jar"/>
    </fileset>
  </path>

  <target name="init">
    <taskdef name="dvsl" classname="org.apache.tools.dvsl.DVSLTask">
      <classpath>
        <path refid="classpath"/>
      </classpath>
    </taskdef>
    <!-- Make stuff available relative to current location -->
    <mkdir dir="${stylesheet.dir}" />
    <copy todir="${stylesheet.dir}" file="${stylesheet}"/>
  </target>

  <target name="taskdocs" depends="init"
          description="Generate Task Documentation">
    <dvsl basedir="${taskdocs.src}" destdir="${manual.dest}"
          style="task.dvsl" extension=".html"
          toolboxfile="toolbox.props"
          includes="**/*.xml">
      <velconfig name="velocimacro.library" value="" />
    </dvsl>
  </target>

</project>
