34 Input Properties: (see build.properties for the ant defaults) |
34 Input Properties: (see build.properties for the ant defaults) |
35 bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath |
35 bootstrap.dir - dir with lib/javac.jar, added to javac bootclasspath |
36 javac.debug - true or false for debug classfiles |
36 javac.debug - true or false for debug classfiles |
37 javac.target - classfile version target |
37 javac.target - classfile version target |
38 javac.source - source version |
38 javac.source - source version |
39 drops.dir - directory that holds source drop bundles |
|
40 allow.download - permit downloads from public url (default is false) |
|
41 (used if bundles not found in drops.dir) |
|
42 |
39 |
43 Run 'make help' for help using the Makefile. |
40 Run 'make help' for help using the Makefile. |
44 </description> |
41 </description> |
45 |
42 |
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. --> |
43 <!-- Project build properties. --> |
55 <property file="build.properties"/> |
44 <property file="build.properties"/> |
56 |
45 |
57 <!-- See if drop sources were included. --> |
46 <!-- Source dir def --> |
58 <condition property="drop.dir" |
47 <property name="jaxp.src.dir" value="src/share/classes"/> |
59 value="${drop.included.dir}" |
48 <path id="src.dir.id"> |
60 else="${drop.expanded.dir}"> |
49 <pathelement path="${jaxp.src.dir}"/> |
61 <available file="${drop.included.dir}" type="dir"/> |
50 </path> |
62 </condition> |
|
63 |
|
64 <!-- Get shared targets. --> |
|
65 <import file="build-defs.xml"/> |
|
66 |
51 |
67 <!-- Initialization of directories needed for build. --> |
52 <!-- Initialization of directories needed for build. --> |
68 <target name="init"> |
53 <target name="init"> |
69 <mkdir dir="${build.dir}"/> |
54 <mkdir dir="${build.dir}"/> |
70 <mkdir dir="${build.classes.dir}"/> |
55 <mkdir dir="${build.classes.dir}"/> |
88 <echo message="WARNING: Cannot find ${javac.jar}"/> |
73 <echo message="WARNING: Cannot find ${javac.jar}"/> |
89 </target> |
74 </target> |
90 |
75 |
91 <!-- Creation of distribution files to jdk build process. --> |
76 <!-- Creation of distribution files to jdk build process. --> |
92 <target name="dist" |
77 <target name="dist" |
93 depends="init, -init-src-dirs, build, -dist-classes-jar, -dist-src-zip" |
78 depends="init, build, -dist-classes-jar, -dist-src-zip" |
94 description="Create all built distribution files."> |
79 description="Create all built distribution files."> |
95 </target> |
80 </target> |
96 <target name="-dist-classes-jar-uptodate" |
81 <target name="-dist-classes-jar-uptodate" |
97 depends="init, -init-src-dirs"> |
82 depends="init"> |
98 <condition property="dist.classes.jar.uptodate"> |
83 <condition property="dist.classes.jar.uptodate"> |
99 <and> |
84 <and> |
100 <available file="${dist.classes.jar}" type="file"/> |
85 <available file="${dist.classes.jar}" type="file"/> |
101 <uptodate targetfile="${dist.classes.jar}"> |
86 <uptodate targetfile="${dist.classes.jar}"> |
102 <srcfiles dir="${build.classes.dir}" includes="**"/> |
87 <srcfiles dir="${build.classes.dir}" includes="**"/> |
103 </uptodate> |
88 </uptodate> |
104 </and> |
89 </and> |
105 </condition> |
90 </condition> |
106 </target> |
91 </target> |
107 <target name="-dist-classes-jar" |
92 <target name="-dist-classes-jar" |
108 depends="init, -init-src-dirs, -dist-classes-jar-uptodate" |
93 depends="init, -dist-classes-jar-uptodate" |
109 unless="dist.classes.jar.uptodate"> |
94 unless="dist.classes.jar.uptodate"> |
110 <delete file="${dist.classes.jar}"/> |
95 <delete file="${dist.classes.jar}"/> |
111 <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/> |
96 <jar file="${dist.classes.jar}" basedir="${build.classes.dir}"/> |
112 </target> |
97 </target> |
113 |
98 |
114 <target name="-build-setup" |
99 <!-- Special build area setup. --> |
115 depends="init, -init-src-dirs, -drop-build-setup"> |
100 <target name="-build-setup" depends="init"> |
|
101 <mkdir dir="${build.classes.dir}"/> |
|
102 <copy todir="${build.classes.dir}"> |
|
103 <fileset dir="${jaxp.src.dir}" |
|
104 includes="**/*.properties"/> |
|
105 </copy> |
|
106 <replaceregexp match="#(.*)$" replace="#" flags="gm"> |
|
107 <fileset dir="${build.classes.dir}" includes="**/*.properties"/> |
|
108 </replaceregexp> |
116 </target> |
109 </target> |
117 |
110 |
|
111 <!-- Create src.zip. --> |
|
112 <target name="-dist-src-zip" depends="init"> |
|
113 <zip file="${dist.src.zip}" basedir="${jaxp.src.dir}"/> |
|
114 </target> |
|
115 |
118 <!-- Build (compilation) of sources to class files. --> |
116 <!-- Build (compilation) of sources to class files. --> |
119 <target name="build" |
117 <target name="build" |
120 depends="compile, -build-setup"> |
118 depends="compile, -build-setup"> |
121 </target> |
119 </target> |
122 <target name="compile" |
120 <target name="compile" |
123 depends="init, -init-src-dirs"> |
121 depends="init"> |
124 <mkdir dir="${build.classes.dir}"/> |
122 <mkdir dir="${build.classes.dir}"/> |
125 <javac |
123 <javac |
126 includeAntRuntime="false" |
124 includeAntRuntime="false" |
127 classpath="${build.classes.dir}:${tools.jar}" |
125 classpath="${build.classes.dir}:${tools.jar}" |
128 fork="true" |
126 fork="true" |
138 </javac> |
136 </javac> |
139 </target> |
137 </target> |
140 |
138 |
141 <!-- Test. (FIXME: Need to know how to run tests.) --> |
139 <!-- Test. (FIXME: Need to know how to run tests.) --> |
142 <target name="test" |
140 <target name="test" |
143 depends="init, -init-src-dirs, dist"> |
141 depends="init, dist"> |
144 <echo message="FIXME: How do you run the tests"/> |
142 <echo message="FIXME: How do you run the tests"/> |
145 </target> |
143 </target> |
146 |
144 |
147 <!-- Populate source area if needed. --> |
145 <!-- Populate source area if needed. --> |
148 <target name="source" |
146 <target name="source" |
149 depends="init, -init-src-dirs" |
147 depends="init" |
150 description="Populate all source file directories"> |
148 description="Populate all source file directories"> |
151 </target> |
|
152 |
|
153 <!-- Populate drop_included area. --> |
|
154 <target name="drop_included" |
|
155 depends="clobber" |
|
156 description="Populate all source file directories"> |
|
157 <delete dir="${drop.included.dir}"/> |
|
158 <antcall target="source"/> |
|
159 <move file="${drop.expanded.dir}" tofile="${drop.included.dir}"/> |
|
160 <delete dir="${drop.included.dir}/bundles"/> |
|
161 </target> |
149 </target> |
162 |
150 |
163 <!-- Clean up compiled files. --> |
151 <!-- Clean up compiled files. --> |
164 <target name="clean" |
152 <target name="clean" |
165 description="Delete all generated files"> |
153 description="Delete all generated files"> |
169 |
157 |
170 <!-- Clean up compiled files and all imported source files. --> |
158 <!-- Clean up compiled files and all imported source files. --> |
171 <target name="clobber" |
159 <target name="clobber" |
172 depends="clean" |
160 depends="clean" |
173 description="Delete all generated files, including imported sources"> |
161 description="Delete all generated files, including imported sources"> |
174 <delete dir="${drop.expanded.dir}"/> |
|
175 </target> |
162 </target> |
176 |
163 |
177 <target name="-banner"> |
164 <target name="-banner"> |
178 <echo message="+---------------------------------------+"/> |
165 <echo message="+---------------------------------------+"/> |
179 <echo message="+ Starting ant project ${ant.project.name} +"/> |
166 <echo message="+ Starting ant project ${ant.project.name} +"/> |