Author: jbevain
Date: 2006-11-25 05:54:38 -0500 (Sat, 25 Nov 2006)
New Revision: 68457

Added:
   trunk/cecil/flowanalysis/Cecil.FlowAnalysis/CompactFrameworkCompatibility.cs
Modified:
   trunk/cecil/flowanalysis/default.build
Log:
update nant file for compactframework build

Added: 
trunk/cecil/flowanalysis/Cecil.FlowAnalysis/CompactFrameworkCompatibility.cs
===================================================================
--- 
trunk/cecil/flowanalysis/Cecil.FlowAnalysis/CompactFrameworkCompatibility.cs    
    2006-11-25 10:43:05 UTC (rev 68456)
+++ 
trunk/cecil/flowanalysis/Cecil.FlowAnalysis/CompactFrameworkCompatibility.cs    
    2006-11-25 10:54:38 UTC (rev 68457)
@@ -0,0 +1,42 @@
+//
+// FrameworkCompatibility.cs
+//
+// Author:
+//   Rodrigo B. de Oliveira ([EMAIL PROTECTED])
+//
+// (C) 2005 Jb Evain
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+#if CF_1_0
+namespace System {
+
+       class NotImplementedException : System.Exception {
+
+               public NotImplementedException (string message) : base (message)
+               {
+               }
+
+               public NotImplementedException ()
+               {
+               }
+       }
+}
+#endif

Modified: trunk/cecil/flowanalysis/default.build
===================================================================
--- trunk/cecil/flowanalysis/default.build      2006-11-25 10:43:05 UTC (rev 
68456)
+++ trunk/cecil/flowanalysis/default.build      2006-11-25 10:54:38 UTC (rev 
68457)
@@ -3,11 +3,15 @@
 
        <include buildfile="nunit.inc" />
 
+       <!-- allow properties to be customized in external file" -->
+       <include buildfile="build.properties" 
if="${file::exists('build.properties')}" />
+
        <property name="Mono.Cecil.dll" value="../lib/bin/Mono.Cecil.dll" />
        <property name="build.dir" value="bin" />
        <property name="booi" value="booi" />
        <property name="optimize" value="false" />
        <property name="debug" value="true" />
+       <property name="keyfile" value="../../mcs/class/mono.snk" />
 
        <target name="test" depends="build">
                <nunit2>
@@ -33,7 +37,8 @@
                        target="library"
                        output="${build.dir}/Cecil.FlowAnalysis.dll"
                        debug="${debug}"
-                       optimize="${optimize}">
+                       optimize="${optimize}"
+                       keyfile="${keyfile}">
                        <sources basedir="Cecil.FlowAnalysis">
                                <include name="**/*.cs" />
                        </sources>
@@ -88,4 +93,34 @@
                <delete dir="${build.dir}" if="${directory::exists(build.dir)}" 
/>
        </target>
 
+       <target name="compactframework" depends="init" description="compiles 
cecil to run on the CompactFramework 1.0">
+               <property name="compactframework.defines" value="CF_1_0" />
+               <property name="compactframework.dir" 
value="${compactframework.v1.dir}" />
+               <call target="compactframework-compilation" />
+       </target>
+
+       <target name="compactframework2" depends="init" description="compiles 
cecil to run on the CompactFramework 2.0">
+               <property name="compactframework.defines" value="CF_2_0" />
+               <property name="compactframework.dir" 
value="${compactframework.v2.dir}" />
+               <call target="compactframework-compilation" />
+       </target>
+
+       <target name="compactframework-compilation">
+               <csc output="${build.dir}/Cecil.FlowAnalysis.dll"
+                       target="library" debug="${debug}" unsafe="false" 
optimize="${optimize}"
+                       noconfig="true" nostdlib="true" keyfile="${keyfile}"
+                       define="${compactframework.defines}">
+                       />
+                       <sources basedir="Cecil.FlowAnalysis">
+                               <include name="**/*.cs" />
+                       </sources>
+
+                       <references>
+                               <include 
name="${compactframework.dir}/mscorlib.dll" />
+                               <include 
name="${compactframework.dir}/System.dll" />
+                               <include name="${build.dir}/Mono.Cecil.dll" />
+                       </references>
+               </csc>
+       </target>
+
 </project>

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to