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