ikvm-fork/openjdk/openjdk.build

147 строки
8.3 KiB
XML

<?xml version="1.0"?>
<project name="ClassLibrary" default="all">
<property name="pathsep" value=":" />
<property overwrite="false" name="signoption" value="" />
<property name="OpenJDK.dir" value="${project::get-base-directory()}/../../openjdk6-b16" />
<if test="${platform::is-win32()}">
<property name="pathsep" value=";" />
</if>
<target name="all" depends="classes rmi vfs resources core">
</target>
<target name="classes">
<delete>
<fileset basedir="../classpath">
<include name="**.class"/>
</fileset>
</delete>
<delete>
<fileset basedir="${OpenJDK.dir}">
<include name="**.class"/>
</fileset>
</delete>
<delete>
<fileset basedir=".">
<include name="**.class"/>
</fileset>
</delete>
<property name="IKVM.Runtime" value="IKVM.Runtime" />
<if test="${signoption != ''}">
<loadfile file="../tools/pubkey.txt" property="publickey" />
<property name="IKVM.Runtime" value="IKVM.Runtime, PublicKey=${publickey}" />
</if>
<copy file="AssemblyInfo.java.in" tofile="AssemblyInfo.java" outputencoding="ascii" overwrite="true">
<filterchain>
<replacetokens>
<token key="RUNTIME" value="${IKVM.Runtime}" />
</replacetokens>
</filterchain>
</copy>
<copy file="Configuration.java.in" tofile="Configuration.java" outputencoding="ascii" overwrite="true">
<filterchain>
<replacetokens>
<token key="AWTASSEMBLY" value="${string::replace(assemblyname::get-full-name(assemblyname::get-assembly-name(path::combine(project::get-base-directory(), '../bin/IKVM.Runtime.dll'))), 'IKVM.Runtime', 'IKVM.AWT.WinForms')}" />
</replacetokens>
</filterchain>
</copy>
<exec program="javac" commandline="-J-Xmx1536M -g -nowarn -bootclasspath ../classpath/mscorlib.jar${pathsep}../classpath/System.jar${pathsep}../classpath/System.Core.jar${pathsep}../classpath/System.Data.jar${pathsep}../classpath/System.Drawing.jar${pathsep}../classpath/IKVM.Runtime.jar @allsources.lst" useruntimeengine="false" />
</target>
<target name="rmi">
<property name="VMARGS" value="-J-client -J-Xmx896m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m" />
<property name="CLASSPATH" value="${OpenJDK.dir}/jdk/src/share/classes/${pathsep}${OpenJDK.dir}/build/linux-amd64/impsrc/${pathsep}." />
<property name="OUTPUT" value="${OpenJDK.dir}/build/linux-amd64/classes/" />
<property name="ARGS" value="${VMARGS} -bootclasspath ${CLASSPATH} -d ${OUTPUT}" />
<exec program="rmic" commandline="${ARGS} -v1.1 sun.rmi.registry.RegistryImpl" />
<exec program="rmic" commandline="${ARGS} -v1.1 sun.rmi.transport.DGCImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 sun.rmi.server.Activation$ActivationSystemImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 java.rmi.activation.ActivationGroup" />
<exec program="rmic" commandline="${ARGS} -v1.2 com.sun.jndi.rmi.registry.ReferenceWrapper" />
<exec program="rmic" commandline="${ARGS} -v1.2 javax.management.remote.rmi.RMIConnectionImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 -iiop javax.management.remote.rmi.RMIConnectionImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 -iiop -standardPackage javax.management.remote.rmi.RMIConnectionImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 javax.management.remote.rmi.RMIServerImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 -iiop javax.management.remote.rmi.RMIServerImpl" />
<exec program="rmic" commandline="${ARGS} -v1.2 -iiop -standardPackage javax.management.remote.rmi.RMIServerImpl" />
<exec program="rmic" commandline="${ARGS} -iiop javax.management.remote.rmi.RMIConnection" />
<exec program="rmic" commandline="${ARGS} -iiop -standardPackage javax.management.remote.rmi.RMIConnection" />
<exec program="rmic" commandline="${ARGS} -iiop javax.management.remote.rmi.RMIServer" />
<exec program="rmic" commandline="${ARGS} -iiop -standardPackage javax.management.remote.rmi.RMIServer" />
</target>
<target name="vfs">
<!-- This file is generated here, but it is added as a resource to IKVM.Runtime.dll, because Ref.Emit on .NET 1.1 doesn't support adding a raw resource. -->
<zip zipfile="vfs.zip">
<fileset basedir="${OpenJDK.dir}/build/linux-amd64/j2re-image">
<include name="lib/cmm/*" />
<include name="lib/zi/**/*" />
<include name="lib/currency.data" />
<include name="lib/logging.properties" />
<include name="lib/security/java.policy" />
<include name="lib/security/java.security" />
<include name="lib/security/local_policy.jar" />
<include name="lib/security/US_export_policy.jar" />
</fileset>
<fileset basedir="${OpenJDK.dir}/jdk/src/windows">
<include name="lib/flavormap.properties" />
<include name="lib/content-types.properties" />
</fileset>
</zip>
</target>
<target name="resources">
<!-- resources that are not in ../../openjdk6-b16/build/linux-amd64/j2re-image/lib/resources.jar -->
<zip zipfile="resources.zip">
<fileset basedir="${OpenJDK.dir}/jdk/src/share/classes">
<include name="com/sun/swing/internal/plaf/**/*" />
</fileset>
</zip>
</target>
<target name="core">
<property name="VERSION" value="${assemblyname::get-version(assemblyname::get-assembly-name(path::combine(project::get-base-directory(), '../bin/IKVM.Runtime.dll')))}" />
<exec program="${project::get-base-directory()}/../bin/ikvmc.exe" useruntimeengine="true">
<arg value="-version:${VERSION}" />
<arg value="${signoption}" />
<arg value="-compressresources" />
<arg value="-opt:fields" />
<arg value="-strictfinalfieldsemantics" />
<arg value="-removeassertions" />
<arg value="-target:library" />
<arg value="-sharedclassloader" />
<arg value="-r:mscorlib" />
<arg value="-r:IKVM.Runtime" />
<!-- Instead of using -r:System.Core we add System.Core.jar (in response.txt)
(containing only System.Runtime.CompilerServices.ExtensionAttribute).
This allows compilation to succeed (though with warnings) when System.Core.dll is not available.
It also prevents accidentally taking additional dependencies on System.Core.dll.
-->
<arg value="-r:${framework::get-assembly-directory(framework::get-target-framework())}/System.dll" />
<!-- we already know that the JNI assembly is not available, so suppress the warning -->
<arg value="-nowarn:110" />
<arg value="@response.txt" />
</exec>
<if test="${platform::is-win32()}">
<copy file="../bin/IKVM.Runtime.dll" tofile="IKVM.Runtime.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Charsets.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Corba.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Core.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Jdbc.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Management.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Misc.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Security.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.SwingAWT.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Text.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.Util.dll" />
<exec program="peverify" commandline="-nologo IKVM.OpenJDK.XML.dll" />
</if>
<copy todir="../bin">
<fileset basedir=".">
<include name="IKVM.OpenJDK.*.dll" />
</fileset>
</copy>
</target>
</project>