<?xml version="1.0" encoding="UTF-8"?>

<!-- -->
<!-- ENVIRONMENT INITIALIZATION SECTION -->
<!-- -->
<project name="doxygenditaug" default="xhtml">
	<!-- This message is echoed to the screen at the beginning of the build process -->
	<!-- -->
	<!-- To process using a different map, you need to change the following statement -->
	<!-- -->
	<echo> </echo>
	<echo>Building Doxygen DITA Edition 0.1 User Guide</echo>
	<echo> </echo>
	<!-- Allow the build process access to environment variables -->
	<property environment="env"/>
	<!-- Set toolkit directory from environment variable -->
	<property name="toolkit_dir" value="${env.DITA_DIR}"/>
	<!-- Note: basedir may be set in a higher-level script that invokes this one.
  Some plug-ins depend on its pointing to the Toolkit directory.  
  In particular, the Idiom plug-in, which is required for PDF2 processing, requires it. -->
	<property name="basedir" value="${env.DITA_DIR}"/>
	<!-- Define the location of the project (source file) directory.
  In this case, the project directory is up two directory levels from the location of this file. -->
	<property name="projdir" value="${ant.file}/../.."/>
	<!-- Define the location of the output directory.
  In this case, it is a directory directly above the project (source file) directory. -->
	<property name="outdir" value="${projdir}/../DoxygenDITAEditionUserGuide"/>
	<property name="args.logdir" value="${outdir}"/>
	<!-- Set the name of the (master) ditamap -->
	<!-- -->
	<!-- To process using a different map, you need to change the following value -->
	<!-- -->
	<property name="MAP_file" value="DoxygenDITAEditionUserGuide.ditamap"/>
	<!-- Set the extension string for the dita files (files can also be .xml) -->
	<property name="EXTNAME" value=".dita"/>
	<property name="args.css" value="${projdir}/css/doxygenditaug.css"/>
	<property name="args.csspath" value="CSS"/>
	<property name="args.copycss" value="yes"/>	
	<!-- Define the path to the Java code -->
	<path id="dost.class.path">
		<pathelement location="${toolkit_dir}${file.separator}lib${file.separator}dost.jar"/>
	</path>
	<!-- Define the Ant targets and initialize the DITA processing environment -->
	<taskdef name="integrate" classname="org.dita.dost.platform.IntegratorTask">
		<classpath refid="dost.class.path"/>
	</taskdef>
	<!-- Create the default XHTML output and debug cross-reference -->
	<target name="xhtml" depends="integrate, dita2xhtml">
  </target>
	<target name="integrate">
		<integrate ditadir="${toolkit_dir}"/>
	</target>
	<!-- -->
	<!-- BEGIN INSTANCE PROCESSING SECTION -->
	<!-- -->
	<!-- Names of the output types this script is capable of producing -->
	<!-- The target names are somewhat arbitrary. The following are traditional,
  and they allude to the source and target (for example, dita2xhtml). -->
  <!-- JavaHelp and PDF (using FOP) are not included in this list, because they don't work in Toolkit 1.3.1! -->
	<target name="alltargets" depends="integrate, dita2xhtml, dita2filtered, dita2htmlhelp, dita2pdf2,  
     dita2eclipsecontent, dita2eclipsehelp, dita2docbook, dita2javahelp, dita2troff, dita2wordrtf">
  </target>
	<!-- Handy abbreviation (all) for alltargets -->
	<target name="all" depends="alltargets"/>
	<!-- Create xhtml output (unfiltered) -->
	<target name="dita2xhtml">
		<ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
		    <!-- -->
			<!-- To process using a different map, you need to change the following value -->
			<!-- -->
			<property name="args.input" value="${projdir}/${MAP_file}"/>
			<property name="output.dir" value="${outdir}/xhtml"/>
			<!-- -->
			<!-- To process using a different map, you need to change the following value -->
			<!-- -->
			<!-- The temp directory is shared by all targets -->
			<property name="dita.temp.dir" value="${outdir}/temp"/>
			<property name="transtype" value="xhtml"/>
			<property name="args.draft" value="yes"/>
			<property name="args.indexshow" value="yes"/>
			<property name="dita.extname" value="${EXTNAME}"/>
		</ant>
	</target>
	<!-- Create xhtml output (filtered) -->
	<!-- The output file directory is structured so the filtered output files will not "step on" the existing files.
    They will be placed one level deeper than the existing hierarchy files. -->
	<target name="dita2filtered">
		<ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
			<property name="args.input" value="${projdir}/${MAP_file}"/>
			<property name="output.dir" value="${outdir}/filtered/xhtml"/>
			<!-- The temp directory is shared by all targets -->
			<property name="dita.temp.dir" value="${outdir}/filtered//temp"/>
			<property name="transtype" value="xhtml"/>
			<property name="args.draft" value="yes"/>
			<property name="args.indexshow" value="yes"/>
			<property name="dita.extname" value="${EXTNAME}"/>
		</ant>
	</target>
	<!-- Create htmlhelp output -->
	<target name="dita2htmlhelp">
		<ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
			<property name="args.input" value="${projdir}/${MAP_file}"/>
			<property name="output.dir" value="${outdir}/htmlhelp"/>
			<!-- The temp directory is shared by all targets -->
			<property name="dita.temp.dir" value="${outdir}/temp"/>
			<property name="transtype" value="htmlhelp"/>
			<property name="args.draft" value="yes"/>
			<property name="args.indexshow" value="yes"/>
			<property name="dita.extname" value="${EXTNAME}"/>
		</ant>
	</target>
	<!-- Create idiom fo pdf2 output -->
	<target name="dita2pdf2">
		<ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
			<property name="args.input" value="${projdir}/${MAP_file}"/>
			<property name="output.dir" value="${outdir}/pdf2"/>
			<!-- The temp directory is shared by all targets -->
			<property name="dita.temp.dir" value="${outdir}/temp"/>
			<property name="transtype" value="pdf2"/>
			<property name="args.draft" value="yes"/>
			<property name="args.indexshow" value="yes"/>
			<property name="dita.extname" value="${EXTNAME}"/>
		</ant>
	</target>
	<!-- Create eclipsecontent output -->
	<target name="dita2eclipsecontent">
		<ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
			<property name="args.input" value="${projdir}/${MAP_file}"/>
			<property name="output.dir" value="${outdir}/eclipsecontent"/>
			<!-- The temp directory is shared by all targets -->
			<property name="dita.temp.dir" value="${outdir}/temp"/>
			<property name="transtype" value="eclipsecontent"/>
			<property name="args.draft" value="yes"/>
			<property name="args.indexshow" value="yes"/>
			<property name="dita.extname" value="${EXTNAME}"/>
		</ant>
	</target>
	<!-- Create eclipsehelp output -->
	<target name="dita2eclipsehelp">
		<ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
			<property name="args.input" value="${projdir}/${MAP_file}"/>
			<property name="output.dir" value="${outdir}/garage_top_1.0"/>
			<!-- The temp directory is shared by all targets -->
			<property name="dita.temp.dir" value="${outdir}/temp"/>
			<property name="transtype" value="eclipsehelp"/>
			<property name="args.draft" value="yes"/>
			<property name="args.indexshow" value="yes"/>
			<property name="dita.extname" value="${EXTNAME}"/>
		</ant>
	</target>
	<!-- Create docbook output -->
	<target name="dita2docbook">
		<ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
			<property name="args.input" value="${projdir}/${MAP_file}"/>
			<property name="output.dir" value="${outdir}/docbook"/>
			<!-- The temp directory is shared by all targets -->
			<property name="dita.temp.dir" value="${outdir}/temp"/>
			<property name="transtype" value="docbook"/>
			<property name="args.draft" value="yes"/>
			<property name="args.indexshow" value="yes"/>
			<property name="dita.extname" value="${EXTNAME}"/>
		</ant>
	</target>
	<!-- Create javahelp output -->
	<target name="dita2javahelp">
		<property name="jarfile" value="${outdir}/javahelp/garage.jar"/>
		<ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
			<property name="args.input" value="${projdir}/${MAP_file}"/>
			<property name="output.dir" value="${outdir}/javahelp"/>
			<!-- The temp directory is shared by all targets -->
			<property name="dita.temp.dir" value="${outdir}/temp"/>
			<property name="transtype" value="javahelp"/>
			<property name="args.draft" value="yes"/>
			<property name="args.indexshow" value="yes"/>
			<property name="dita.extname" value="${EXTNAME}"/>
		</ant>
		<delete file="${jarfile}"/>
		<jar destfile="${jarfile}" basedir="${outdir}/javahelp" includes="**">
    </jar>
	</target>
	<!-- Create troff output -->
	<target name="dita2troff">
		<ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
			<property name="args.input" value="${projdir}/${MAP_file}"/>
			<property name="output.dir" value="${outdir}/troff"/>
			<!-- The temp directory is shared by all targets -->
			<property name="dita.temp.dir" value="${outdir}/temp"/>
			<property name="transtype" value="troff"/>
			<property name="args.draft" value="yes"/>
			<property name="args.indexshow" value="yes"/>
			<property name="dita.extname" value="${EXTNAME}"/>
		</ant>
	</target>
	<!-- Create wordrtf output -->
	<target name="dita2wordrtf">
		<ant antfile="${toolkit_dir}${file.separator}conductor.xml" target="init">
			<property name="args.input" value="${projdir}/${MAP_file}"/>
			<property name="output.dir" value="${outdir}/wordrtf"/>
			<property name="dita.temp.dir" value="${outdir}/temp"/>
			<!-- The temp directory is shared by all targets -->
			<property name="transtype" value="wordrtf"/>
			<property name="args.draft" value="yes"/>
			<property name="args.indexshow" value="yes"/>
			<property name="dita.extname" value="${EXTNAME}"/>
		</ant>
	</target>
</project>
