author | darcy |
Thu, 14 Jan 2010 20:05:19 -0800 | |
changeset 4672 | ca386fa28a62 |
parent 4294 | 4b507ae0d54b |
child 5512 | 74bb36df3a83 |
permissions | -rw-r--r-- |
6 | 1 |
<?xml version="1.0"?> |
2 |
<!-- |
|
3879 | 3 |
Copyright 2009 Sun Microsystems, Inc. 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 |
|
8 |
published by the Free Software Foundation. Sun designates this |
|
9 |
particular file as subject to the "Classpath" exception as provided |
|
10 |
by Sun in the LICENSE file that accompanied this code. |
|
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 |
||
22 |
Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
23 |
CA 95054 USA or visit www.sun.com if you need additional information or |
|
24 |
have any questions. |
|
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 |
|
39 |
</description> |
|
6 | 40 |
|
3879 | 41 |
<!-- Mac is special, need to downgrade these before build.properties. --> |
42 |
<condition property="javac.source" value="1.5"> |
|
43 |
<os family="mac"/> |
|
44 |
</condition> |
|
45 |
<condition property="javac.target" value="1.5"> |
|
46 |
<os family="mac"/> |
|
47 |
</condition> |
|
48 |
||
49 |
<!-- Project build properties. --> |
|
6 | 50 |
<property file="build.properties"/> |
3879 | 51 |
|
4131
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
52 |
<!-- 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
|
53 |
<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
|
54 |
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
|
55 |
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
|
56 |
<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
|
57 |
</condition> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
58 |
|
3879 | 59 |
<!-- Get shared targets. --> |
60 |
<import file="build-defs.xml"/> |
|
6 | 61 |
|
3879 | 62 |
<!-- Initialization of directories needed for build. --> |
63 |
<target name="init"> |
|
64 |
<mkdir dir="${build.dir}"/> |
|
65 |
<mkdir dir="${build.classes.dir}"/> |
|
66 |
<mkdir dir="${dist.dir}"/> |
|
67 |
<mkdir dir="${dist.lib.dir}"/> |
|
68 |
</target> |
|
69 |
||
70 |
<!-- Sanity checks and settings --> |
|
71 |
<target name="sanity" |
|
72 |
depends="-javac-jar-exists" |
|
73 |
description="Display settings of configuration values"> |
|
74 |
<echo message="${sanity.info}"/> |
|
6 | 75 |
</target> |
76 |
||
3879 | 77 |
<!-- Check for bootstrap javac.jar file, warn if missing. --> |
78 |
<condition property="javac.jar.exists"> |
|
79 |
<available file="${javac.jar}" type="file"/> |
|
80 |
</condition> |
|
81 |
<target name="-javac-jar-exists" |
|
82 |
unless="javac.jar.exists"> |
|
83 |
<echo message="WARNING: Cannot find ${javac.jar}"/> |
|
6 | 84 |
</target> |
85 |
||
3879 | 86 |
<!-- Creation of distribution files to jdk build process. --> |
87 |
<target name="dist" |
|
88 |
depends="init, -init-src-dirs, build, -dist-classes-jar, -dist-src-zip" |
|
89 |
description="Create all built distribution files."> |
|
90 |
</target> |
|
91 |
<target name="-dist-classes-jar-uptodate" |
|
92 |
depends="init, -init-src-dirs"> |
|
93 |
<condition property="dist.classes.jar.uptodate"> |
|
94 |
<and> |
|
95 |
<available file="${dist.classes.jar}" type="file"/> |
|
96 |
<uptodate targetfile="${dist.classes.jar}"> |
|
97 |
<srcfiles dir="${build.classes.dir}" includes="**"/> |
|
98 |
</uptodate> |
|
99 |
</and> |
|
100 |
</condition> |
|
101 |
</target> |
|
102 |
<target name="-dist-classes-jar" |
|
103 |
depends="init, -init-src-dirs, -dist-classes-jar-uptodate" |
|
104 |
unless="dist.classes.jar.uptodate"> |
|
105 |
<delete file="${dist.classes.jar}"/> |
|
106 |
<jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/> |
|
6 | 107 |
</target> |
108 |
||
3879 | 109 |
<target name="-build-prep" |
110 |
depends="init, -init-src-dirs, -drop-build-prep"> |
|
111 |
</target> |
|
112 |
||
113 |
<!-- Build (compilation) of sources to class files. --> |
|
114 |
<target name="build" |
|
115 |
depends="init, -init-src-dirs, -build-prep"> |
|
4294
4b507ae0d54b
6900341: jaxp/jaxws ant scripts using ant runtime in classpath, needs to be explicit
ohair
parents:
4131
diff
changeset
|
116 |
<javac |
4b507ae0d54b
6900341: jaxp/jaxws ant scripts using ant runtime in classpath, needs to be explicit
ohair
parents:
4131
diff
changeset
|
117 |
includeAntRuntime="false" |
4b507ae0d54b
6900341: jaxp/jaxws ant scripts using ant runtime in classpath, needs to be explicit
ohair
parents:
4131
diff
changeset
|
118 |
classpath="${build.classes.dir}" |
4b507ae0d54b
6900341: jaxp/jaxws ant scripts using ant runtime in classpath, needs to be explicit
ohair
parents:
4131
diff
changeset
|
119 |
fork="true" |
6 | 120 |
destdir="${build.classes.dir}" |
121 |
memoryInitialSize="${javac.memoryInitialSize}" |
|
122 |
memoryMaximumSize="${javac.memoryMaximumSize}" |
|
3879 | 123 |
source="${javac.source}" |
2830
2c7571fb9056
6829575: 100028: Debug information is incomplete or missing
aph
parents:
6
diff
changeset
|
124 |
debug="${javac.debug}" |
6 | 125 |
target="${javac.target}"> |
3879 | 126 |
<compilerarg value="-J-Xbootclasspath/p:${javac.jar}"/> |
127 |
<compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/> |
|
128 |
<src refid="src.dir.id"/> |
|
129 |
</javac> |
|
130 |
</target> |
|
131 |
||
132 |
<!-- Test. (FIXME: Need to know how to run tests.) --> |
|
133 |
<target name="test" |
|
134 |
depends="init, -init-src-dirs, dist"> |
|
135 |
<echo message="FIXME: How do you run the tests"/> |
|
136 |
</target> |
|
137 |
||
138 |
<!-- Populate source area if needed. --> |
|
139 |
<target name="source" |
|
140 |
depends="init, -init-src-dirs" |
|
141 |
description="Populate all source file directories"> |
|
6 | 142 |
</target> |
143 |
||
4131
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
144 |
<!-- 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
|
145 |
<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
|
146 |
depends="clobber" |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
147 |
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
|
148 |
<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
|
149 |
<antcall target="source"/> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
150 |
<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
|
151 |
<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
|
152 |
</target> |
c5661b1a888f
6894441: Add checksum checks, remove use of original sources in jax repositories, fix bundle logic
ohair
parents:
3879
diff
changeset
|
153 |
|
3879 | 154 |
<!-- Clean up compiled files. --> |
155 |
<target name="clean" |
|
156 |
description="Delete all generated files"> |
|
157 |
<delete dir="${build.dir}"/> |
|
158 |
<delete dir="${dist.dir}"/> |
|
159 |
</target> |
|
160 |
||
161 |
<!-- Clean up compiled files and all imported source files. --> |
|
162 |
<target name="clobber" |
|
163 |
depends="clean" |
|
164 |
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
|
165 |
<delete dir="${drop.expanded.dir}"/> |
6 | 166 |
</target> |
167 |
||
3879 | 168 |
<target name="-banner"> |
169 |
<echo message="+---------------------------------------+"/> |
|
170 |
<echo message="+ Starting ant project ${ant.project.name} +"/> |
|
171 |
<echo message="+---------------------------------------+"/> |
|
172 |
</target> |
|
173 |
||
174 |
<!-- Do everything but test. --> |
|
175 |
<target name="all" |
|
176 |
depends="-banner, sanity, dist" |
|
177 |
description="Build everything."> |
|
178 |
<echo message="+---------------------------------------+"/> |
|
179 |
<echo message="+ Finishing ant project ${ant.project.name}"/> |
|
180 |
<echo message="+---------------------------------------+"/> |
|
6 | 181 |
</target> |
182 |
||
183 |
</project> |