david_williams | 22bd49b | 2006-11-28 09:17:14 +0000 | [diff] [blame] | 1 | <project name="build" default="build" basedir="."> |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 2 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 3 | <!-- = = = standard properties pattern = = = --> |
| 4 | <!-- |
david_williams | 22bd49b | 2006-11-28 09:17:14 +0000 | [diff] [blame] | 5 | Note to be cross-platform, "environment variables" are only appropriate for |
david_williams | 1cff0e9 | 2006-11-23 00:40:29 +0000 | [diff] [blame] | 6 | some variables, e.g. ones we set, since properties are case sensitive, even if |
| 7 | the environment variables on your operating system are not, e.g. it will |
| 8 | be ${env.Path} not ${env.PATH} on Windows --> |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 9 | <property environment="env" /> |
| 10 | |
| 11 | <!-- |
david_williams | 22bd49b | 2006-11-28 09:17:14 +0000 | [diff] [blame] | 12 | Let users override standard properties, if desired. |
| 13 | If directory, file, or some properties do not exist, |
| 14 | then standard properties will be used. |
| 15 | --> |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 16 | <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" /> |
david_williams | 22bd49b | 2006-11-28 09:17:14 +0000 | [diff] [blame] | 17 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 18 | <!-- load standard properties for production environment --> |
| 19 | <property file="${env.STANDARD_PROPERTIES_DIR}/${ant.project.name}.properties" /> |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 20 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 21 | <property file="${ant.project.name}.properties" /> |
| 22 | |
| 23 | <!-- = = = end standard properties pattern = = = --> |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 24 | |
| 25 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 26 | |
| 27 | <target name="build" depends="init" if="build_distro_target_exists"> |
| 28 | <property name="buildfile" value="${distributionCoreName}.build/build.xml" /> |
| 29 | <echo message="buildfile: ${buildfile}" /> |
david_williams | 0b74c59 | 2007-04-09 06:11:35 +0000 | [diff] [blame] | 30 | <echo message="logExtension: ${logExtension}" /> |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 31 | <ant antfile="${buildfile}"> |
| 32 | <property name="wtp.builder.home" value="${wtp.builder.home}" /> |
| 33 | <property name="buildBranch" value="${buildBranch}" /> |
| 34 | <property name="build.pack-all-in-one" value="${build.pack-all-in-one}" /> |
| 35 | <property name="eclipse.builder.fetch" value="${eclipse.builder.fetch}" /> |
david_williams | 0b74c59 | 2007-04-09 06:11:35 +0000 | [diff] [blame] | 36 | <property name="logExtension" value="${logExtension}" /> |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 37 | </ant> |
david_williams | c279625 | 2007-06-30 04:41:27 +0000 | [diff] [blame] | 38 | |
| 39 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 40 | </target> |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 41 | |
david_williams | 036c95d | 2007-03-29 19:06:14 +0000 | [diff] [blame] | 42 | |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 43 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 44 | <target name="site" depends="init" if="site_distro_target_exists"> |
| 45 | <ant antfile="${distributionCoreName}.site/build.xml"> |
| 46 | <property name="wtp.builder.home" value="${wtp.builder.home}" /> |
| 47 | <property name="buildBranch" value="${buildBranch}" /> |
| 48 | <property name="build.pack-all-in-one" value="${build.pack-all-in-one}" /> |
| 49 | <property name="eclipse.launcher" value="${eclipse.launcher}" /> |
| 50 | </ant> |
| 51 | </target> |
david_williams | 6252b61 | 2007-02-25 07:23:43 +0000 | [diff] [blame] | 52 | |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 53 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 54 | <target name="test" depends="init" if="tests_distro_target_exists"> |
| 55 | <ant antfile="${distributionCoreName}.tests/build.xml"> |
| 56 | <property name="wtp.builder.home" value="${wtp.builder.home}" /> |
| 57 | <property name="buildBranch" value="${buildBranch}" /> |
| 58 | <property name="build.pack-all-in-one" value="${build.pack-all-in-one}" /> |
| 59 | <property name="testRoot" value="${env.BUILD_HOME}/${build.tests}-${build.distribution}-${buildBranch}-${buildType}" /> |
| 60 | <property name="dependencyTargets" value="${wtp.builder.home}/scripts/dependency/build.xml" /> |
| 61 | <property name="local.cache.dir" value="${env.LOCAL_PREREQS_CACHE}" /> |
| 62 | <property name="buildDirectory" value="${buildDirectory}" /> |
| 63 | <property name="buildLabel" value="${buildLabel}" /> |
| 64 | <property name="eclipse.launcher" value="${eclipse.launcher}" /> |
david_williams | 6252b61 | 2007-02-25 07:23:43 +0000 | [diff] [blame] | 65 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 66 | </ant> |
| 67 | </target> |
david_williams | 67d2770 | 2006-11-20 16:36:52 +0000 | [diff] [blame] | 68 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 69 | <target name="upload" depends="init" if="upload_distro_target_exists"> |
| 70 | <ant antfile="${distributionCoreName}.upload/build.xml"> |
| 71 | <property name="wtp.builder.home" value="${wtp.builder.home}" /> |
| 72 | <property name="buildBranch" value="${buildBranch}" /> |
| 73 | <property name="build.pack-all-in-one" value="${build.pack-all-in-one}" /> |
| 74 | <property name="eclipse.launcher" value="${eclipse.launcher}" /> |
david_williams | 6252b61 | 2007-02-25 07:23:43 +0000 | [diff] [blame] | 75 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 76 | </ant> |
| 77 | </target> |
| 78 | |
| 79 | <target name="whatisfixed" depends="init" if="whatisfixed_distro_target_exists"> |
| 80 | <ant antfile="${distributionCoreName}.whatisfixed/build.xml"> |
| 81 | <property name="wtp.builder.home" value="${wtp.builder.home}" /> |
| 82 | <property name="buildBranch" value="${buildBranch}" /> |
| 83 | <property name="build.pack-all-in-one" value="${build.pack-all-in-one}" /> |
| 84 | <property name="eclipse.launcher" value="${eclipse.launcher}" /> |
| 85 | |
| 86 | </ant> |
| 87 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 88 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 89 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 90 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 91 | |
| 92 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 93 | <target name="init"> |
| 94 | <dirname file="${ant.file}" property="wtp.builder.home" /> |
david_williams | c279625 | 2007-06-30 04:41:27 +0000 | [diff] [blame] | 95 | <condition property="buildBranch" value="R3.0"> |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 96 | <equals arg1="${mapVersionTag}" arg2="HEAD" /> |
| 97 | </condition> |
| 98 | <condition property="buildBranch" value="R0.7"> |
| 99 | <equals arg1="${mapVersionTag}" arg2="R0_7_maintenance" /> |
| 100 | </condition> |
| 101 | <condition property="buildBranch" value="R1.0"> |
| 102 | <equals arg1="${mapVersionTag}" arg2="R1_0_maintenance" /> |
| 103 | </condition> |
| 104 | <condition property="buildBranch" value="R1.5"> |
| 105 | <equals arg1="${mapVersionTag}" arg2="R1_5_maintenance" /> |
| 106 | </condition> |
david_williams | c279625 | 2007-06-30 04:41:27 +0000 | [diff] [blame] | 107 | <condition property="buildBranch" value="R2.0"> |
| 108 | <equals arg1="${mapVersionTag}" arg2="R2_0_maintenance" /> |
| 109 | </condition> |
| 110 | <!-- if not set above, assume R3.0 --> |
| 111 | <!-- this happens, for example, when using a "tempTest" branch --> |
| 112 | <property name="buildBranch" value="R3.0" /> |
| 113 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 114 | <touch file="${user.home}/.cvspass" /> |
ndai | 0aef096 | 2005-09-14 17:36:08 +0000 | [diff] [blame] | 115 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 116 | <property file="${wtp.builder.home}/build.properties" /> |
david_williams | c279625 | 2007-06-30 04:41:27 +0000 | [diff] [blame] | 117 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 118 | <ant antfile="${wtp.builder.home}/scripts/build/label.xml" /> |
| 119 | <property file="${buildDirectory}/label.properties" /> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 120 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 121 | <property name="distributionCoreName" value="${wtp.builder.home}/distribution/${build.distribution}" /> |
| 122 | |
| 123 | <available file="${distributionCoreName}.build/build.xml" type="file" property="build_distro_target_exists" /> |
| 124 | <available file="${distributionCoreName}.site/build.xml" type="file" property="site_distro_target_exists" /> |
| 125 | <available file="${distributionCoreName}.tests/build.xml" type="file" property="tests_distro_target_exists" /> |
| 126 | <available file="${distributionCoreName}.upload/build.xml" type="file" property="upload_distro_target_exists" /> |
| 127 | <available file="${distributionCoreName}.whatisfixed/build.xml" type="file" property="whatisfixed_distro_target_exists" /> |
ndai | 1866385 | 2005-09-15 16:06:41 +0000 | [diff] [blame] | 128 | |
ndai | 0aef096 | 2005-09-14 17:36:08 +0000 | [diff] [blame] | 129 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 130 | <!--fetch the HEAD stream of all projects if build type specified as N--> |
| 131 | <condition property="fetchTag" value="HEAD"> |
| 132 | <equals arg1="${buildType}" arg2="N" /> |
| 133 | </condition> |
ndai | 0aef096 | 2005-09-14 17:36:08 +0000 | [diff] [blame] | 134 | |
david_williams | 4b3c804 | 2007-03-19 01:06:50 +0000 | [diff] [blame] | 135 | <condition property="tagMaps"> |
| 136 | <equals arg1="${build.trial}" arg2="false" /> |
| 137 | </condition> |
| 138 | </target> |
ndai | 0aef096 | 2005-09-14 17:36:08 +0000 | [diff] [blame] | 139 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 140 | |
david_williams | c279625 | 2007-06-30 04:41:27 +0000 | [diff] [blame] | 141 | |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 142 | </project> |