blob: d6314a5ee1fa5cd3b8244e60708d534e05d711f6 [file] [log] [blame]
Stephan Herrmanndcd87c12010-04-25 10:59:27 +00001<!--
2 Copyright (c) 2010 Stephan Herrmann and others.
3 All rights reserved. This program and the accompanying materials
4 are made available under the terms of the Eclipse Public License v1.0
5 which accompanies this distribution, and is available at
6 http://www.eclipse.org/legal/epl-v10.html
7
8 Contributors:
9 Stephan Herrmann - initial API and implementation
10-->
11<project name="Build specific targets and properties" default="noDefault" >
12
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000013 <!-- ===================================================================== -->
14 <!-- Run a given ${target} on all elements being built -->
15 <!-- Add on <ant> task for each top level element being built. -->
16 <!-- ===================================================================== -->
Stephan Herrmann33c26042010-06-03 10:24:16 +000017 <available property="allElementsFile" file="${builder}/allElements.xml" value="${builder}/allElements.xml"/>
18 <property name="allElementsFile" location="${eclipse.pdebuild.templates}/headless-build/allElements.xml"/>
19
20 <import file="${allElementsFile}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000021 <target name="allElements">
Stephan Herrmann33c26042010-06-03 10:24:16 +000022 <antcall target="allElementsDelegator" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000023 </target>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000024
Stephan Herrmann33c26042010-06-03 10:24:16 +000025 <!-- ===================================================================== -->
26 <!-- ===================================================================== -->
27 <target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
28 <get src="${eclipseBaseURL}" dest="${buildDirectory}/../temp-base.zip" />
29 <unzip dest="${base}" overwrite="true" src="${buildDirectory}/../temp-base.zip" />
Stephan Herrmann691add92010-05-18 12:02:51 +000030 </target>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000031
Stephan Herrmann33c26042010-06-03 10:24:16 +000032 <target name="checkLocalBase">
33 <available file="${base}" property="skipBase" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000034 </target>
35
36 <!-- ===================================================================== -->
37 <!-- Check out map files from correct repository -->
Stephan Herrmann33c26042010-06-03 10:24:16 +000038 <!-- Replace values for mapsCheckoutTag as desired. -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000039 <!-- ===================================================================== -->
Stephan Herrmann33c26042010-06-03 10:24:16 +000040 <target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
41 <property name="mapsCheckoutTag" value="HEAD" />
42 <!-- orig:
43 <cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
44 -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000045 <property name="svn.map.url" value="${svn.repository.url}/${mapVersionTag}/${pathToMapFile}/${mapFileName}" />
46
Stephan Herrmann357d42f2010-06-03 13:25:41 +000047 <mkdir dir="${buildDirectory}/maps"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000048 <svn command="export" url="${svn.map.url}" dest="${buildDirectory}/maps/${mapFileName}" />
49 </target>
Stephan Herrmann33c26042010-06-03 10:24:16 +000050
51 <target name="checkLocalMaps">
52 <available property="skipMaps" file="${buildDirectory}/maps" />
53 </target>
54
55 <target name="tagMapFiles" if="tagMaps">
56 <!-- orig:
57 <cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" />
58 -->
59 </target>
60
61 <!-- ===================================================================== -->
62
63 <target name="clean" unless="noclean">
64 <antcall target="allElements">
65 <param name="target" value="cleanElement" />
66 </antcall>
67 </target>
68
69 <target name="gatherLogs">
70 <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
71 <antcall target="allElements">
72 <param name="target" value="gatherLogs" />
73 </antcall>
74 <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
75 <fileset dir="${buildDirectory}/features">
76 <include name="**/*.log.zip" />
77 </fileset>
78 </unzip>
79 </target>
80
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000081 <!-- ===================================================================== -->
82 <!-- Steps to do before setup -->
83 <!-- ===================================================================== -->
84 <target name="preSetup">
85 </target>
86
87 <!-- ===================================================================== -->
88 <!-- Steps to do after setup but before starting the build proper -->
89 <!-- ===================================================================== -->
90 <target name="postSetup">
Stephan Herrmann33c26042010-06-03 10:24:16 +000091 <antcall target="getBaseComponents" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000092 </target>
93
94 <!-- ===================================================================== -->
95 <!-- Steps to do before fetching the build elements -->
96 <!-- ===================================================================== -->
97 <target name="preFetch">
98 </target>
99
100 <!-- ===================================================================== -->
101 <!-- Steps to do after fetching the build elements -->
102 <!-- ===================================================================== -->
103 <target name="postFetch">
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000104 </target>
105
106 <!-- ===================================================================== -->
Stephan Herrmann33c26042010-06-03 10:24:16 +0000107 <!-- Steps to do before the repositories are being processed -->
108 <!-- ===================================================================== -->
109 <target name="preProcessRepos">
110 </target>
111
112 <!-- ===================================================================== -->
113 <!-- Steps to do after the repositories have been processed -->
114 <!-- ===================================================================== -->
115 <target name="postProcessRepos">
116 </target>
117
118 <!-- ===================================================================== -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000119 <!-- Steps to do before generating the build scripts. -->
120 <!-- ===================================================================== -->
121 <target name="preGenerate">
122 </target>
123
124 <!-- ===================================================================== -->
125 <!-- Steps to do after generating the build scripts. -->
126 <!-- ===================================================================== -->
127 <target name="postGenerate">
Stephan Herrmann33c26042010-06-03 10:24:16 +0000128 <!-- orig:
129 <antcall target="clean" />
130 -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000131 </target>
132
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000133 <!-- ===================================================================== -->
134 <!-- Steps to do before running the build.xmls for the elements being built. -->
135 <!-- ===================================================================== -->
136 <target name="preProcess">
137 </target>
138
139 <!-- ===================================================================== -->
140 <!-- Steps to do after running the build.xmls for the elements being built. -->
141 <!-- ===================================================================== -->
142 <target name="postProcess">
143 </target>
144
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000145 <!-- ===================================================================== -->
146 <!-- Steps to do before running assemble. -->
147 <!-- ===================================================================== -->
148 <target name="preAssemble">
149 </target>
150
151 <!-- ===================================================================== -->
152 <!-- Steps to do after running assemble. -->
153 <!-- ===================================================================== -->
154 <target name="postAssemble">
155 </target>
156
157 <!-- ===================================================================== -->
Stephan Herrmann33c26042010-06-03 10:24:16 +0000158 <!-- Steps to do before running package. -->
159 <!-- ===================================================================== -->
160 <target name="prePackage">
161 </target>
162
163 <!-- ===================================================================== -->
164 <!-- Steps to do after running package. -->
165 <!-- ===================================================================== -->
166 <target name="postPackage">
167 </target>
168
169 <!-- ===================================================================== -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000170 <!-- Steps to do after the build is done. -->
171 <!-- ===================================================================== -->
172 <target name="postBuild">
Stephan Herrmann33c26042010-06-03 10:24:16 +0000173 <antcall target="gatherLogs" />
174 </target>
175
176 <!-- ===================================================================== -->
177 <!-- Steps to do to test the build results -->
178 <!-- ===================================================================== -->
179 <target name="test">
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000180 </target>
181
182 <!-- ===================================================================== -->
183 <!-- Steps to do to publish the build results -->
184 <!-- ===================================================================== -->
185 <target name="publish">
186 </target>
187
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000188 <!-- ===================================================================== -->
189 <!-- Default target -->
190 <!-- ===================================================================== -->
191 <target name="noDefault">
192 <echo message="You must specify a target when invoking this file" />
193 </target>
194
195</project>