author | asaha |
Fri, 30 Oct 2009 07:58:03 -0700 | |
changeset 4222 | fbd90ce2c529 |
parent 3879 | 0d9209bdf36c |
child 4131 | c5661b1a888f |
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 |
|
52 |
<!-- Get shared targets. --> |
|
53 |
<import file="build-defs.xml"/> |
|
6 | 54 |
|
3879 | 55 |
<!-- Initialization of directories needed for build. --> |
56 |
<target name="init"> |
|
57 |
<mkdir dir="${build.dir}"/> |
|
58 |
<mkdir dir="${build.classes.dir}"/> |
|
59 |
<mkdir dir="${dist.dir}"/> |
|
60 |
<mkdir dir="${dist.lib.dir}"/> |
|
61 |
</target> |
|
62 |
||
63 |
<!-- Sanity checks and settings --> |
|
64 |
<target name="sanity" |
|
65 |
depends="-javac-jar-exists" |
|
66 |
description="Display settings of configuration values"> |
|
67 |
<echo message="${sanity.info}"/> |
|
6 | 68 |
</target> |
69 |
||
3879 | 70 |
<!-- Check for bootstrap javac.jar file, warn if missing. --> |
71 |
<condition property="javac.jar.exists"> |
|
72 |
<available file="${javac.jar}" type="file"/> |
|
73 |
</condition> |
|
74 |
<target name="-javac-jar-exists" |
|
75 |
unless="javac.jar.exists"> |
|
76 |
<echo message="WARNING: Cannot find ${javac.jar}"/> |
|
6 | 77 |
</target> |
78 |
||
3879 | 79 |
<!-- Creation of distribution files to jdk build process. --> |
80 |
<target name="dist" |
|
81 |
depends="init, -init-src-dirs, build, -dist-classes-jar, -dist-src-zip" |
|
82 |
description="Create all built distribution files."> |
|
83 |
</target> |
|
84 |
<target name="-dist-classes-jar-uptodate" |
|
85 |
depends="init, -init-src-dirs"> |
|
86 |
<condition property="dist.classes.jar.uptodate"> |
|
87 |
<and> |
|
88 |
<available file="${dist.classes.jar}" type="file"/> |
|
89 |
<uptodate targetfile="${dist.classes.jar}"> |
|
90 |
<srcfiles dir="${build.classes.dir}" includes="**"/> |
|
91 |
</uptodate> |
|
92 |
</and> |
|
93 |
</condition> |
|
94 |
</target> |
|
95 |
<target name="-dist-classes-jar" |
|
96 |
depends="init, -init-src-dirs, -dist-classes-jar-uptodate" |
|
97 |
unless="dist.classes.jar.uptodate"> |
|
98 |
<delete file="${dist.classes.jar}"/> |
|
99 |
<jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/> |
|
6 | 100 |
</target> |
101 |
||
3879 | 102 |
<target name="-build-prep" |
103 |
depends="init, -init-src-dirs, -drop-build-prep"> |
|
104 |
</target> |
|
105 |
||
106 |
<!-- Build (compilation) of sources to class files. --> |
|
107 |
<target name="build" |
|
108 |
depends="init, -init-src-dirs, -build-prep"> |
|
109 |
<javac fork="true" |
|
6 | 110 |
destdir="${build.classes.dir}" |
111 |
memoryInitialSize="${javac.memoryInitialSize}" |
|
112 |
memoryMaximumSize="${javac.memoryMaximumSize}" |
|
3879 | 113 |
source="${javac.source}" |
2830
2c7571fb9056
6829575: 100028: Debug information is incomplete or missing
aph
parents:
6
diff
changeset
|
114 |
debug="${javac.debug}" |
6 | 115 |
target="${javac.target}"> |
3879 | 116 |
<compilerarg value="-J-Xbootclasspath/p:${javac.jar}"/> |
117 |
<compilerarg line="${javac.version.opt} ${javac.lint.opts} ${javac.no.jdk.warnings}"/> |
|
118 |
<src refid="src.dir.id"/> |
|
119 |
</javac> |
|
120 |
</target> |
|
121 |
||
122 |
<!-- Test. (FIXME: Need to know how to run tests.) --> |
|
123 |
<target name="test" |
|
124 |
depends="init, -init-src-dirs, dist"> |
|
125 |
<echo message="FIXME: How do you run the tests"/> |
|
126 |
</target> |
|
127 |
||
128 |
<!-- Populate source area if needed. --> |
|
129 |
<target name="source" |
|
130 |
depends="init, -init-src-dirs" |
|
131 |
description="Populate all source file directories"> |
|
6 | 132 |
</target> |
133 |
||
3879 | 134 |
<!-- Clean up compiled files. --> |
135 |
<target name="clean" |
|
136 |
description="Delete all generated files"> |
|
137 |
<delete dir="${build.dir}"/> |
|
138 |
<delete dir="${dist.dir}"/> |
|
139 |
</target> |
|
140 |
||
141 |
<!-- Clean up compiled files and all imported source files. --> |
|
142 |
<target name="clobber" |
|
143 |
depends="clean" |
|
144 |
description="Delete all generated files, including imported sources"> |
|
145 |
<delete dir="${drop.dir}"/> |
|
6 | 146 |
</target> |
147 |
||
3879 | 148 |
<target name="-banner"> |
149 |
<echo message="+---------------------------------------+"/> |
|
150 |
<echo message="+ Starting ant project ${ant.project.name} +"/> |
|
151 |
<echo message="+---------------------------------------+"/> |
|
152 |
</target> |
|
153 |
||
154 |
<!-- Do everything but test. --> |
|
155 |
<target name="all" |
|
156 |
depends="-banner, sanity, dist" |
|
157 |
description="Build everything."> |
|
158 |
<echo message="+---------------------------------------+"/> |
|
159 |
<echo message="+ Finishing ant project ${ant.project.name}"/> |
|
160 |
<echo message="+---------------------------------------+"/> |
|
6 | 161 |
</target> |
162 |
||
163 |
</project> |