build-drop-template.xml

Thu, 15 Oct 2009 16:40:27 -0700

author
xdono
date
Thu, 15 Oct 2009 16:40:27 -0700
changeset 89
fcf2b8b5d606
parent 85
ae2bec597586
child 91
cc35f0e129d2
permissions
-rw-r--r--

Added tag jdk7-b74 for changeset f4466e1b6080

ohair@85 1 <?xml version="1.0"?>
ohair@85 2 <!--
ohair@85 3 Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
ohair@85 4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@85 5
ohair@85 6 This code is free software; you can redistribute it and/or modify it
ohair@85 7 under the terms of the GNU General Public License version 2 only, as
ohair@85 8 published by the Free Software Foundation. Sun designates this
ohair@85 9 particular file as subject to the "Classpath" exception as provided
ohair@85 10 by Sun in the LICENSE file that accompanied this code.
ohair@85 11
ohair@85 12 This code is distributed in the hope that it will be useful, but WITHOUT
ohair@85 13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@85 14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@85 15 version 2 for more details (a copy is included in the LICENSE file that
ohair@85 16 accompanied this code).
ohair@85 17
ohair@85 18 You should have received a copy of the GNU General Public License version
ohair@85 19 2 along with this work; if not, write to the Free Software Foundation,
ohair@85 20 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@85 21
ohair@85 22 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
ohair@85 23 CA 95054 USA or visit www.sun.com if you need additional information or
ohair@85 24 have any questions.
ohair@85 25 -->
ohair@85 26
ohair@85 27 <project name="@DROP@-drop" default="all" basedir=".">
ohair@85 28
ohair@85 29 <!-- Locations of master drop bundles. -->
ohair@85 30 <property name="@DROP@.master.bundle.copy"
ohair@85 31 value="${@DROP@.master.bundle.dir}/${@DROP@.bundle.name}"/>
ohair@85 32 <property name="@DROP@.master.bundle.url"
ohair@85 33 value="${@DROP@.master.bundle.url.base}/${@DROP@.bundle.name}"/>
ohair@85 34
ohair@85 35 <!-- Location where the copied bundle lands. -->
ohair@85 36 <property name="@DROP@.bundle.copy"
ohair@85 37 value="${drop.dir}/bundles/${@DROP@.bundle.name}"/>
ohair@85 38
ohair@85 39 <!-- Root of exploded area. -->
ohair@85 40 <property name="@DROP@.root.dir" value="${drop.dir}/@DROP@"/>
ohair@85 41 <property name="@DROP@.src.dir" value="${@DROP@.root.dir}/src"/>
ohair@85 42
ohair@85 43 <!-- To see if the drop areas are ready. (ignoring bundles) -->
ohair@85 44 <target name="-@DROP@-ready">
ohair@85 45 <condition property="@DROP@.ready">
ohair@85 46 <and>
ohair@85 47 <available file="${@DROP@.root.dir}" type="dir"/>
ohair@85 48 <available file="${@DROP@.root.dir}/PATCHED" type="file"/>
ohair@85 49 </and>
ohair@85 50 </condition>
ohair@85 51 </target>
ohair@85 52
ohair@85 53 <!-- Copy over bundles from some shared master area. -->
ohair@85 54 <condition property="@DROP@.master.bundle.copy.exists">
ohair@85 55 <available file="${@DROP@.master.bundle.copy}" type="file"/>
ohair@85 56 </condition>
ohair@85 57 <target name="-@DROP@-copy-bundle"
ohair@85 58 depends="init, -@DROP@-ready"
ohair@85 59 if="@DROP@.master.bundle.copy.exists"
ohair@85 60 unless="@DROP@.ready">
ohair@85 61 <echo message="Copying from ${@DROP@.master.bundle.copy}"/>
ohair@85 62 <dirname property="@DROP@.bundle.dirname" file="${@DROP@.bundle.copy}"/>
ohair@85 63 <mkdir dir="${@DROP@.bundle.dirname}"/>
ohair@85 64 <delete file="${@DROP@.bundle.copy}.temp"/>
ohair@85 65 <delete file="${@DROP@.bundle.copy}"/>
ohair@85 66 <copy file="${@DROP@.master.bundle.copy}" tofile="${@DROP@.bundle.copy}.temp"/>
ohair@85 67 <move file="${@DROP@.bundle.copy}.temp" tofile="${@DROP@.bundle.copy}"/>
ohair@85 68 <property name="@DROP@.master.bundle.found" value="true"/>
ohair@85 69 </target>
ohair@85 70
ohair@85 71 <!-- Determine if the master url download should be used. -->
ohair@85 72 <target name="-@DROP@-url-should-be-used" unless="@DROP@.url.should.be.used">
ohair@85 73 <condition property="@DROP@.url.should.be.used">
ohair@85 74 <and>
ohair@85 75 <http url="${@DROP@.master.bundle.url.base}"/>
ohair@85 76 <not>
ohair@85 77 <isset property="@DROP@.master.bundle.copy.exists"/>
ohair@85 78 </not>
ohair@85 79 </and>
ohair@85 80 </condition>
ohair@85 81 </target>
ohair@85 82
ohair@85 83 <!-- Download bundles from a url. -->
ohair@85 84 <target name="-@DROP@-url-bundle"
ohair@85 85 depends="init, -@DROP@-ready, -@DROP@-url-should-be-used"
ohair@85 86 if="@DROP@.url.should.be.used"
ohair@85 87 unless="@DROP@.ready">
ohair@85 88 <echo message="Downloading from ${@DROP@.master.bundle.url}"/>
ohair@85 89 <dirname property="@DROP@.bundle.dirname" file="${@DROP@.bundle.copy}"/>
ohair@85 90 <mkdir dir="${@DROP@.bundle.dirname}"/>
ohair@85 91 <delete file="${@DROP@.bundle.copy}.temp"/>
ohair@85 92 <delete file="${@DROP@.bundle.copy}"/>
ohair@85 93 <get src="${@DROP@.master.bundle.url}" dest="${@DROP@.bundle.copy}.temp"/>
ohair@85 94 <move file="${@DROP@.bundle.copy}.temp" tofile="${@DROP@.bundle.copy}"/>
ohair@85 95 <property name="@DROP@.master.bundle.found" value="true"/>
ohair@85 96 </target>
ohair@85 97
ohair@85 98 <!-- Fill in the drop zones, but just when needed. -->
ohair@85 99 <target name="@DROP@-update"
ohair@85 100 depends="init,
ohair@85 101 -@DROP@-copy-bundle,
ohair@85 102 -@DROP@-url-bundle,
ohair@85 103 -@DROP@-ready"
ohair@85 104 if="@DROP@.master.bundle.found"
ohair@85 105 unless="@DROP@.ready">
ohair@85 106 <delete dir="${@DROP@.root.dir}"/>
ohair@85 107 <delete dir="${@DROP@.root.dir}-temp"/>
ohair@85 108 <mkdir dir="${@DROP@.root.dir}-temp"/>
ohair@85 109 <unzip src="${@DROP@.bundle.copy}" dest="${@DROP@.root.dir}-temp"/>
ohair@85 110 <move file="${@DROP@.root.dir}-temp" tofile="${@DROP@.root.dir}"/>
ohair@85 111 <touch>
ohair@85 112 <fileset dir="${@DROP@.root.dir}"/>
ohair@85 113 </touch>
ohair@85 114 <condition property="patch.utility" value="gpatch" else="patch">
ohair@85 115 <os name="SunOS"/>
ohair@85 116 </condition>
ohair@85 117 <apply executable="${patch.utility}"
ohair@85 118 dir="${@DROP@.root.dir}"
ohair@85 119 parallel="false"
ohair@85 120 failonerror="true"
ohair@85 121 verbose="true">
ohair@85 122 <arg value="-l"/>
ohair@85 123 <arg value="-p0"/>
ohair@85 124 <arg value="-i"/>
ohair@85 125 <filelist dir="${patches.dir}/@DROP@" files="${@DROP@.patch.list}"/>
ohair@85 126 </apply>
ohair@85 127 <echo file="${@DROP@.root.dir}/PATCHED"
ohair@85 128 message="Patches have been applied."/>
ohair@85 129 </target>
ohair@85 130
ohair@85 131 </project>

mercurial