Stephan Herrmann | 0166441 | 2010-04-01 20:28:43 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <project name="OTDT Doc Isv Build" default="all" basedir="." > |
| 3 | |
| 4 | <target name="init"> |
| 5 | <available file="${basedir}/index" property="index.present"/> |
| 6 | </target> |
| 7 | |
| 8 | <target name="all" depends="init" unless="index.present"> |
| 9 | <antcall target="convertSchemaToHtml" /> |
| 10 | <!--antcall target="generateJavadoc" /--> |
| 11 | <!--antcall target="build.index" /--> |
| 12 | <!--antcall target="createDocZip" /--> |
| 13 | </target> |
| 14 | |
| 15 | |
| 16 | <target name="build.index" description="Builds search index for the plug-in: org.eclipse.objectteams.otdt.ui.help" if="eclipse.running"> |
| 17 | <help.buildHelpIndex manifest="${basedir}/plugin.xml" destination="${basedir}"/> |
| 18 | </target> |
| 19 | |
| 20 | <target name="convertSchemaToHtml" if="eclipse.running"> |
| 21 | <property name="dest" value="reference/extension-points" /> |
| 22 | <record name="${basedir}/otdtconvert.txt" action="start"/> |
| 23 | <echo message="recording schema conversion ... in ${basedir}/otdtconvert.txt"/> |
| 24 | |
| 25 | <pde.convertSchemaToHTML |
| 26 | manifest="../org.eclipse.objectteams.otequinox/plugin.xml" |
| 27 | destination="${dest}"/> |
| 28 | <!--cssURL="file:../../css/schema.css" broken see https://bugs.eclipse.org/300826 --> |
| 29 | |
| 30 | <echo message="done recording schema conversion in ${basedir}/otdtconvert.txt"/> |
| 31 | |
| 32 | <record name="${basedir}/otdtconvert.txt" action="stop"/> |
| 33 | </target> |
| 34 | |
| 35 | <target name="getJavadocPath"> |
| 36 | <available file="${java.home}/../bin/javadoc.exe" property="javadoc" value="${java.home}/../bin/javadoc.exe"/> |
| 37 | <available file="${java.home}/../bin/javadoc" property="javadoc" value="${java.home}/../bin/javadoc" /> |
| 38 | </target> |
| 39 | |
| 40 | |
| 41 | <target name="generateJavadoc" depends="getJavadocPath" if="javadoc"> |
| 42 | |
| 43 | <!--HACK to ensure the platform doc is built before JDT - call to this script should be moved to build.jars target--> |
| 44 | <available file="../org.eclipse.platform.doc.isv/index" property="platform.index.present"/> |
| 45 | <antcall target="buildPlatformDoc" /> |
| 46 | |
| 47 | <property name="optionsFile" value="jdtOptions.tmp.txt" /> |
| 48 | <copy file="jdtOptions.txt" tofile="${optionsFile}" overwrite="true" /> |
| 49 | |
| 50 | <condition property="argsListDelimiter" value=":"> |
| 51 | <os family="unix" /> |
| 52 | </condition> |
| 53 | <condition property="argsListDelimiter" value=";"> |
| 54 | <os family="windows" /> |
| 55 | </condition> |
| 56 | |
| 57 | <replaceregexp file="${basedir}/${optionsFile}" flags="g" match="(\r\n?|\n);" replace="${argsListDelimiter}" /> |
| 58 | <replace file="${basedir}/${optionsFile}" token="@rt@" value="${bootclasspath}" /> |
| 59 | <replace file="${basedir}/${optionsFile}" token="@baseLocation@" value="${baseLocation}" /> |
| 60 | |
| 61 | |
| 62 | <!--scrub isv plugin directories of any preexisting api doc content--> |
| 63 | <delete dir="reference/api"/> |
| 64 | <mkdir dir="reference/api"/> |
| 65 | |
| 66 | <exec dir="." executable="${javadoc}" output="doc.bin.log"> |
| 67 | <arg line="@${basedir}/${optionsFile} -J-Xmx500M" /> |
| 68 | </exec> |
| 69 | <antcall target="generateJdtAptJavadoc" /> |
| 70 | </target> |
| 71 | |
| 72 | <target name="generateJdtAptJavadoc"> |
| 73 | <property name="javadoc15" value="${javadoc}" /> |
| 74 | |
| 75 | <property name="jdtaptoptionsFile" value="jdtaptOptions.tmp.txt" /> |
| 76 | <copy file="jdtaptOptions.txt" tofile="${jdtaptoptionsFile}" overwrite="true" /> |
| 77 | |
| 78 | <condition property="argsListDelimiter" value=":"> |
| 79 | <os family="unix" /> |
| 80 | </condition> |
| 81 | <condition property="argsListDelimiter" value=";"> |
| 82 | <os family="windows" /> |
| 83 | </condition> |
| 84 | |
| 85 | <replaceregexp file="${basedir}/${jdtaptoptionsFile}" flags="g" match="(\r\n?|\n);" replace="${argsListDelimiter}" /> |
| 86 | <replace file="${basedir}/${jdtaptoptionsFile}" token="@rt@" value="${bootclasspath}" /> |
| 87 | |
| 88 | <!--scrub isv plugin directories of any preexisting api doc content--> |
| 89 | <delete dir="reference/apt" /> |
| 90 | <mkdir dir="reference/apt" /> |
| 91 | |
| 92 | <exec dir="." executable="${javadoc15}" output="jdtapt.doc.bin.log"> |
| 93 | <arg line="@${basedir}/${jdtaptoptionsFile} -J-Xmx500M" /> |
| 94 | </exec> |
| 95 | </target> |
| 96 | |
| 97 | <target name="buildPlatformDoc" unless="platform.index.present"> |
| 98 | <ant antfile="buildDoc.xml" dir="../org.eclipse.platform.doc.isv" /> |
| 99 | </target> |
| 100 | |
| 101 | <target name="createDocZip"> |
| 102 | <zip zipfile="${basedir}/doc.zip" |
| 103 | basedir="${basedir}" |
| 104 | includes="book.css, cpy.png, notices.html, about.html, no_help_exists.htm, concepts/**, gettingStarted/**, images/**, reference/**, tasks/**,samples/**,guide/**,questions/**" |
| 105 | /> |
| 106 | </target> |
| 107 | |
| 108 | </project> |