[svn] r7542: nemerle/trunk: Nemerle.build ncc/ncc.build tools/nant-task/NantTask.build tools/nemerlish/nem...

pbludov svnadmin at nemerle.org
Mon Mar 19 10:41:00 CET 2007


Log:
nant script for compiler.

Author: pbludov
Date: Mon Mar 19 10:40:54 2007
New Revision: 7542

Added:
   nemerle/trunk/ncc/ncc.build
Modified:
   nemerle/trunk/Nemerle.build
   nemerle/trunk/tools/nant-task/NantTask.build
   nemerle/trunk/tools/nemerlish/nemerlish.build
   nemerle/trunk/tools/reflector-addon/reflector-addon.build

Modified: nemerle/trunk/Nemerle.build
==============================================================================
--- nemerle/trunk/Nemerle.build	(original)
+++ nemerle/trunk/Nemerle.build	Mon Mar 19 10:40:54 2007
@@ -83,6 +83,13 @@
   <property name="dir.top"  value="${path::get-full-path('.')}" />
   <property name="dir.boot" value="${path::get-full-path('boot')}" />
   <property name="dir.out"  value="&#36;{path::get-full-path(path::combine('bin', property::get-value('configuration')))}" />
+
+  <target name="clean">
+    <delete dir="${dir.out}" />
+  </target>
+
+  <target name="rebuild" depends="clean build"/>
+
 </project>]]>
     </echo>
 
@@ -92,12 +99,14 @@
     <fail message="Please run `nant configure' first." if="${not file::exists('Nemerle.include')}"/>
 
 	<nant buildfile="${path::combine('tools', 'tools.build')}" target="build"/>
+	<nant buildfile="${path::combine('ncc', 'ncc.build')}" target="build"/>
   </target>
 
   <target name="clean" description="Cleanup all.">
     <fail message="Please run `nant configure' first." if="${not file::exists('Nemerle.include')}"/>
 
 	<nant buildfile="${path::combine('tools', 'tools.build')}" target="clean"/>
+	<nant buildfile="${path::combine('ncc', 'ncc.build')}" target="clean"/>
   </target>
 
   <target name="rebuild" description="Rebuild all." depends="clean build"/>

Added: nemerle/trunk/ncc/ncc.build
==============================================================================
--- (empty file)
+++ nemerle/trunk/ncc/ncc.build	Mon Mar 19 10:40:54 2007
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="Nemerle.Compiler" default="build" xmlns="http://nant.sf.net/release/0.85-rc3/nant.xsd">
+  <description>
+    Copyright (c) 2003-2007 The University of Wroclaw.
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+       1. Redistributions of source code must retain the above copyright
+          notice, this list of conditions and the following disclaimer.
+       2. Redistributions in binary form must reproduce the above copyright
+          notice, this list of conditions and the following disclaimer in the
+          documentation and/or other materials provided with the distribution.
+       3. The name of the University may not be used to endorse or promote
+          products derived from this software without specific prior
+          written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY ``AS IS'' AND ANY EXPRESS OR
+    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+    NO EVENT SHALL THE UNIVERSITY BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+    TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+    
+    You must not remove this notice, or any other, from this software.
+
+  </description>
+
+  <include buildfile="../Nemerle.include" unless="${property::exists('dir.top')}" />
+
+  <target name="build.compiler">
+    <mkdir dir="${dir.out}" />
+    <ncc
+     output  ="${dir.out}/Nemerle.Compiler.dll" target="library"
+     define  ="${ncc.defines}"
+     debug   ="${ncc.debug}"
+     keyfile="${ncc.keyfile}"
+     >
+      <sources>
+		<include name="*.n" />
+		<include name="codedom\*.n" />
+		<include name="external\*.n" />
+		<include name="generation\*.n" />
+		<include name="hierarchy\*.n" />
+		<include name="misc\*.n" />
+		<include name="parsing\*.n" />
+		<include name="typing\*.n" />
+		<include name="completion\*.n" />
+      </sources>
+    </ncc>
+  </target>
+
+  <target name="build.ncc">
+    <mkdir dir="${dir.out}" />
+    <ncc
+     output  ="${dir.out}/ncc" target="exe"
+     define  ="${ncc.defines}"
+     debug   ="${ncc.debug}"
+     keyfile="${ncc.keyfile}"
+     >
+      <sources>
+        <include name="main.n" />
+      </sources>
+      <references basedir="${dir.boot}">
+        <include name="Nemerle.Compiler.dll" />
+      </references>
+    </ncc>
+  </target>
+
+  <target name="build" depends="build.compiler build.ncc"/>
+
+</project>

Modified: nemerle/trunk/tools/nant-task/NantTask.build
==============================================================================
--- nemerle/trunk/tools/nant-task/NantTask.build	(original)
+++ nemerle/trunk/tools/nant-task/NantTask.build	Mon Mar 19 10:40:54 2007
@@ -50,10 +50,4 @@
     </ncc>
   </target>
 
-  <target name="clean">
-    <delete dir="${dir.out}" />
-  </target>
-
-  <target name="rebuild" depends="clean build"/>
-
 </project>

Modified: nemerle/trunk/tools/nemerlish/nemerlish.build
==============================================================================
--- nemerle/trunk/tools/nemerlish/nemerlish.build	(original)
+++ nemerle/trunk/tools/nemerlish/nemerlish.build	Mon Mar 19 10:40:54 2007
@@ -8,9 +8,10 @@
     <include buildfile="../../Nemerle.include" unless="${property::exists('dir.top')}" />
 
     <target name="build.eval">
-        <ncc output="Nemerle.Evaluation.dll" target="dll">
-			<references>
-                <include name="${path::combine(property::get-value('dir.boot'), 'Nemerle.Compiler.dll')}" />
+	    <mkdir dir="${dir.out}" />
+        <ncc output="${dir.out}/Nemerle.Evaluation.dll" target="library">
+			<references basedir="${dir.boot}">
+                <include name="Nemerle.Compiler.dll" />
 			</references>
 			<sources>
 				<include name="eval.n" />
@@ -19,9 +20,13 @@
     </target>
 
     <target name="build.nemish" depends="build.eval">
-        <ncc output="nemish.exe" target="exe">
-			<references>
-                <include name="${path::combine(property::get-value('dir.boot'), 'Nemerle.Compiler.dll')}" />
+	    <mkdir dir="${dir.out}" />
+        <ncc output="${dir.out}/nemish.exe" target="exe">
+			<references basedir="${dir.boot}">
+				<lib>
+	    	        <include name="${dir.out}" />
+		        </lib>
+                <include name="Nemerle.Compiler.dll" />
                 <include name="Nemerle.Evaluation.dll" />
 			</references>
 			<sources>
@@ -30,19 +35,9 @@
 				<include name="readline.n" />
 			</sources>
 		</ncc>
-    </target>
-
-    <target name="clean">
-		<delete>
-			<fileset>
-				<include name="*.dll" />
-				<include name="*.exe" />
-			</fileset>
-		</delete>
+	    <copy file="nemish.exe.config" todir="${dir.out}" />
     </target>
 
     <target name="build" depends="build.eval build.nemish"/>
 
-    <target name="rebuild" depends="clean build"/>
-
 </project>

Modified: nemerle/trunk/tools/reflector-addon/reflector-addon.build
==============================================================================
--- nemerle/trunk/tools/reflector-addon/reflector-addon.build	(original)
+++ nemerle/trunk/tools/reflector-addon/reflector-addon.build	Mon Mar 19 10:40:54 2007
@@ -45,8 +45,8 @@
      debug  ="${ncc.debug}"
      keyfile="${ncc.keyfile}"
      >
-      <references>
-        <include name="${dir.lib}/Reflector.exe" />
+      <references basedir="${dir.lib}">
+        <include name="Reflector.exe" />
         <include name="System.Windows.Forms.dll" />
       </references>
       <sources basedir="src">
@@ -57,14 +57,8 @@
   </target>
 
   <target name="run" depends="build">
-    <copy file="${dir.boot}/Nemerle.dll" tofile="${dir.lib}/Nemerle.dll" />
+    <copy file="${dir.boot}/Nemerle.dll" todir="${dir.lib}" />
     <exec program="Reflector.exe" workingdir="${dir.lib}" basedir="${dir.lib}" />
   </target>
 
-  <target name="clean">
-    <delete dir="${dir.out}" />
-  </target>
-
-  <target name="rebuild" depends="clean build"/>
-
 </project>



More information about the svn mailing list