Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 1 | <!-- |
| 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 Herrmann | 1c25fec | 2019-04-13 20:44:20 +0200 | [diff] [blame] | 21 | bootLocation: from where eclipse is running (testrun/build-root/eclipse) |
| 22 | baseLocation: the target eclipse pde will build against (testrun/test-root/eclipse) |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 23 | 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 Herrmann | 358ac0f | 2016-11-01 00:29:19 +0100 | [diff] [blame] | 29 | fetchCacheLocation |
| 30 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 31 | --> |
| 32 | <loadproperties srcfile="${OTScriptDir}/buildVersions.properties" /> |
| 33 | <loadproperties srcfile="${builder}/build.properties" /> |
| 34 | |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 35 | <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 Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 42 | |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 43 | <!--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 Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 48 | |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 49 | <!--set the compiler and compiler arguments--> |
| 50 | <!--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] | 51 | <property name="fetchCacheLocation" value="${fetchCacheLocation}" /> |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 52 | <loadproperties srcfile="${OTScriptDir}/compiler.${component.short}.properties" /> |
| 53 | <echo message="javacSource=${javacSource}" /> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 54 | |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 55 | <!--this property required as of Eclipse 3.0 stream builds > 20031126 --> |
| 56 | <property name="buildingOSGi" value="true" /> |
Stephan Herrmann | 8b24219 | 2014-01-04 20:33:13 +0100 | [diff] [blame] | 57 | |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 58 | <!--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 Herrmann | 1c25fec | 2019-04-13 20:44:20 +0200 | [diff] [blame] | 62 | <ant antfile="build.xml" dir="${bootLocation}/${run.eclipseScriptDir}" /> |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 63 | |
| 64 | </target> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 65 | |
Stephan Herrmann | 32ed6af | 2014-01-05 02:44:25 +0100 | [diff] [blame] | 66 | |
| 67 | <target name="create.label.properties" unless="label.properties.exists"> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 68 | <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 Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 93 | </target> |
| 94 | |
| 95 | </project> |