blob: 43070e22e09ea0816c841f2b93144a7a68250b3a [file] [log] [blame]
Stephan Herrmanndcd87c12010-04-25 10:59:27 +00001<!--
2 Copyright (c) 2010 Stephan Herrmann and others.
Stephan Herrmann35705382020-03-03 21:42:19 +01003This program and the accompanying materials
4are made available under the terms of the Eclipse Public License 2.0
5which accompanies this distribution, and is available at
6https://www.eclipse.org/legal/epl-2.0/
Stephan Herrmanndcd87c12010-04-25 10:59:27 +00007
Stephan Herrmann35705382020-03-03 21:42:19 +01008SPDX-License-Identifier: EPL-2.0
Stephan Herrmanndcd87c12010-04-25 10:59:27 +00009 Contributors:
10 Stephan Herrmann - initial API and implementation
11-->
12<project default="main">
13
14 <!--
15 Expected args:
16
17 component.short:what's building? Defined by where build.properties and customTargets.xml are found
18
19 OTScriptDir: where most build scripts are found (build)
20
21 build.root.dir: (testrun/build-root)
Stephan Herrmann1c25fec2019-04-13 20:44:20 +020022 bootLocation: from where eclipse is running (testrun/build-root/eclipse)
23 baseLocation: the target eclipse pde will build against (testrun/test-root/eclipse)
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000024 run.eclipseScriptDir: relative location of pde.build's scripts
25 buildDirectory: where sources shall be built (testrun/build-root/src)
26
27 configs: what to build
28 baseos, basews, basearch: what platform we're on
29
Stephan Herrmann358ac0f2016-11-01 00:29:19 +010030 fetchCacheLocation
31
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000032 -->
33 <loadproperties srcfile="${OTScriptDir}/buildVersions.properties" />
34 <loadproperties srcfile="${builder}/build.properties" />
35
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010036 <target name="main">
37 <!--Default values for required properties-->
38 <property name="buildDirectory" value="${build.root.dir}/src" />
39 <echo message="BUILDDIR: ${buildDirectory}" />
40 <delete failonerror="true" dir="${buildDirectory}" />
41 <antcall target="create.label.properties" />
42 <property file="${buildDirectory}/label.properties" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000043
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010044 <!--fetch the HEAD stream of all projects if build type specified as N-->
45 <condition property="fetchTag" value="HEAD">
46 <equals arg1="${buildType}" arg2="N" />
47 </condition>
48 <property name="fetchTag" value="" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000049
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010050 <!--set the compiler and compiler arguments-->
51 <!--the default compiler is set to the one used by eclipse rel. eng. -->
Stephan Herrmann358ac0f2016-11-01 00:29:19 +010052 <property name="fetchCacheLocation" value="${fetchCacheLocation}" />
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010053 <loadproperties srcfile="${OTScriptDir}/compiler.${component.short}.properties" />
54 <echo message="javacSource=${javacSource}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000055
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010056 <!--this property required as of Eclipse 3.0 stream builds > 20031126 -->
57 <property name="buildingOSGi" value="true" />
Stephan Herrmann8b242192014-01-04 20:33:13 +010058
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010059 <!--let ecotj be generated into a "safe" location: -->
60 <property name="postingDirectory" value="${build.root.dir}/../ecj" />
61
62 <!--run the pde-build for the specified ${builder} (OT-Compiler or OTDT-Build) -->
Stephan Herrmann1c25fec2019-04-13 20:44:20 +020063 <ant antfile="build.xml" dir="${bootLocation}/${run.eclipseScriptDir}" />
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010064
65 </target>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000066
Stephan Herrmann32ed6af2014-01-05 02:44:25 +010067
68 <target name="create.label.properties" unless="label.properties.exists">
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000069 <mkdir dir="${buildDirectory}" />
70 <tstamp/>
71 <property name="date" value="${DSTAMP}" />
72 <property name="time" value="${TSTAMP}" />
73 <property name="timestamp" value="${date}${time}" />
74 <property name="buildId" value="${buildType}${date}" />
75
76 <!--this naming convention used by php scripts on download server-->
77 <property name="buildLabel" value="${buildType}-${buildId}-${timestamp}" />
78
79 <!--store the build label information in a file-->
80 <echo file="${buildDirectory}/label.properties" append="true" >
81 buildType=${buildType}
82 </echo>
83 <echo file="${buildDirectory}/label.properties" append="true" >
84 buildId=${buildId}
85 </echo>
86 <echo file="${buildDirectory}/label.properties" append="true" >
87 timestamp=${timestamp}
88 </echo>
89 <echo file="${buildDirectory}/label.properties" append="true" >
90 buildLabel=${buildLabel}
91 </echo>
92
93 <available file="${buildDirectory}/label.properties" property="label.properties.exists" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000094 </target>
95
96</project>