blob: 94ac394efd07253c0a92a6dc64c4ee398e276bbe [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<project name="OTDT Doc Isv Build" default="all" basedir="." >
<target name="init">
<available file="${basedir}/index" property="index.present"/>
</target>
<target name="all" depends="init" unless="index.present">
<antcall target="convertSchemaToHtml" />
<!--antcall target="generateJavadoc" /-->
<!--antcall target="build.index" /-->
<!--antcall target="createDocZip" /-->
</target>
<target name="build.index" description="Builds search index for the plug-in: org.eclipse.objectteams.otdt.ui.help" if="eclipse.running">
<help.buildHelpIndex manifest="${basedir}/plugin.xml" destination="${basedir}"/>
</target>
<target name="convertSchemaToHtml" if="eclipse.running">
<mkdir dir="reference"/>
<property name="dest" value="reference/extension-points" />
<record name="${basedir}/otdtconvert.txt" action="start"/>
<echo message="recording schema conversion ... in ${basedir}/otdtconvert.txt"/>
<pde.convertSchemaToHTML
manifest="../org.eclipse.objectteams.otequinox/plugin.xml"
destination="${dest}"/>
<!--cssURL="file:../../css/schema.css" broken see https://bugs.eclipse.org/300826 -->
<echo message="done recording schema conversion in ${basedir}/otdtconvert.txt"/>
<record name="${basedir}/otdtconvert.txt" action="stop"/>
</target>
<target name="getJavadocPath">
<available file="${java.home}/../bin/javadoc.exe" property="javadoc" value="${java.home}/../bin/javadoc.exe"/>
<available file="${java.home}/../bin/javadoc" property="javadoc" value="${java.home}/../bin/javadoc" />
</target>
<target name="generateJavadoc" depends="getJavadocPath" if="javadoc">
<!--HACK to ensure the platform doc is built before JDT - call to this script should be moved to build.jars target-->
<available file="../org.eclipse.platform.doc.isv/index" property="platform.index.present"/>
<antcall target="buildPlatformDoc" />
<property name="optionsFile" value="jdtOptions.tmp.txt" />
<copy file="jdtOptions.txt" tofile="${optionsFile}" overwrite="true" />
<condition property="argsListDelimiter" value=":">
<os family="unix" />
</condition>
<condition property="argsListDelimiter" value=";">
<os family="windows" />
</condition>
<replaceregexp file="${basedir}/${optionsFile}" flags="g" match="(\r\n?|\n);" replace="${argsListDelimiter}" />
<replace file="${basedir}/${optionsFile}" token="@rt@" value="${bootclasspath}" />
<replace file="${basedir}/${optionsFile}" token="@baseLocation@" value="${baseLocation}" />
<!--scrub isv plugin directories of any preexisting api doc content-->
<delete dir="reference/api"/>
<mkdir dir="reference/api"/>
<exec dir="." executable="${javadoc}" output="doc.bin.log">
<arg line="@${basedir}/${optionsFile} -J-Xmx500M" />
</exec>
<antcall target="generateJdtAptJavadoc" />
</target>
<target name="generateJdtAptJavadoc">
<property name="javadoc15" value="${javadoc}" />
<property name="jdtaptoptionsFile" value="jdtaptOptions.tmp.txt" />
<copy file="jdtaptOptions.txt" tofile="${jdtaptoptionsFile}" overwrite="true" />
<condition property="argsListDelimiter" value=":">
<os family="unix" />
</condition>
<condition property="argsListDelimiter" value=";">
<os family="windows" />
</condition>
<replaceregexp file="${basedir}/${jdtaptoptionsFile}" flags="g" match="(\r\n?|\n);" replace="${argsListDelimiter}" />
<replace file="${basedir}/${jdtaptoptionsFile}" token="@rt@" value="${bootclasspath}" />
<!--scrub isv plugin directories of any preexisting api doc content-->
<delete dir="reference/apt" />
<mkdir dir="reference/apt" />
<exec dir="." executable="${javadoc15}" output="jdtapt.doc.bin.log">
<arg line="@${basedir}/${jdtaptoptionsFile} -J-Xmx500M" />
</exec>
</target>
<target name="buildPlatformDoc" unless="platform.index.present">
<ant antfile="buildDoc.xml" dir="../org.eclipse.platform.doc.isv" />
</target>
<target name="createDocZip">
<zip zipfile="${basedir}/doc.zip"
basedir="${basedir}"
includes="book.css, cpy.png, notices.html, about.html, no_help_exists.htm, concepts/**, gettingStarted/**, images/**, reference/**, tasks/**,samples/**,guide/**,questions/**"
/>
</target>
</project>