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 name="Build specific targets and properties" default="noDefault" > |
| 12 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 13 | <!-- ===================================================================== --> |
| 14 | <!-- Run a given ${target} on all elements being built --> |
| 15 | <!-- Add on <ant> task for each top level element being built. --> |
| 16 | <!-- ===================================================================== --> |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 17 | <available property="allElementsFile" file="${builder}/allElements.xml" value="${builder}/allElements.xml"/> |
| 18 | <property name="allElementsFile" location="${eclipse.pdebuild.templates}/headless-build/allElements.xml"/> |
| 19 | |
| 20 | <import file="${allElementsFile}" /> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 21 | <target name="allElements"> |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 22 | <antcall target="allElementsDelegator" /> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 23 | </target> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 24 | |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 25 | <!-- ===================================================================== --> |
| 26 | <!-- ===================================================================== --> |
| 27 | <target name="getBaseComponents" depends="checkLocalBase" unless="skipBase"> |
| 28 | <get src="${eclipseBaseURL}" dest="${buildDirectory}/../temp-base.zip" /> |
| 29 | <unzip dest="${base}" overwrite="true" src="${buildDirectory}/../temp-base.zip" /> |
Stephan Herrmann | 691add9 | 2010-05-18 12:02:51 +0000 | [diff] [blame] | 30 | </target> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 31 | |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 32 | <target name="checkLocalBase"> |
| 33 | <available file="${base}" property="skipBase" /> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 34 | </target> |
| 35 | |
| 36 | <!-- ===================================================================== --> |
| 37 | <!-- Check out map files from correct repository --> |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 38 | <!-- Replace values for mapsCheckoutTag as desired. --> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 39 | <!-- ===================================================================== --> |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 40 | <target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps"> |
| 41 | <property name="mapsCheckoutTag" value="HEAD" /> |
| 42 | <!-- orig: |
| 43 | <cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" /> |
| 44 | --> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 45 | <property name="svn.map.url" value="${svn.repository.url}/${mapVersionTag}/${pathToMapFile}/${mapFileName}" /> |
| 46 | |
Stephan Herrmann | 357d42f | 2010-06-03 13:25:41 +0000 | [diff] [blame] | 47 | <mkdir dir="${buildDirectory}/maps"/> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 48 | <svn command="export" url="${svn.map.url}" dest="${buildDirectory}/maps/${mapFileName}" /> |
| 49 | </target> |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 50 | |
| 51 | <target name="checkLocalMaps"> |
| 52 | <available property="skipMaps" file="${buildDirectory}/maps" /> |
| 53 | </target> |
| 54 | |
| 55 | <target name="tagMapFiles" if="tagMaps"> |
| 56 | <!-- orig: |
| 57 | <cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" /> |
| 58 | --> |
| 59 | </target> |
| 60 | |
| 61 | <!-- ===================================================================== --> |
| 62 | |
| 63 | <target name="clean" unless="noclean"> |
| 64 | <antcall target="allElements"> |
| 65 | <param name="target" value="cleanElement" /> |
| 66 | </antcall> |
| 67 | </target> |
| 68 | |
| 69 | <target name="gatherLogs"> |
| 70 | <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" /> |
| 71 | <antcall target="allElements"> |
| 72 | <param name="target" value="gatherLogs" /> |
| 73 | </antcall> |
| 74 | <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true"> |
| 75 | <fileset dir="${buildDirectory}/features"> |
| 76 | <include name="**/*.log.zip" /> |
| 77 | </fileset> |
| 78 | </unzip> |
| 79 | </target> |
| 80 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 81 | <!-- ===================================================================== --> |
| 82 | <!-- Steps to do before setup --> |
| 83 | <!-- ===================================================================== --> |
| 84 | <target name="preSetup"> |
| 85 | </target> |
| 86 | |
| 87 | <!-- ===================================================================== --> |
| 88 | <!-- Steps to do after setup but before starting the build proper --> |
| 89 | <!-- ===================================================================== --> |
| 90 | <target name="postSetup"> |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 91 | <antcall target="getBaseComponents" /> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 92 | </target> |
| 93 | |
| 94 | <!-- ===================================================================== --> |
| 95 | <!-- Steps to do before fetching the build elements --> |
| 96 | <!-- ===================================================================== --> |
| 97 | <target name="preFetch"> |
| 98 | </target> |
| 99 | |
| 100 | <!-- ===================================================================== --> |
| 101 | <!-- Steps to do after fetching the build elements --> |
| 102 | <!-- ===================================================================== --> |
| 103 | <target name="postFetch"> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 104 | </target> |
| 105 | |
| 106 | <!-- ===================================================================== --> |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 107 | <!-- Steps to do before the repositories are being processed --> |
| 108 | <!-- ===================================================================== --> |
| 109 | <target name="preProcessRepos"> |
| 110 | </target> |
| 111 | |
| 112 | <!-- ===================================================================== --> |
| 113 | <!-- Steps to do after the repositories have been processed --> |
| 114 | <!-- ===================================================================== --> |
| 115 | <target name="postProcessRepos"> |
| 116 | </target> |
| 117 | |
| 118 | <!-- ===================================================================== --> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 119 | <!-- Steps to do before generating the build scripts. --> |
| 120 | <!-- ===================================================================== --> |
| 121 | <target name="preGenerate"> |
| 122 | </target> |
| 123 | |
| 124 | <!-- ===================================================================== --> |
| 125 | <!-- Steps to do after generating the build scripts. --> |
| 126 | <!-- ===================================================================== --> |
| 127 | <target name="postGenerate"> |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 128 | <!-- orig: |
| 129 | <antcall target="clean" /> |
| 130 | --> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 131 | </target> |
| 132 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 133 | <!-- ===================================================================== --> |
| 134 | <!-- Steps to do before running the build.xmls for the elements being built. --> |
| 135 | <!-- ===================================================================== --> |
| 136 | <target name="preProcess"> |
| 137 | </target> |
| 138 | |
| 139 | <!-- ===================================================================== --> |
| 140 | <!-- Steps to do after running the build.xmls for the elements being built. --> |
| 141 | <!-- ===================================================================== --> |
| 142 | <target name="postProcess"> |
| 143 | </target> |
| 144 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 145 | <!-- ===================================================================== --> |
| 146 | <!-- Steps to do before running assemble. --> |
| 147 | <!-- ===================================================================== --> |
| 148 | <target name="preAssemble"> |
| 149 | </target> |
| 150 | |
| 151 | <!-- ===================================================================== --> |
| 152 | <!-- Steps to do after running assemble. --> |
| 153 | <!-- ===================================================================== --> |
| 154 | <target name="postAssemble"> |
| 155 | </target> |
| 156 | |
| 157 | <!-- ===================================================================== --> |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 158 | <!-- Steps to do before running package. --> |
| 159 | <!-- ===================================================================== --> |
| 160 | <target name="prePackage"> |
| 161 | </target> |
| 162 | |
| 163 | <!-- ===================================================================== --> |
| 164 | <!-- Steps to do after running package. --> |
| 165 | <!-- ===================================================================== --> |
| 166 | <target name="postPackage"> |
| 167 | </target> |
| 168 | |
| 169 | <!-- ===================================================================== --> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 170 | <!-- Steps to do after the build is done. --> |
| 171 | <!-- ===================================================================== --> |
| 172 | <target name="postBuild"> |
Stephan Herrmann | 33c2604 | 2010-06-03 10:24:16 +0000 | [diff] [blame] | 173 | <antcall target="gatherLogs" /> |
| 174 | </target> |
| 175 | |
| 176 | <!-- ===================================================================== --> |
| 177 | <!-- Steps to do to test the build results --> |
| 178 | <!-- ===================================================================== --> |
| 179 | <target name="test"> |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 180 | </target> |
| 181 | |
| 182 | <!-- ===================================================================== --> |
| 183 | <!-- Steps to do to publish the build results --> |
| 184 | <!-- ===================================================================== --> |
| 185 | <target name="publish"> |
| 186 | </target> |
| 187 | |
Stephan Herrmann | dcd87c1 | 2010-04-25 10:59:27 +0000 | [diff] [blame] | 188 | <!-- ===================================================================== --> |
| 189 | <!-- Default target --> |
| 190 | <!-- ===================================================================== --> |
| 191 | <target name="noDefault"> |
| 192 | <echo message="You must specify a target when invoking this file" /> |
| 193 | </target> |
| 194 | |
| 195 | </project> |