1.1 --- a/build.xml Wed Jun 17 15:11:07 2009 +0200
1.2 +++ b/build.xml Thu Jun 18 17:48:58 2009 +0200
1.3 @@ -8,11 +8,27 @@
1.4 <antcall target="applet"/>
1.5 <antcall target="deprecated7"/>
1.6 </target>
1.7 +
1.8 <!-- basic parameters -->
1.9 + <pathconvert property="gensrc">
1.10 + <path><dirset dir="../build"><include name="*/gensrc"/></dirset></path>
1.11 + </pathconvert>
1.12 + <pathconvert property="javacompiler">
1.13 + <path><dirset dir="../build"><include name="*/langtools/build/classes"/></dirset></path>
1.14 + </pathconvert>
1.15 + <fail message="You need to provide location of JDK's generated sources via -Dgensrc=...">
1.16 + <condition><not><available file="${gensrc}"/></not></condition>
1.17 + </fail>
1.18 + <fail message="Javacompiler build is missing">
1.19 + <condition><not><available file="${javacompiler}"/></not></condition>
1.20 + </fail>
1.21 <path id="src.path">
1.22 <pathelement location="src/share/classes"/>
1.23 + <pathelement location="${gensrc}"/>
1.24 <pathelement location="src/windows/classes"/>
1.25 + <!--
1.26 <pathelement location="src/solaris/classes"/>
1.27 + -->
1.28 </path>
1.29 <property name="build.dir" location="build/modularize"/>
1.30
1.31 @@ -47,19 +63,36 @@
1.32 </or>
1.33 </selector>
1.34
1.35 - <selector id="corba">
1.36 - <or>
1.37 - <filename name="org/omg/**"/>
1.38 - <filename name="com/sun/corba/**"/>
1.39 - </or>
1.40 - </selector>
1.41 -
1.42 <selector id="base">
1.43 - <none>
1.44 + <!--
1.45 <selector refid="applet"/>
1.46 <selector refid="beans"/>
1.47 - <selector refid="corba"/>
1.48 + <selector refid="client"/>
1.49 + <selector refid="enterprise"/>
1.50 <selector refid="deprecated7"/>
1.51 + -->
1.52 + <!-- exclude files that need pre-processing like
1.53 + java/nio/ByteBufferAs-X-Buffer.java
1.54 + -->
1.55 +
1.56 + <none>
1.57 + <filename name="**/*-*"/>
1.58 + <filename name="java/dyn/**"/>
1.59 + <filename name="sun/dyn/**"/>
1.60 + <filename name="javax/management/remote/rmi/RMIConnector*"/>
1.61 + <filename name="sun/tracing/**"/>
1.62 + <filename name="com/sun/tracing/**"/>
1.63 + <filename name="com/sun/java/swing/plaf/gtk/**"/>
1.64 +
1.65 +<!-- <filename name="javax/management/**"/> -->
1.66 +<!-- <filename name="sun/nio/fs/**"/> -->
1.67 +<!-- <filename name="com/sun/jmx/**"/> -->
1.68 +
1.69 + <!-- exclude corba related stuff -->
1.70 + <filename name="com/sun/jndi/cosnaming/**"/>
1.71 + <filename name="com/sun/jndi/toolkit/corba/**"/>
1.72 +
1.73 + <filename name="com/sun/script/javascript/**"/>
1.74 </none>
1.75 </selector>
1.76
1.77 @@ -82,25 +115,12 @@
1.78 <param name="module" value="beans"/>
1.79 </antcall>
1.80 </target>
1.81 -
1.82
1.83 - <!-- as I am currently unable to build JDK myself, I'll start
1.84 - the modularization by extracting the base module from an existing
1.85 - classes
1.86 - -->
1.87 +
1.88 <target name="base">
1.89 - <property name="rt.jar" location="${java.home}/lib/rt.jar"/>
1.90 - <fail message="Cannot find rt.jar, specify with -Drt.jar=...">
1.91 - <condition><not><available file="${rt.jar}"/></not></condition>
1.92 - </fail>
1.93 -
1.94 - <mkdir dir="${build.dir}/rt"/>
1.95 - <unzip src="${rt.jar}" dest="${build.dir}/rt"/>
1.96 - <jar file="${build.dir}/base.jar" compress="false">
1.97 - <fileset dir="${build.dir}/rt">
1.98 - <selector refid="base"/>
1.99 - </fileset>
1.100 - </jar>
1.101 + <antcall target="-compile-one-module">
1.102 + <param name="module" value="base"/>
1.103 + </antcall>
1.104 </target>
1.105
1.106 <!-- shared routine to compile one of the modules -->
1.107 @@ -114,10 +134,13 @@
1.108 bootclasspath="${build.dir}/base.jar"
1.109 sourcepath=""
1.110 destdir="${build.dir}/classes/${module}"
1.111 - classpath="${module.cp}"
1.112 includejavaruntime="false"
1.113 includeantruntime="false"
1.114 >
1.115 + <classpath>
1.116 + <path path="${module.cp}"/>
1.117 + <pathelement location="${javacompiler}"/>
1.118 + </classpath>
1.119 <src refid="src.path"/>
1.120 <selector refid="${module}"/>
1.121 </javac>