[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Mono-list] Re: [DotGNU]C# compiler command line parsing
From: |
Bob Smith |
Subject: |
Re: [Mono-list] Re: [DotGNU]C# compiler command line parsing |
Date: |
Thu, 28 Mar 2002 17:33:26 -0500 (EST) |
One problem you are not considering though is those people who program for
Microsoft's .Net and release source. They wont compile on Portable.NET
without rewriting the build scripts. Yes, I dont like the idea of using /
for a comand line switch, but its better then hand rewriting scripts from
the other side.
On Thu, 28 Mar 2002, Rhys Weatherley wrote:
> Fergus Henderson wrote:
>
> > One way to do this would be to just add support for Microsoft's
> > command-line interface to the .NET and Mono C# compilers. Another way
> > to do it would be to define a Unix-like command-line syntax, and write
> > a wrapper for Microsoft's csc that would convert the Unix-like syntax
> > into Microsoft's syntax and then invoke csc. Software written in C#
> > could ship with this wrapper program included.
>
> Portable.NET's C# compiler already uses the gcc syntax.
> Attached is a script I wrote to wrap up "csc" and give it
> the same gcc-like syntax, so as to improve interoperability.
>
> Microsoft's syntax does not fit into a Unix environment very
> well, because it uses '/' as a switch character. I don't see
> why we should dumb down our compilers, when a shell script
> can be used to smarten up Microsoft's.
>
> The only drawback with the script is that it only works in
> Cygwin and Unix environments. It doesn't work at the
> raw Windows command prompt. That could be easily fixed
> by re-implementing the script in C or C#.
>
> As another option, Portable.NET's "csant" tool, which is
> a C-only variant of NAnt, supports csc, mcs, and cscc
> syntax transparently. The XML file describes what needs
> to be compiled, and "csant" converts it into the correct
> conventions depending upon which compiler has been
> configured. Environment variables or command-line
> options are used to specify which compiler to use.
>
> Cheers,
>
> Rhys.
>
>