summaryrefslogtreecommitdiff
path: root/src/build/msil.xml
diff options
context:
space:
mode:
authorjeberle <jeberle@epfl.ch>2008-05-06 09:49:37 +0000
committerjeberle <jeberle@epfl.ch>2008-05-06 09:49:37 +0000
commit3e47505f7ff50117d0aee441ab2a04efd1070dac (patch)
treed76ecc2012650264da8bee6ff85c90f62a6342d7 /src/build/msil.xml
parent2d2821504b7a325522d818d6dc3a41eab29269d7 (diff)
downloadscala-3e47505f7ff50117d0aee441ab2a04efd1070dac.tar.gz
scala-3e47505f7ff50117d0aee441ab2a04efd1070dac.tar.bz2
scala-3e47505f7ff50117d0aee441ab2a04efd1070dac.zip
in fact superSabbus uses msil.xml, not build-ms...
in fact superSabbus uses msil.xml, not build-msil.xml
Diffstat (limited to 'src/build/msil.xml')
-rw-r--r--src/build/msil.xml197
1 files changed, 197 insertions, 0 deletions
diff --git a/src/build/msil.xml b/src/build/msil.xml
new file mode 100644
index 0000000000..d90379a74a
--- /dev/null
+++ b/src/build/msil.xml
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="sabbus-msil">
+
+<description>
+ SuperSabbus extension for the MSIL library targeted for the dotnet framework. THIS FILE IS NOT STAND-ALONE AND SHOULD ONLY BE USED THROUGH ENTRY POINTS IN SUPERSABBUS.
+ </description>
+
+<!-- ===========================================================================
+PROPERTIES
+============================================================================ -->
+
+ <import file="build-jvm15.xml"/>
+
+ <property name="mono.dir" value="${src.dir}/mono"/>
+
+ <!-- Loads custom properties definitions -->
+ <property file="${src.dir}/build/msil.properties"/>
+
+ <!-- Sets location of build folders -->
+ <property name="build.dir" value="${basedir}/build"/>
+ <property name="msil.dir" value="${build.dir}/msil"/>
+ <property name="dist.dir" value="${basedir}/dists"/>
+
+<!-- ===========================================================================
+MSIL BUILD
+============================================================================ -->
+
+ <target name="msil.init" depends="init">
+ <!-- Sets ilasm command (either Microsoft .NET Framework or Mono) -->
+ <condition property="ilasm.cmd" value="${dotnet.home}/ilasm.exe">
+ <and>
+ <os family="windows"/><isset property="dotnet.home"/>
+ <available file="${dotnet.home}/ilasm.exe"/>
+ </and>
+ </condition>
+ <condition property="ilasm.cmd" value="${unix.mono.home}/ilasm">
+ <and>
+ <os family="unix"/><isset property="unix.mono.home"/>
+ <available file="${unix.mono.home}/ilasm"/>
+ </and>
+ </condition>
+ <condition property="ilasm.cmd" value="${win.mono.home}/ilasm">
+ <and>
+ <os family="windows"/><isset property="win.mono.home"/>
+ <available file="${win.mono.home}/lib/mono/2.0/ilasm.exe"/>
+ </and>
+ </condition>
+ <echo level="verbose" message="Found: ${ilasm.cmd}"/>
+ <condition property="ilasm.cmd" value="ilasm">
+ <and><available file="ilasm" filepath="${env.PATH}"/></and>
+ </condition>
+ <fail message="Command 'ilasm' not found">
+ <condition><not><isset property="ilasm.cmd"/></not></condition>
+ </fail>
+ <!-- Sets ilasm arguments (either Windows or Unix) -->
+ <property name="ilasm.outfile" value="${msil.dir}/lib/predef.dll"/>
+ <if>
+ <isset property="os.win"/>
+ <then>
+ <property
+ name="ilasm.args"
+ value="/quiet /dll /output=${ilasm.outfile}"
+ />
+ </then>
+ <else>
+ <property
+ name="ilasm.args"
+ value="/dll /output:${ilasm.outfile}"
+ />
+ </else>
+ </if>
+ <property file="${number.file}"/>
+ <property
+ name="version.number"
+ value="${version.major}.${version.minor}.${version.patch}.r${svn.number}-b${time.short}"/>
+ <echo level="verbose" message="${version.number}"/>
+ </target>
+
+ <target name="msil.sources" depends="msil.init">
+ <mkdir dir="${msil.dir}/src"/>
+ <copy todir="${msil.dir}/src">
+ <fileset dir="${src.dir}/dotnet-library" includes="**/*.scala, **/*.cs"/>
+ </copy>
+ <copy todir="${msil.dir}/src">
+ <fileset dir="${src.dir}/library" includes="**/*.scala"/>
+ </copy>
+ </target>
+
+ <target name="msil.libraries" depends="msil.sources">
+ <mkdir dir="${msil.dir}/lib"/>
+ <scalac srcdir="${msil.dir}/src" destdir="${msil.dir}" target="msil"
+ assemname="predef" assemrefs="${lib.dir}"
+ failonerror="false">
+ <include name="**/*.scala"/>
+ <exclude name="scala/ScalaObject.scala"/>
+ </scalac>
+ <pathconvert property="ilasm.infiles" pathsep=" ">
+ <fileset dir="${msil.dir}" includes="*.msil"/>
+ </pathconvert>
+ <echo>${ilasm.cmd} ${ilasm.infiles}</echo>
+ <exec executable="${ilasm.cmd} ${ilasm.infiles}" vmlauncher="no">
+ <arg line="${ilasm.args}"/>
+ </exec>
+ </target>
+
+ <target name="msil.build" depends="msil.libraries">
+ <copy todir="${msil.dir}/bin">
+ <fileset
+ dir="${mono.dir}/bin"
+ includes="scala-net*"
+ />
+ <filterset>
+ <filter token="VERSION" value="${version.number}"/>
+ <filter token="COPYRIGHT" value="${copyright.string}"/>
+ <filter token="NAME" value="Scala code runner"/>
+ </filterset>
+ </copy>
+ <copy todir="${msil.dir}/bin">
+ <fileset
+ dir="${mono.dir}/bin"
+ includes="scalac-net*"
+ />
+ <filterset>
+ <filter token="VERSION" value="${version.number}"/>
+ <filter token="COPYRIGHT" value="${copyright.string}"/>
+ <filter token="NAME" value="Scala compiler"/>
+ </filterset>
+ </copy>
+ <chmod perm="ugo+rx" dir="${msil.dir}/bin" includes="*-net*"/>
+ <if><isset property="os.win"/>
+ <then>
+ <copy todir="${quick.dir}/lib">
+ <fileset dir="${msil.dir}" includes="*.dll"/>
+ <fileset dir="${lib.dir}" includes="*.dll"/>
+ </copy>
+ </then>
+ <else>
+ <symlink
+ link="${quick.dir}/lib/predef.dll"
+ resource="${msil.dir}/predef.dll"
+ overwrite="yes" failonerror="no"/>
+ <symlink
+ link="${quick.dir}/lib/scalaruntime.dll"
+ resource="${lib.dir}/scalaruntime.dll"
+ overwrite="yes" failonerror="no"/>
+ <symlink
+ link="${quick.dir}/lib/mscorlib.dll"
+ resource="${lib.dir}/mscorlib.dll"
+ overwrite="yes" failonerror="no"/>
+ </else>
+ </if>
+ </target>
+
+ <!--<target name="msil.dist" depends="msil.build">
+ <antcall target="binaries"/>
+ <property name="dist.current.dir" value="${dist.dir}/scala-msil-${version.number}"/>
+ <mkdir dir="${dist.current.dir}"/>
+ <copy todir="${dist.current.dir}">
+ <fileset dir="${msil.dir}" includes="bin/**,lib/**"/>
+ </copy>
+ <chmod perm="ugo+rx" dir="${dist.current.dir}/bin" includes="*-net*"/>
+ <copy todir="${dist.current.dir}/lib">
+ <fileset dir="${lib.dir}" includes="*.dll"/>
+ </copy>
+ <copy todir="${dist.current.dir}/lib">
+ <fileset dir="${dist.dir}/latest/lib" includes="scala*.jar"/>
+ </copy>
+ <! Recreate the 'latest' link to point to this distribution
+ <if><isset property="os.win"/>
+ <then>
+ <copy todir="${dist.dir}/latest-msil">
+ <fileset dir="${dist.current.dir}"/>
+ </copy>
+ </then>
+ <else>
+ <symlink
+ link="${dist.dir}/latest-mono"
+ resource="${dist.current.dir}"
+ overwrite="yes" failonerror="no"/>
+ </else>
+ </if>
+ </target>-->
+
+<!-- ===========================================================================
+CLEAN
+============================================================================ -->
+
+ <target name="msil.clean" depends="ant-init">
+ <remove dir="${build.dir}/msil"/>
+ <delete includeemptydirs="true" quiet="yes" failonerror="no">
+ <fileset dir="@{dist.dir}" includes="**/scala-msil*"/>
+ </delete>
+ <delete file="${dist.dir}/latest-msil" quiet="yes" failonerror="no"/>
+ </target>
+
+</project>