author | dcubed |
Tue, 06 Dec 2011 05:28:17 -0800 | |
changeset 11185 | 6c38e1103f1b |
parent 9059 | f7d1d02fad53 |
child 11301 | 6b8286a5b1b0 |
permissions | -rw-r--r-- |
6 | 1 |
<?xml version="1.0"?> |
2 |
<!-- |
|
9059
f7d1d02fad53
7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents:
5830
diff
changeset
|
3 |
Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. |
6 | 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 |
6 | 9 |
particular file as subject to the "Classpath" exception as provided |
5512 | 10 |
by Oracle in the LICENSE file that accompanied this code. |
6 | 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. |
|
6 | 25 |
--> |
26 |
||
3879 | 27 |
<project name="jaxp" default="all" basedir="."> |
28 |
||
29 |
<!-- For 'ant -p' or 'ant -projecthelp' --> |
|
30 |
||
31 |
<description> |
|
32 |
Ant build script for the ${ant.project.name} part of the jdk. |
|
6 | 33 |
|
3879 | 34 |
Input Properties: (see build.properties for the ant defaults) |
35 |
bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath |
|
36 |
javac.debug - true or false for debug classfiles |
|
37 |
javac.target - classfile version target |
|
38 |
javac.source - source version |
|
5830
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
39 |
drops.dir - directory that holds source drop bundles |
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
40 |
allow.download - permit downloads from public url (default is false) |
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
41 |
(used if bundles not found in drops.dir) |
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
42 |
|
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
43 |
Run 'make help' for help using the Makefile. |
3879 | 44 |
</description> |
6 | 45 |
|
3879 | 46 |
<!-- Mac is special, need to downgrade these before build.properties. --> |
47 |
<condition property="javac.source" value="1.5"> |
|
48 |
<os family="mac"/> |
|
49 |
</condition> |
|
50 |
<condition property="javac.target" value="1.5"> |
|
51 |
<os family="mac"/> |
|
52 |
</condition> |
|
53 |
||
54 |
<!-- Project build properties. --> |
|
6 | 55 |
<property file="build.properties"/> |
3879 | 56 |
|
4131
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
57 |
<!-- See if drop sources were included. --> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
58 |
<condition property="drop.dir" |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
59 |
value="${drop.included.dir}" |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
60 |
else="${drop.expanded.dir}"> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
61 |
<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
|
62 |
</condition> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
63 |
|
3879 | 64 |
<!-- Get shared targets. --> |
65 |
<import file="build-defs.xml"/> |
|
6 | 66 |
|
3879 | 67 |
<!-- Initialization of directories needed for build. --> |
68 |
<target name="init"> |
|
69 |
<mkdir dir="${build.dir}"/> |
|
70 |
<mkdir dir="${build.classes.dir}"/> |
|
71 |
<mkdir dir="${dist.dir}"/> |
|
72 |
<mkdir dir="${dist.lib.dir}"/> |
|
73 |
</target> |
|
74 |
||
75 |
<!-- Sanity checks and settings --> |
|
76 |
<target name="sanity" |
|
77 |
depends="-javac-jar-exists" |
|
78 |
description="Display settings of configuration values"> |
|
79 |
<echo message="${sanity.info}"/> |
|
6 | 80 |
</target> |
81 |
||
3879 | 82 |
<!-- Check for bootstrap javac.jar file, warn if missing. --> |
83 |
<condition property="javac.jar.exists"> |
|
84 |
<available file="${javac.jar}" type="file"/> |
|
85 |
</condition> |
|
86 |
<target name="-javac-jar-exists" |
|
87 |
unless="javac.jar.exists"> |
|
88 |
<echo message="WARNING: Cannot find ${javac.jar}"/> |
|
6 | 89 |
</target> |
90 |
||
3879 | 91 |
<!-- Creation of distribution files to jdk build process. --> |
92 |
<target name="dist" |
|
93 |
depends="init, -init-src-dirs, build, -dist-classes-jar, -dist-src-zip" |
|
94 |
description="Create all built distribution files."> |
|
95 |
</target> |
|
96 |
<target name="-dist-classes-jar-uptodate" |
|
97 |
depends="init, -init-src-dirs"> |
|
98 |
<condition property="dist.classes.jar.uptodate"> |
|
99 |
<and> |
|
100 |
<available file="${dist.classes.jar}" type="file"/> |
|
101 |
<uptodate targetfile="${dist.classes.jar}"> |
|
102 |
<srcfiles dir="${build.classes.dir}" includes="**"/> |
|
103 |
</uptodate> |
|
104 |
</and> |
|
105 |
</condition> |
|
106 |
</target> |
|
107 |
<target name="-dist-classes-jar" |
|
108 |
depends="init, -init-src-dirs, -dist-classes-jar-uptodate" |
|
109 |
unless="dist.classes.jar.uptodate"> |
|
110 |
<delete file="${dist.classes.jar}"/> |
|
111 |
<jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/> |
|
6 | 112 |
</target> |
113 |
||
5830
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
114 |
<target name="-build-setup" |
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
115 |
depends="init, -init-src-dirs, -drop-build-setup"> |
3879 | 116 |
</target> |
117 |
||
118 |
<!-- Build (compilation) of sources to class files. --> |
|
119 |
<target name="build" |
|
5830
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
120 |
depends="compile, -build-setup"> |
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
121 |
</target> |
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
122 |
<target name="compile" |
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
123 |
depends="init, -init-src-dirs"> |
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
124 |
<mkdir dir="${build.classes.dir}"/> |
4294
4b507ae0d54b
6900341: jaxp/jaxws ant scripts using ant runtime in classpath, needs to be explicit
ohair
parents:
4131
diff
changeset
|
125 |
<javac |
5830
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
126 |
includeAntRuntime="false" |
3adf4782de94
6955292: Workaround ant 1.7.1 package-info.java issue in ant scripts
ohair
parents:
5512
diff
changeset
|
127 |
classpath="${build.classes.dir}:${tools.jar}" |
4294
4b507ae0d54b
6900341: jaxp/jaxws ant scripts using ant runtime in classpath, needs to be explicit
ohair
parents:
4131
diff
changeset
|
128 |
fork="true" |
6 | 129 |
destdir="${build.classes.dir}" |
130 |
memoryInitialSize="${javac.memoryInitialSize}" |
|
131 |
memoryMaximumSize="${javac.memoryMaximumSize}" |
|
3879 | 132 |
source="${javac.source}" |
2830
2c7571fb9056
6829575: 100028: Debug information is incomplete or missing
aph
parents:
6
diff
changeset
|
133 |
debug="${javac.debug}" |
6 | 134 |
target="${javac.target}"> |
3879 | 135 |
<compilerarg value="-J-Xbootclasspath/p:${javac.jar}"/> |
136 |
<compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/> |
|
137 |
<src refid="src.dir.id"/> |
|
138 |
</javac> |
|
139 |
</target> |
|
140 |
||
141 |
<!-- Test. (FIXME: Need to know how to run tests.) --> |
|
142 |
<target name="test" |
|
143 |
depends="init, -init-src-dirs, dist"> |
|
144 |
<echo message="FIXME: How do you run the tests"/> |
|
145 |
</target> |
|
146 |
||
147 |
<!-- Populate source area if needed. --> |
|
148 |
<target name="source" |
|
149 |
depends="init, -init-src-dirs" |
|
150 |
description="Populate all source file directories"> |
|
6 | 151 |
</target> |
152 |
||
4131
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
153 |
<!-- Populate drop_included area. --> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
154 |
<target name="drop_included" |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
155 |
depends="clobber" |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
156 |
description="Populate all source file directories"> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
157 |
<delete dir="${drop.included.dir}"/> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
158 |
<antcall target="source"/> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
159 |
<move file="${drop.expanded.dir}" tofile="${drop.included.dir}"/> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
160 |
<delete dir="${drop.included.dir}/bundles"/> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
161 |
</target> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
162 |
|
3879 | 163 |
<!-- Clean up compiled files. --> |
164 |
<target name="clean" |
|
165 |
description="Delete all generated files"> |
|
166 |
<delete dir="${build.dir}"/> |
|
167 |
<delete dir="${dist.dir}"/> |
|
168 |
</target> |
|
169 |
||
170 |
<!-- Clean up compiled files and all imported source files. --> |
|
171 |
<target name="clobber" |
|
172 |
depends="clean" |
|
173 |
description="Delete all generated files, including imported sources"> |
|
4131
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
174 |
<delete dir="${drop.expanded.dir}"/> |
6 | 175 |
</target> |
176 |
||
3879 | 177 |
<target name="-banner"> |
178 |
<echo message="+---------------------------------------+"/> |
|
179 |
<echo message="+ Starting ant project ${ant.project.name} +"/> |
|
180 |
<echo message="+---------------------------------------+"/> |
|
181 |
</target> |
|
182 |
||
183 |
<!-- Do everything but test. --> |
|
184 |
<target name="all" |
|
185 |
depends="-banner, sanity, dist" |
|
186 |
description="Build everything."> |
|
187 |
<echo message="+---------------------------------------+"/> |
|
188 |
<echo message="+ Finishing ant project ${ant.project.name}"/> |
|
189 |
<echo message="+---------------------------------------+"/> |
|
6 | 190 |
</target> |
191 |
||
192 |
</project> |