annotate build-src/build-environment.xml @ 4:5a537ec76c6e

RT-18421: Build files in openjfx/2.1/master have the wrong copyright Reviewed by: jgiles
author kcr
date Fri, 13 Jan 2012 15:52:47 -0800
parents 8d968b638b49
children
rev   line source
rbair@3 1 <?xml version="1.0" encoding="UTF-8"?>
rbair@3 2 <project name="build-environment" basedir=".">
rbair@3 3
rbair@3 4 <!--
rbair@3 5 /*
kcr@4 6 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
rbair@3 7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
rbair@3 8 *
rbair@3 9 * This code is free software; you can redistribute it and/or modify it
rbair@3 10 * under the terms of the GNU General Public License version 2 only, as
kcr@4 11 * published by the Free Software Foundation. Oracle designates this
kcr@4 12 * particular file as subject to the "Classpath" exception as provided
kcr@4 13 * by Oracle in the LICENSE file that accompanied this code.
rbair@3 14 *
rbair@3 15 * This code is distributed in the hope that it will be useful, but WITHOUT
rbair@3 16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
rbair@3 17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
rbair@3 18 * version 2 for more details (a copy is included in the LICENSE file that
rbair@3 19 * accompanied this code).
rbair@3 20 *
rbair@3 21 * You should have received a copy of the GNU General Public License version
rbair@3 22 * 2 along with this work; if not, write to the Free Software Foundation,
rbair@3 23 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
rbair@3 24 *
kcr@4 25 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
kcr@4 26 * or visit www.oracle.com if you need additional information or have any
kcr@4 27 * questions.
rbair@3 28 */
rbair@3 29 -->
rbair@3 30
rbair@3 31 <description>
rbair@3 32
rbair@3 33 Checks and prints the environment variables for JavaFX project.
rbair@3 34 Where necessary, environment variable settings or system file
rbair@3 35 locations may be placed into properties here.
rbair@3 36
rbair@3 37 *** Sub-repositories should NOT import this file. ***
rbair@3 38
rbair@3 39 This file is imported by the build-defs.xml file.
rbair@3 40
rbair@3 41 </description>
rbair@3 42
rbair@3 43 <property environment="env"/>
rbair@3 44
rbair@3 45 <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
rbair@3 46 <!-- Checks the environment variables. -->
rbair@3 47
rbair@3 48 <macrodef name="find-default-dir">
rbair@3 49 <attribute name="property"/>
rbair@3 50 <attribute name="evalue"/>
rbair@3 51 <attribute name="dvalue"/>
rbair@3 52 <sequential>
rbair@3 53 <condition property="@{property}" value="@{evalue}">
rbair@3 54 <available file="@{evalue}" type="dir"/>
rbair@3 55 </condition>
rbair@3 56 <condition property="@{property}" value="@{dvalue}">
rbair@3 57 <available file="@{dvalue}" type="dir"/>
rbair@3 58 </condition>
rbair@3 59 </sequential>
rbair@3 60 </macrodef>
rbair@3 61
rbair@3 62 <macrodef name="find-default-val">
rbair@3 63 <attribute name="property"/>
rbair@3 64 <attribute name="var"/>
rbair@3 65 <attribute name="dvalue"/>
rbair@3 66 <sequential>
rbair@3 67 <condition property="@{property}" value="${env.@{var}}" else="@{dvalue}">
rbair@3 68 <isset property="env.@{var}"/>
rbair@3 69 </condition>
rbair@3 70 </sequential>
rbair@3 71 </macrodef>
rbair@3 72
rbair@3 73 <tstamp>
rbair@3 74 <format property="jfx.built.today"
rbair@3 75 pattern="yyyy/MM/dd HH:mm:ss"/>
rbair@3 76 </tstamp>
rbair@3 77
rbair@3 78 <find-default-dir property="dxsdk.path"
rbair@3 79 evalue="${env.DXSDK_DIR}"
rbair@3 80 dvalue="C:/DXSDK"/>
rbair@3 81
rbair@3 82 <find-default-dir property="qtsdk.path"
rbair@3 83 evalue="${env.QTSDK_DIR}"
rbair@3 84 dvalue="C:/QTSDK"/>
rbair@3 85
rbair@3 86 <find-default-dir property="wmsdk.path"
rbair@3 87 evalue="${env.WMSDK_DIR}"
rbair@3 88 dvalue="C:/WMSDK/WMFSDK95"/>
rbair@3 89
rbair@3 90 <find-default-dir property="systemroot.path"
rbair@3 91 evalue="${env.SystemRoot}"
rbair@3 92 dvalue="C:/WINDOWS"/>
rbair@3 93
rbair@3 94 <condition property="hudson.current.build.url"
rbair@3 95 value="${env.HUDSON_URL}">
rbair@3 96 <isset property="env.HUDSON_URL"/>
rbair@3 97 </condition>
rbair@3 98
rbair@3 99 <find-default-val property="hudson.current.job.name"
rbair@3 100 var="JOB_NAME"
rbair@3 101 dvalue="not_hudson/label=${platform}"/>
rbair@3 102
rbair@3 103 <find-default-val property="hudson.current.build.number"
rbair@3 104 var="BUILD_NUMBER"
rbair@3 105 dvalue="0000"/>
rbair@3 106
rbair@3 107 <find-default-val property="hudson.current.build.id"
rbair@3 108 var="BUILD_ID"
rbair@3 109 dvalue="${jfx.built.today} (non-hudson build)"/>
rbair@3 110
rbair@3 111 <!-- The job.name looks like "somename/label=linux-i586" so extract the "somename" -->
rbair@3 112 <dirname property="hudson.current.job.name.tmp" file="${hudson.current.job.name}"/>
rbair@3 113 <basename property="hudson.current.job.basename" file="${hudson.current.job.name.tmp}"/>
rbair@3 114
rbair@3 115 <find-default-val property="jfx.promoted.build.number"
rbair@3 116 var="NEXT_PROMOTED_BUILD_NUMBER"
rbair@3 117 dvalue="00"/>
rbair@3 118
rbair@3 119 <property name="jfx.build.number"
rbair@3 120 value="${hudson.current.build.number}"/>
rbair@3 121 <property name="jfx.build.id"
rbair@3 122 value="${hudson.current.build.id}"/>
rbair@3 123 <property name="jfx.job.name"
rbair@3 124 value="${hudson.current.job.name}"/>
rbair@3 125
rbair@3 126 <property name="jfx.timestamp.product"
rbair@3 127 value="Product: ${jfx.product.name}-${jfx.release.version}${jfx.release.milestone}"/>
rbair@3 128 <property name="jfx.timestamp.platform"
rbair@3 129 value="Platform: ${platform}"/>
rbair@3 130 <property name="jfx.timestamp.build.number"
rbair@3 131 value="Build-Number: ${jfx.build.number}"/>
rbair@3 132 <property name="jfx.timestamp.build.id"
rbair@3 133 value="Build-ID: ${jfx.build.id}"/>
rbair@3 134 <property name="jfx.timestamp.string"
rbair@3 135 value="${jfx.timestamp.product}${line.separator}${jfx.timestamp.platform}${line.separator}${jfx.timestamp.build.number}${line.separator}${jfx.timestamp.build.id}"/>
rbair@3 136
rbair@3 137 <!-- Get the hudson properties. -->
rbair@3 138
rbair@3 139 <property file="${jfx.root.dir}/hudson.properties"/>
rbair@3 140
rbair@3 141 <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
rbair@3 142 <!-- Macrodefs -->
rbair@3 143
rbair@3 144 <!-- Print out an environment variable value -->
rbair@3 145 <macrodef name="print-env">
rbair@3 146 <attribute name="name"/>
rbair@3 147 <sequential>
rbair@3 148 <condition property="env.@{name}.value"
rbair@3 149 value="${env.@{name}}"
rbair@3 150 else="">
rbair@3 151 <isset property="env.@{name}"/>
rbair@3 152 </condition>
rbair@3 153 <echo level="info"
rbair@3 154 message=" @{name}=${env.@{name}.value}"/>
rbair@3 155 </sequential>
rbair@3 156 </macrodef>
rbair@3 157
rbair@3 158 <target name="-check-windows" if="isWindows">
rbair@3 159 <echo level="info"
rbair@3 160 message="Windows Environment Variable Settings:"/>
rbair@3 161 <echo level="info"
rbair@3 162 message="--------------------------------------"/>
rbair@3 163 <print-env name="JAVA_HOME"/>
rbair@3 164 <print-env name="PATH"/>
rbair@3 165 <print-env name="VS71COMNTOOLS"/>
rbair@3 166 </target>
rbair@3 167
rbair@3 168 <target name="-check-macosx" if="isMacOSX">
rbair@3 169 <echo level="info"
rbair@3 170 message="MacOSX Environment Variable Settings:"/>
rbair@3 171 <echo level="info"
rbair@3 172 message="-------------------------------------"/>
rbair@3 173 <print-env name="JAVA_HOME"/>
rbair@3 174 <print-env name="PATH"/>
rbair@3 175 <print-env name="LD_LIBRARY_PATH"/>
rbair@3 176 <print-env name="LD_LIBRARY_PATH32"/>
rbair@3 177 <print-env name="LD_LIBRARY_PATH64"/>
rbair@3 178 </target>
rbair@3 179
rbair@3 180 <target name="-check-solaris" if="isSolaris">
rbair@3 181 <echo level="info"
rbair@3 182 message="Solaris Environment Variable Settings:"/>
rbair@3 183 <echo level="info"
rbair@3 184 message="-------------------------------------"/>
rbair@3 185 <print-env name="JAVA_HOME"/>
rbair@3 186 <print-env name="PATH"/>
rbair@3 187 <print-env name="LD_LIBRARY_PATH"/>
rbair@3 188 <print-env name="LD_LIBRARY_PATH32"/>
rbair@3 189 <print-env name="LD_LIBRARY_PATH64"/>
rbair@3 190 </target>
rbair@3 191
rbair@3 192 <target name="-check-linux" if="isLinux">
rbair@3 193 <echo level="info"
rbair@3 194 message="Linux Environment Variable Settings:"/>
rbair@3 195 <echo level="info"
rbair@3 196 message="-----------------------------------"/>
rbair@3 197 <print-env name="JAVA_HOME"/>
rbair@3 198 <print-env name="PATH"/>
rbair@3 199 <print-env name="LD_LIBRARY_PATH"/>
rbair@3 200 <print-env name="LD_LIBRARY_PATH32"/>
rbair@3 201 <print-env name="LD_LIBRARY_PATH64"/>
rbair@3 202 </target>
rbair@3 203
rbair@3 204 <property name="jfx.ant.version.needed" value="1.7.1"/>
rbair@3 205
rbair@3 206 <target name="-check-ant">
rbair@3 207 <fail message="You need at least ant version ${jfx.ant.version.needed}">
rbair@3 208 <condition>
rbair@3 209 <not>
rbair@3 210 <antversion atleast="${jfx.ant.version.needed}"/>
rbair@3 211 </not>
rbair@3 212 </condition>
rbair@3 213 </fail>
rbair@3 214 </target>
rbair@3 215
rbair@3 216 <target name="check-environment"
rbair@3 217 depends="-check-ant,
rbair@3 218 -check-windows,
rbair@3 219 -check-macosx,
rbair@3 220 -check-solaris,
rbair@3 221 -check-linux">
rbair@3 222 </target>
rbair@3 223
rbair@3 224 <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
rbair@3 225
rbair@3 226 </project>