Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 1 | <!-- |
| 2 | Copyright (c) 2010 Stephan Herrmann and others. |
Stephan Herrmann | 3570538 | 2020-03-03 21:42:19 +0100 | [diff] [blame] | 3 | This program and the accompanying materials |
| 4 | are made available under the terms of the Eclipse Public License 2.0 |
| 5 | which accompanies this distribution, and is available at |
| 6 | https://www.eclipse.org/legal/epl-2.0/ |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 7 | |
Stephan Herrmann | 3570538 | 2020-03-03 21:42:19 +0100 | [diff] [blame] | 8 | SPDX-License-Identifier: EPL-2.0 |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 9 | 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 Herrmann | 1c25fec | 2019-04-13 20:44:20 +0200 | [diff] [blame] | 22 | bootLocation: from where eclipse is running (testrun/build-root/eclipse) |
| 23 | baseLocation: the target eclipse pde will build against (testrun/test-root/eclipse) |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 24 | 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 Herrmann | 358ac0f | 2016-11-01 00:29:19 +0100 | [diff] [blame] | 30 | fetchCacheLocation |
| 31 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 32 | --> |
| 33 | <loadproperties srcfile="${OTScriptDir}/buildVersions.properties" /> |
| 34 | <loadproperties srcfile="${builder}/build.properties" /> |
| 35 | |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 36 | <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 Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 43 | |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 44 | <!--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 Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 49 | |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 50 | <!--set the compiler and compiler arguments--> |
| 51 | <!--the default compiler is set to the one used by eclipse rel. eng. --> |
Stephan Herrmann | 358ac0f | 2016-11-01 00:29:19 +0100 | [diff] [blame] | 52 | <property name="fetchCacheLocation" value="${fetchCacheLocation}" /> |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 53 | <loadproperties srcfile="${OTScriptDir}/compiler.${component.short}.properties" /> |
| 54 | <echo message="javacSource=${javacSource}" /> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 55 | |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 56 | <!--this property required as of Eclipse 3.0 stream builds > 20031126 --> |
| 57 | <property name="buildingOSGi" value="true" /> |
Stephan Herrmann | 8b24219 | 2014-01-04 20:33:13 +0100 | [diff] [blame] | 58 | |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 59 | <!--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 Herrmann | 1c25fec | 2019-04-13 20:44:20 +0200 | [diff] [blame] | 63 | <ant antfile="build.xml" dir="${bootLocation}/${run.eclipseScriptDir}" /> |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 64 | |
| 65 | </target> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 66 | |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 67 | |
| 68 | <target name="create.label.properties" unless="label.properties.exists"> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 69 | <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 Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 94 | </target> |
| 95 | |
| 96 | </project> |