blob: a5e3f2f6eb6ed30d8977bcb7afd4ec3afb38b199 [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 default="main">
12
13 <!--
14 Expected args:
15
16 component.short:what's building? Defined by where build.properties and customTargets.xml are found
17
18 OTScriptDir: where most build scripts are found (build)
19
20 build.root.dir: (testrun/build-root)
21 baseLocation: from where eclipse is running (testrun/build-root/eclipse)
22 run.eclipseScriptDir: relative location of pde.build's scripts
23 buildDirectory: where sources shall be built (testrun/build-root/src)
24
25 configs: what to build
26 baseos, basews, basearch: what platform we're on
27
28 -->
29 <loadproperties srcfile="${OTScriptDir}/buildVersions.properties" />
30 <loadproperties srcfile="${builder}/build.properties" />
31
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010032 <target name="main">
33 <!--Default values for required properties-->
34 <property name="buildDirectory" value="${build.root.dir}/src" />
35 <echo message="BUILDDIR: ${buildDirectory}" />
36 <delete failonerror="true" dir="${buildDirectory}" />
37 <antcall target="create.label.properties" />
38 <property file="${buildDirectory}/label.properties" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000039
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010040 <!--fetch the HEAD stream of all projects if build type specified as N-->
41 <condition property="fetchTag" value="HEAD">
42 <equals arg1="${buildType}" arg2="N" />
43 </condition>
44 <property name="fetchTag" value="" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000045
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010046 <!--set the compiler and compiler arguments-->
47 <!--the default compiler is set to the one used by eclipse rel. eng. -->
48 <loadproperties srcfile="${OTScriptDir}/compiler.${component.short}.properties" />
49 <echo message="javacSource=${javacSource}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000050
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010051 <!--this property required as of Eclipse 3.0 stream builds > 20031126 -->
52 <property name="buildingOSGi" value="true" />
Stephan Herrmann8b242192014-01-04 20:33:13 +010053
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010054 <!--let ecotj be generated into a "safe" location: -->
55 <property name="postingDirectory" value="${build.root.dir}/../ecj" />
56
57 <!--run the pde-build for the specified ${builder} (OT-Compiler or OTDT-Build) -->
58 <ant antfile="build.xml" dir="${baseLocation}/${run.eclipseScriptDir}" />
59
60 </target>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000061
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010062
63 <target name="create.label.properties" unless="label.properties.exists">
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000064 <mkdir dir="${buildDirectory}" />
65 <tstamp/>
66 <property name="date" value="${DSTAMP}" />
67 <property name="time" value="${TSTAMP}" />
68 <property name="timestamp" value="${date}${time}" />
69 <property name="buildId" value="${buildType}${date}" />
70
71 <!--this naming convention used by php scripts on download server-->
72 <property name="buildLabel" value="${buildType}-${buildId}-${timestamp}" />
73
74 <!--store the build label information in a file-->
75 <echo file="${buildDirectory}/label.properties" append="true" >
76 buildType=${buildType}
77 </echo>
78 <echo file="${buildDirectory}/label.properties" append="true" >
79 buildId=${buildId}
80 </echo>
81 <echo file="${buildDirectory}/label.properties" append="true" >
82 timestamp=${timestamp}
83 </echo>
84 <echo file="${buildDirectory}/label.properties" append="true" >
85 buildLabel=${buildLabel}
86 </echo>
87
88 <available file="${buildDirectory}/label.properties" property="label.properties.exists" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000089 </target>
90
91</project>