Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: edffb35174052659c721f4182fce2c64fe9d538c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?xml version="1.0" encoding="UTF-8"?>
<!--
     Copyright (c) 2005, 2012 IBM Corporation and others.
     All rights reserved. This program and the accompanying materials
     are made available under the terms of the Eclipse Public License v1.0
     which accompanies this distribution, and is available at
     http://www.eclipse.org/legal/epl-v10.html
    
     Contributors:
         IBM Corporation - initial API and implementation
 -->

<project name="PDE Doc ISV Build" default="all"  basedir="." >

	<property file="${basedir.properties}"/>

	<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.pde.doc.user." if="eclipse.running">
		<help.buildHelpIndex manifest="${basedir}/plugin.xml" destination="${basedir}"/>
	</target>

	<target name="convertSchemaToHtml" if="eclipse.running">
		<property name="dest" value="reference/extension-points" />
		<record name="${basedir}/pdeconvert.txt" action="start"/>

		<pde.convertSchemaToHTML manifest="${eclipse.pde.ui.ui}/org.eclipse.pde.core/plugin.xml" destination="${dest}" />
		<pde.convertSchemaToHTML manifest="${eclipse.pde.build}/org.eclipse.pde.build/plugin.xml" destination="${dest}" />
		<pde.convertSchemaToHTML manifest="${eclipse.pde.ui.ui}/org.eclipse.pde.ui/plugin.xml" destination="${dest}" />
		<pde.convertSchemaToHTML manifest="${eclipse.pde.ui.ui}/org.eclipse.pde.launching/plugin.xml" destination="${dest}" />

		<record name="${basedir}/pdeconvert.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">

		<!-- replace "\n;" with platform-dependent list entry delimiter -->
		<property name="optionsFile" value="pdeOptions.tmp.txt" />
		<copy file="pdeOptions.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="@dependency.dir@" value="${dependency.dir}" />
                <replace file="${basedir}/${optionsFile}" token="@dot.classes@" value="${dot.classes}" />
                <replace file="${basedir}/${optionsFile}" token="@eclipse.jdt.core@" value="${eclipse.jdt.core}" />
                <replace file="${basedir}/${optionsFile}" token="@eclipse.jdt.debug@" value="${eclipse.jdt.debug}" />
                <replace file="${basedir}/${optionsFile}" token="@eclipse.jdt.ui@" value="${eclipse.jdt.ui}" />
		<replace file="${basedir}/${optionsFile}" token="@eclipse.pde.ui.ui@" value="${eclipse.pde.ui.ui}" />
		<replace file="${basedir}/${optionsFile}" token="@eclipse.pde.build@" value="${eclipse.pde.build}" />
		<replace file="${basedir}/${optionsFile}" token="@eclipse.platform.debug@" value="${eclipse.platform.debug}" />
		<replace file="${basedir}/${optionsFile}" token="@eclipse.platform.resources.bundles@" value="${eclipse.platform.resources.bundles}" />
		<replace file="${basedir}/${optionsFile}" token="@eclipse.platform.runtime.bundles@" value="${eclipse.platform.runtime.bundles}" />
		<replace file="${basedir}/${optionsFile}" token="@eclipse.platform.swt.binaries.bundles@" value="${eclipse.platform.swt.binaries.bundles}" />
		<replace file="${basedir}/${optionsFile}" token="@eclipse.platform.team.bundles@" value="${eclipse.platform.team.bundles}" />
		<replace file="${basedir}/${optionsFile}" token="@eclipse.platform.text@" value="${eclipse.platform.text}" />
		<replace file="${basedir}/${optionsFile}" token="@eclipse.platform.ua@" value="${eclipse.platform.ua}" />
		<replace file="${basedir}/${optionsFile}" token="@eclipse.platform.ui.bundles@" value="${eclipse.platform.ui.bundles}" />
		<replace file="${basedir}/${optionsFile}" token="@eclipse.platform.update@" value="${eclipse.platform.update}" />
		<replace file="${basedir}/${optionsFile}" token="@rt.equinox.bundles.bundles@" value="${rt.equinox.bundles.bundles}" />
		<replace file="${basedir}/${optionsFile}" token="@rt.equinox.framework.bundles@" value="${rt.equinox.framework.bundles}" />
		<replace file="${basedir}/${optionsFile}" token="@rt.equinox.p2.bundles@" value="${rt.equinox.p2.bundles}" />
		<replace file="${basedir}/${optionsFile}" token="@eclipse.equinox.supplement@" value="${eclipse.equinox.supplement}" />


		<!-- expand _* to actual version -->
			<!-- prepare ${replaceFile} with all files and folders from workspace -->
		<fileset dir="${basedir}/${dependency.dir}" id="fileSet">
			<include name="*"/>
		</fileset>
		<dirset dir="${basedir}/${dependency.dir}" id="dirSet">
			<include name="*"/>
		</dirset>
		<pathconvert property="fileList" refid="fileSet" dirsep="/" pathsep="&#xA;"/>
		<pathconvert property="dirList" refid="dirSet" dirsep="/" pathsep="&#xA;"/>
		<property name="replaceFile" value="platformOptions.replace.txt" />
		<echo file="${basedir}/${replaceFile}">${fileList}&#xA;${dirList}</echo>

			<!-- strip away leading path -->
		<replaceregexp file="${basedir}/${replaceFile}" flags="g" match="(?m)^.*/([^/]*)$$" replace="\1" />
			<!-- remove lines without "_" -->
		<replaceregexp file="${basedir}/${replaceFile}" flags="g" match="(?m)^[^_\r\n]*$$" replace="" />
			<!-- create "aa_*[.jar]=aa_[version][.jar]" property for lines with a "_" -->
		<replaceregexp file="${basedir}/${replaceFile}" flags="g" match="(?m)^([^_]*)_.*?(.jar)?$$" replace="\1_*\2=\0" />
		
		<replace file="${basedir}/${optionsFile}" replacefilterfile="${basedir}/${replaceFile}"/>

		<!--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-Xmx1000M" />
		</exec>
		
		<!--workaround for bug 101048-->
		<replace dir="reference/api" token="=&quot;/../misc/api-usage-rules.html" value="=&quot;./../misc/api-usage-rules.html">
			<include name="*htm*" />
		</replace>
		
	</target>

	<target name="buildJdtDoc" unless="jdt.index.present">
		<ant antfile="buildDoc.xml" dir="../org.eclipse.jdt.doc.isv" />
	</target>

	<target name="createDocZip">
		<zip zipfile="${basedir}/doc.zip"
		basedir="${basedir}"
		includes="schema.css, book.css,  notices.html, about.html, concepts/**, guide/**, tips/**, reference/**, tasks/**, whatsNew/**, images/**"
	/>
	</target>

</project>














Back to the top