<?xml version="1.0" encoding="UTF-8"?>
<project name="org.eclipse.cdt.doc.user" default="build.jars" basedir=".">

	<property name="bootclasspath" value=""/>
	<property name="ws" value="gtk"/>
	<property name="os" value="linux"/>
	<property name="arch" value="x86"/>
	<property name="javacFailOnError" value="false"/>
	<property name="javacDebugInfo" value="on"/>
	<property name="javacVerbose" value="true"/>

	<target name="init" depends="properties">
		<property name="plugin" value="org.eclipse.cdt.doc.user"/>
		<property name="version.suffix" value="_1.2.0"/>
		<property name="full.name" value="${plugin}${version.suffix}"/>
		<property name="temp.folder" value="${basedir}/temp.folder"/>
		<property name="plugin.destination" value="${basedir}"/>
		<property name="build.result.folder" value="${basedir}"/>
	</target>

	<target name="properties" if="eclipse.running">
		<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
	</target>

	<target name="build.update.jar" depends="init" description="Build the plug-in: org.eclipse.cdt.doc.user for an update site.">
		<delete dir="${temp.folder}"/>
		<mkdir dir="${temp.folder}"/>
		<antcall target="build.jars"/>
		<antcall target="gather.bin.parts">
			<param name="destination.temp.folder" value="${temp.folder}/"/>
		</antcall>
		<zip zipfile="${plugin.destination}/${full.name}.jar" basedir="${temp.folder}/${full.name}" filesonly="false" update="no"/>
		<delete dir="${temp.folder}"/>
	</target>

	<target name="gather.bin.parts" depends="init" if="destination.temp.folder">
		<mkdir dir="${destination.temp.folder}/${full.name}"/>
		<copy todir="${destination.temp.folder}/${full.name}">
			<fileset dir="${basedir}" includes="plugin.properties,*.xml,doc.zip"/>
		</copy>
	</target>

	<target name="build.jars" depends="init" description="Build all the jars for the plug-in: org.eclipse.cdt.doc.user.">
	</target>

	<target name="build.sources" depends="init">
	</target>

		<target name="build.zips" depends="init">
		</target>

	<target name="gather.sources" depends="init" if="destination.temp.folder">
	</target>

	<target name="gather.logs" depends="init" if="destination.temp.folder">
	</target>

	<target name="clean" depends="init" description="Clean the plug-in: org.eclipse.cdt.doc.user of all the zips, jars and logs created.">
		<delete file="${plugin.destination}/${full.name}.jar"/>
		<delete file="${plugin.destination}/${full.name}.zip"/>
		<delete dir="${temp.folder}"/>
	</target>

	<target name="refresh" depends="init" if="eclipse.running">
		<eclipse.convertPath fileSystemPath="/home1/schaefer/eclipse/rc/workspace/org.eclipse.cdt.doc.user/" property="resourcePath"/>
		<eclipse.refreshLocal resource="${resourcePath}" depth="infinite"/>
	</target>

	<target name="zip.plugin" depends="init" description="Create a zip containing all the elements for the plug-in: org.eclipse.cdt.doc.user.">
		<delete dir="${temp.folder}"/>
		<mkdir dir="${temp.folder}"/>
		<antcall target="build.jars"/>
		<antcall target="build.sources"/>
		<antcall target="gather.bin.parts">
			<param name="destination.temp.folder" value="${temp.folder}/"/>
		</antcall>
		<antcall target="gather.sources">
			<param name="destination.temp.folder" value="${temp.folder}/"/>
		</antcall>
		<delete>
			<fileset dir="${temp.folder}" includes="**/*.bin.log"/>
		</delete>
		<antcall target="zip.folder"/>
		<delete dir="${temp.folder}"/>
	</target>
	<target name="zip.folder" depends="init">
		<zip zipfile="${plugin.destination}/${full.name}.zip" basedir="${temp.folder}" filesonly="true" update="no" excludes="**/*.bin.log"/>
	</target>

</project>
