[m-rev.] for review: csharp.ssdebug and readme

Peter Wang novalazy at gmail.com
Tue Oct 26 16:01:04 AEDT 2010


On 2010-10-25, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> 
> Hi Peter,
> 
> On Mon, 25 Oct 2010, Peter Wang wrote:
> 
> >Branches: main
> >
> >Make it possible to install and use the csharp.ssdebug grade.
> >
> >Mmake.workspace:
> >       Never try to link with `mer_rt' in C# grades.
> >
> >browser/Mmakefile:
> >mdbcomp/Mmakefile:
> >ssdb/Mmakefile:
> >       Use `mmc --make' to install these libraries in `csharp' grades.
> >
> >       Don't add C libraries to MLLIBS in non-C or asm grades.
> >
> >browser/Mercury.options:
> >ssdb/Mercury.options:
> >       "EXTRA_LIBRARIES-libname" doesn't actually work with `mmc --make',
> >       but "LIBRARIES-name" does.
> 
> Bug or feature?

I would say bug.  I have looked through the CVS history and it has been
so since the initial implementation.

> Either way, please check that this change doesn't break things.
> (Acutally, why does it not affect the Java and Erlang grades?)

Erlang: those libraries are never built in erlang grades

Java: was done by setting --java-classpath in the FLAGS files;
    --mercury-library is ignored (another bug)

More mysterious is the effect on C grades, since that line apparently
never worked.

> (Is there a --enable-csharp-grade option along the lines of the
> --enable-java-grade, --enable-erlang-grade options?)

Added now.

> >+and may be removed in the future.
> >
> >+PREREQUISITES
> >+
> >+In order to try this system you will need
> >+
> >+        - Either Microsoft.NET or Mono 2.8 or above.
> >+
> >+	- The Mercury distribution -- installed as usual.
> > You can install
> >+	  from either the source or binary distribution.
> 
> I know this is cut-and-paste from README.{Java,Erlang}, but what does
> that mean?  Do I need Mercury already installed before I can install
> the csharp grade -- I shouldn't since I should just be able to use
> the srcdist and specify csharp as one of the grades.

Deleted from all files.

Committed with these further changes.

Peter

diff --git a/.INSTALL.in b/.INSTALL.in
index 0593442..878c9f8 100755
--- a/.INSTALL.in
+++ b/.INSTALL.in
@@ -148,6 +148,9 @@ make install
 #          of the .NET grades (see README.DotNet).  This grades are only
 #          installed if the .NET SDK is found.
 #
+#          The option --enable-csharp-grade causes the installation of the C#
+#          grade.  This grade is only installed if a C# compiler is found.
+#
 #          The option --enable-java-grade causes the installation of the Java
 #          grade.  This grade is only installed if the Java SDK is found.
 #
@@ -156,8 +159,8 @@ make install
 #          found.
 #
 #          The option --enable-ssdebug-grades adds source-to-source debugging
-#          grades hlc.gc.ssdebug and java.ssdebug, if hlc.gc or java grades
-#          are also present.
+#          grades hlc.gc.ssdebug, csharp.ssdebug and java.ssdebug, if hlc.gc,
+#          csharp or java grades are also present.
 #
 #          The option --disable-dynamic-link prevents the installation of shared
 #          libraries, even if they are supported on this system.
diff --git a/README.CSharp b/README.CSharp
index 4fd3702..11b2bfc 100644
--- a/README.CSharp
+++ b/README.CSharp
@@ -5,7 +5,7 @@ INTRODUCTION
 This release of Mercury contains a port to the ECMA Common Language
 Infrastructure (CLI), i.e. Microsoft .NET or Mono.  The Mercury
 compiler will generate C# source code that can be compiled into
-bytecode suitable for running in the .NET or Mono runtime systems.
+bytecode suitable for running on the .NET or Mono runtime systems.
 
 The port is mostly complete, but some parts of the Mercury standard
 library are not yet implemented (for a full list see the FAQ below).
@@ -13,8 +13,8 @@ library are not yet implemented (for a full list see the FAQ below).
 The port is currently targeted at C# 2.0 or higher.
 
 NOTE: a previous backend also targetted the .NET runtime, by generating IL
-(Intermediate Language), rather going via C#.  That backend is out-of-date
-and may be removed in the future.
+(Intermediate Language), rather than going via C#.  That backend is
+out-of-date and may be removed in the future.
 
 PREREQUISITES
 
@@ -22,13 +22,6 @@ In order to try this system you will need
 
         - Either Microsoft.NET or Mono 2.8 or above.
 
-	- The Mercury distribution -- installed as usual.  You can install
-	  from either the source or binary distribution.
-
-	  If you're reading this file from somewhere other than the
-	  Mercury distribution, try the Mercury homepage at
-		<http://www.mercury.csse.unimelb.edu.au>
-
 WARNING
 
 Please note that the C# backend is still an experimental feature.
diff --git a/README.DotNet b/README.DotNet
index 42ecbb5..784c080 100644
--- a/README.DotNet
+++ b/README.DotNet
@@ -3,7 +3,7 @@
 WARNING
 
 The .NET backend described herein is out-of-date and may be removed in
-the future.  See README.CSharp about a newer backend that targets C#.
+the future.  See README.Charp for details of a newer backend that targets .NET.
 
 INTRODUCTION
 
diff --git a/README.Erlang b/README.Erlang
index 5a86d71..c52394d 100644
--- a/README.Erlang
+++ b/README.Erlang
@@ -19,16 +19,6 @@ In order to try this system you will need
           downloaded from
                 <http://www.erlang.org/download.html>
 
-        - The Mercury source distribution.  See below for installation
-          instructions.
-
-          If you're reading this file from somewhere other than the
-          Mercury distribution, try the Mercury homepage at
-                <http://www.mercury.csse.unimelb.edu.au>
-
-        - An installed Mercury compiler.  You must use `mmc --make' to
-          install the standard library for Erlang.  See below.
-
         - A Unix-like environment.  The Erlang support has not been
           tested on Windows, but you will need a shell script
           interpreter.
diff --git a/README.Java b/README.Java
index b87bf41..83dae4b 100644
--- a/README.Java
+++ b/README.Java
@@ -21,13 +21,6 @@ In order to try this system you will need
 
 	  OR any other compatible Java implementation.
 
-	- The Mercury distribution -- installed as usual.  You can install
-	  from either the source or binary distribution.
-
-	  If you're reading this file from somewhere other than the
-	  Mercury distribution, try the Mercury homepage at
-	  	<http://www.mercury.csse.unimelb.edu.au>
-
 WARNING
 
 Please note that the Java backend is still an experimental feature.
diff --git a/configure.in b/configure.in
index f93e59a..c48c9ac 100644
--- a/configure.in
+++ b/configure.in
@@ -3317,6 +3317,11 @@ AC_ARG_ENABLE(dotnet-grades,
     AC_HELP_STRING([--enable-dotnet-grades], [install the .NET grades]),
     enable_dotnet_grades="$enableval",enable_dotnet_grades=no)
 
+# We don't enable the csharp grade by default.
+AC_ARG_ENABLE(csharp-grade,
+   AC_HELP_STRING([--enable-csharp-grade], [install the C# grade]),
+   enable_csharp_grade="$enableval",enable_csharp_grade=no)
+
 # We don't enable the java grade by default.
 AC_ARG_ENABLE(java-grade,
    AC_HELP_STRING([--enable-java-grade], [install the Java grade]),
@@ -3350,6 +3355,7 @@ if test "$enable_most_grades" = no; then
     enable_par_grades=no
     enable_stseg_grades=no
     enable_dotnet_grades=no
+    enable_csharp_grade=no
     enable_java_grade=no
     enable_erlang_grade=no
 fi
@@ -3573,6 +3579,12 @@ then
     LIBGRADES="$LIBGRADES il"
 fi
 
+# Add C# back-end grade, if a C# compiler is installed.
+if test "$CSC" != "" -a "$enable_csharp_grade" = yes
+then
+    LIBGRADES="$LIBGRADES csharp"
+fi
+
 # Add Java back-end grade, if Java is installed.
 if test $mercury_cv_java = yes -a "$enable_java_grade" = yes
 then

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list