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