annotate build-drop-template.xml @ 193:de11bd049d6f

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