blob: fb97b13b951d1c70a2f08240254732ad5a7a60f8 [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)
Stephan Herrmann1c25fec2019-04-13 20:44:20 +020021 bootLocation: from where eclipse is running (testrun/build-root/eclipse)
22 baseLocation: the target eclipse pde will build against (testrun/test-root/eclipse)
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000023 run.eclipseScriptDir: relative location of pde.build's scripts
24 buildDirectory: where sources shall be built (testrun/build-root/src)
25
26 configs: what to build
27 baseos, basews, basearch: what platform we're on
28
Stephan Herrmann358ac0f2016-11-01 00:29:19 +010029 fetchCacheLocation
30
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000031 -->
32 <loadproperties srcfile="${OTScriptDir}/buildVersions.properties" />
33 <loadproperties srcfile="${builder}/build.properties" />
34
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010035 <target name="main">
36 <!--Default values for required properties-->
37 <property name="buildDirectory" value="${build.root.dir}/src" />
38 <echo message="BUILDDIR: ${buildDirectory}" />
39 <delete failonerror="true" dir="${buildDirectory}" />
40 <antcall target="create.label.properties" />
41 <property file="${buildDirectory}/label.properties" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000042
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010043 <!--fetch the HEAD stream of all projects if build type specified as N-->
44 <condition property="fetchTag" value="HEAD">
45 <equals arg1="${buildType}" arg2="N" />
46 </condition>
47 <property name="fetchTag" value="" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000048
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010049 <!--set the compiler and compiler arguments-->
50 <!--the default compiler is set to the one used by eclipse rel. eng. -->
Stephan Herrmann358ac0f2016-11-01 00:29:19 +010051 <property name="fetchCacheLocation" value="${fetchCacheLocation}" />
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010052 <loadproperties srcfile="${OTScriptDir}/compiler.${component.short}.properties" />
53 <echo message="javacSource=${javacSource}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000054
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010055 <!--this property required as of Eclipse 3.0 stream builds > 20031126 -->
56 <property name="buildingOSGi" value="true" />
Stephan Herrmann8b242192014-01-04 20:33:13 +010057
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010058 <!--let ecotj be generated into a "safe" location: -->
59 <property name="postingDirectory" value="${build.root.dir}/../ecj" />
60
61 <!--run the pde-build for the specified ${builder} (OT-Compiler or OTDT-Build) -->
Stephan Herrmann1c25fec2019-04-13 20:44:20 +020062 <ant antfile="build.xml" dir="${bootLocation}/${run.eclipseScriptDir}" />
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010063
64 </target>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000065
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010066
67 <target name="create.label.properties" unless="label.properties.exists">
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000068 <mkdir dir="${buildDirectory}" />
69 <tstamp/>
70 <property name="date" value="${DSTAMP}" />
71 <property name="time" value="${TSTAMP}" />
72 <property name="timestamp" value="${date}${time}" />
73 <property name="buildId" value="${buildType}${date}" />
74
75 <!--this naming convention used by php scripts on download server-->
76 <property name="buildLabel" value="${buildType}-${buildId}-${timestamp}" />
77
78 <!--store the build label information in a file-->
79 <echo file="${buildDirectory}/label.properties" append="true" >
80 buildType=${buildType}
81 </echo>
82 <echo file="${buildDirectory}/label.properties" append="true" >
83 buildId=${buildId}
84 </echo>
85 <echo file="${buildDirectory}/label.properties" append="true" >
86 timestamp=${timestamp}
87 </echo>
88 <echo file="${buildDirectory}/label.properties" append="true" >
89 buildLabel=${buildLabel}
90 </echo>
91
92 <available file="${buildDirectory}/label.properties" property="label.properties.exists" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000093 </target>
94
95</project>