<project
    name="Ibis documentation build"
    default="build"
    basedir=".">

    <description>
	Ibis documentation build.
    </description>

    <property name="ibis"        location=".."/>
    <property name="src"         location="${ibis}/src"/>

    <import file="${ibis}/build-files/build-properties.xml"/>

    <target name="api">
	<!-- Create the javadoc directory -->
	<delete dir="api"/>
	<mkdir dir="api"/>
	<javadoc
		sourcepath="${src}"
		destdir="api"
		author="true"
		version="true"
		use="true"
		public="true"
		windowtitle="Ibis Documentation"
		overview="src/overview.html"
		doctitle="Ibis Documentation"
		bottom="The Ibis project">
	    <classpath refid="default.classpath"/>
	    <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
	    <package name="ibis.ipl"/>
	    <!--
	    <package name="ibis.io"/>
	    -->
	    <package name="ibis.gmi"/>
	    <package name="ibis.rmi"/>
	    <package name="ibis.rmi.server"/>
	    <package name="ibis.rmi.registry"/>
	    <package name="ibis.satin"/>
	    <package name="ibis.util"/>
	    <group title="Ibis GMI" packages="ibis.gmi"/>
	    <group title="Ibis RMI" packages="ibis.rmi:ibis.rmi.registry:ibis.rmi.server"/>
	    <group title="Ibis IPL" packages="ibis.ipl"/>
	    <group title="Ibis Satin" packages="ibis.satin"/>
	    <group title="Ibis Utilities" packages="ibis.util"/>
	</javadoc>
    </target>

    <target name="api-pdf">
	<javadoc
		sourcepath="${src}"
		doclet="com.aurigalogic.doclet.core.Doclet"
		docletpath="/home2/ceriel/aurigadoclet/bin/AurigaDoclet.jar"
		additionalparam="-format pdf -out api.pdf"
		author="true"
		version="true"
		public="true"
		overview="src/overview.html">
	    <classpath refid="default.classpath"/>
	    <package name="ibis.ipl"/>
	    <!--
	    <package name="ibis.io"/>
	    -->
	    <package name="ibis.gmi"/>
	    <package name="ibis.rmi"/>
	    <package name="ibis.rmi.server"/>
	    <package name="ibis.rmi.registry"/>
	    <package name="ibis.satin"/>
	    <package name="ibis.util"/>
	</javadoc>
    </target>

    <target name="developer-api">
	<!-- Create the javadoc directory -->
	<delete dir="dev-api"/>
	<mkdir dir="dev-api"/>
	<javadoc
		sourcepath="${src}"
		destdir="dev-api"
		author="true"
		version="true"
		use="true"
		private="true"
		windowtitle="Ibis Documentation"
		overview="src/overview.html"
		doctitle="Ibis Documentation"
		bottom="The Ibis project">
	    <classpath refid="default.classpath"/>
	    <link href="http://java.sun.com/j2se/1.4.2/docs/api/"/>
	    <package name="ibis.ipl"/>
	    <package name="ibis.impl.*"/>
	    <package name="ibis.io"/>
	    <package name="ibis.gmi"/>
	    <package name="ibis.rmi"/>
	    <package name="ibis.rmi.*"/>
	    <package name="ibis.util"/>
	    <package name="ibis.satin"/>
	    <package name="ibis.satin.*"/>
	    <group title="Ibis GMI" packages="ibis.gmi"/>
	    <group title="Ibis RMI" packages="ibis.rmi:ibis.rmi.registry:ibis.rmi.server"/>
	    <group title="Ibis IPL" packages="ibis.ipl"/>
	    <group title="Ibis IO" packages="ibis.io"/>
	    <group title="Ibis Satin" packages="ibis.satin:ibis.satin.impl"/>
	    <group title="Ibis Utilities" packages="ibis.util"/>
	    <!--
	    <arg value="-verbose"/>
	    <arg line="-source 1.4"/>
	    <arg value="-notree"/>
	    <arg value="-noindex"/>
	    -->
	</javadoc>
    </target>

    <target name="progman">
	    <ant dir="src" target="build"/>
    </target>

    <target name="build"
	    depends="api, progman">
    </target>

    <target name="dev-build"
	    depends="build, developer-api">
    </target>

    <target name="clean">
	    <ant dir="src" target="clean"/>
    </target>

    <target name="distclean"
	    depends="clean">
	    <delete dir="api"/>
	    <delete dir="dev-api"/>
	    <delete dir="progman"/>
	    <delete file="progman.pdf"/>
    </target>

</project>
