1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 ~ Copyright (c) 2007, 2020, Oracle and/or its affiliates. All rights reserved.
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. Oracle designates this
9 ~ particular file as subject to the "Classpath" exception as provided
10 ~ by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 ~ or visit www.oracle.com if you need additional information or have any
178
179 <target name="-prepare-build" depends="-check-langtools.jdk.home">
180 <mkdir dir="${build.modules}"/>
181 <mkdir dir="${build.tools}"/>
182 <mkdir dir="${build.gensrc}"/>
183 <mkdir dir="${build.bin}"/>
184 <mkdir dir="${build.prevsrc}"/>
185 </target>
186
187 <target name="generate-sources-internal">
188 <basename property="module.name" file="${basedir}"/>
189 <mkdir dir="${build.gensrc}/${module.name}"/>
190 <pparse destdir="${build.gensrc}/${module.name}" includes="${langtools.resource.includes}">
191 <src path="./share/classes"/>
192 </pparse>
193 <pcompile destdir="${build.gensrc}/${module.name}" includes="**/*.properties">
194 <src path="./share/classes"/>
195 </pcompile>
196 </target>
197
198 <target name="generate-sources" depends="-prepare-build,-def-pparse,-def-pcompile">
199 <subant inheritall="true" target="generate-sources-internal" genericantfile="${make.dir}/build.xml">
200 <dirset refid="src.module.dirset"/>
201 </subant>
202 </target>
203
204 <target name="build-all-classes" depends="generate-sources">
205 <pathconvert property="xpatch.src.rest" pathsep=" --patch-module=" refid="src.module.dirset">
206 <regexpmapper from="^.*(/|\\)([^/\\]*)$" to="\2=${src.dir}\1\2/share/classes${path.separator}${build.gensrc}\1\2" />
207 </pathconvert>
208 <property name="xpatch.src.cmd" value="--patch-module=${xpatch.src.rest}"/>
209 <pathconvert pathsep="," property="gensrc.module.dirs">
210 <dirset dir="${build.gensrc}" includes="${module.names}"/>
211 </pathconvert>
212 <multirootfileset id="source.fileset" basedirs="${src.module.dirs},${gensrc.module.dirs}">
213 <include name="**/*.java"/>
214 <different targetdir="${build.prevsrc}" ignoreFileTimes="true"/>
215 </multirootfileset>
216 <pathconvert pathsep=" " property="source.files" refid="source.fileset"/>
217 <echo file="${build.dir}/sources.txt">${source.files}</echo>
218 <exec executable="${langtools.jdk.home}/bin/javac" failonerror="true">
|
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 ~ Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
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. Oracle designates this
9 ~ particular file as subject to the "Classpath" exception as provided
10 ~ by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23 ~ or visit www.oracle.com if you need additional information or have any
178
179 <target name="-prepare-build" depends="-check-langtools.jdk.home">
180 <mkdir dir="${build.modules}"/>
181 <mkdir dir="${build.tools}"/>
182 <mkdir dir="${build.gensrc}"/>
183 <mkdir dir="${build.bin}"/>
184 <mkdir dir="${build.prevsrc}"/>
185 </target>
186
187 <target name="generate-sources-internal">
188 <basename property="module.name" file="${basedir}"/>
189 <mkdir dir="${build.gensrc}/${module.name}"/>
190 <pparse destdir="${build.gensrc}/${module.name}" includes="${langtools.resource.includes}">
191 <src path="./share/classes"/>
192 </pparse>
193 <pcompile destdir="${build.gensrc}/${module.name}" includes="**/*.properties">
194 <src path="./share/classes"/>
195 </pcompile>
196 </target>
197
198 <target name="copy-cr-sources">
199 <exec executable="/bin/bash">
200 <arg value="cr-util/copy-to-compiler.sh"/>
201 <arg value="src/java.base/share/classes"/>
202 <arg value="${build.gensrc}/jdk.compiler"/>
203 </exec>
204 </target>
205
206 <target name="generate-sources" depends="copy-cr-sources,-prepare-build,-def-pparse,-def-pcompile">
207 <subant inheritall="true" target="generate-sources-internal" genericantfile="${make.dir}/build.xml">
208 <dirset refid="src.module.dirset"/>
209 </subant>
210 </target>
211
212 <target name="build-all-classes" depends="generate-sources">
213 <pathconvert property="xpatch.src.rest" pathsep=" --patch-module=" refid="src.module.dirset">
214 <regexpmapper from="^.*(/|\\)([^/\\]*)$" to="\2=${src.dir}\1\2/share/classes${path.separator}${build.gensrc}\1\2" />
215 </pathconvert>
216 <property name="xpatch.src.cmd" value="--patch-module=${xpatch.src.rest}"/>
217 <pathconvert pathsep="," property="gensrc.module.dirs">
218 <dirset dir="${build.gensrc}" includes="${module.names}"/>
219 </pathconvert>
220 <multirootfileset id="source.fileset" basedirs="${src.module.dirs},${gensrc.module.dirs}">
221 <include name="**/*.java"/>
222 <different targetdir="${build.prevsrc}" ignoreFileTimes="true"/>
223 </multirootfileset>
224 <pathconvert pathsep=" " property="source.files" refid="source.fileset"/>
225 <echo file="${build.dir}/sources.txt">${source.files}</echo>
226 <exec executable="${langtools.jdk.home}/bin/javac" failonerror="true">
|