Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2009-05-02 10:05:19 +0400
committerMiguel de Icaza <miguel@gnome.org>2009-05-02 10:05:19 +0400
commit48c9b30498d8153f5b0473152fccbc7a6bb6e5b2 (patch)
treeb66e4e6f0f6f4c6b6648d7fbc5b8f8bf93d6646b /msvc/scripts/prepare.cs
parent87790c766f81d0260ef2c600aedca3be86b6dbc2 (diff)
More generated files
svn path=/trunk/mono/; revision=133373
Diffstat (limited to 'msvc/scripts/prepare.cs')
-rw-r--r--msvc/scripts/prepare.cs27
1 files changed, 19 insertions, 8 deletions
diff --git a/msvc/scripts/prepare.cs b/msvc/scripts/prepare.cs
index 9bafb352fba..df9e48af89c 100644
--- a/msvc/scripts/prepare.cs
+++ b/msvc/scripts/prepare.cs
@@ -7,17 +7,28 @@ using System.Text;
using System.IO;
class Prepare {
-
- static void Main (string [] args)
+ delegate void filt (StreamReader sr, StreamWriter sw);
+
+ static void Filter (string inpath, string outpath, filt filter)
{
- string bdir = args.Length == 0 ? "../../../mcs/class" : args [0];
-
- using (var xps = new StreamReader (bdir + "/System.XML/System.Xml.XPath/Parser.jay")){
- using (var xpp = new StreamWriter (bdir + "/System.XML/Mono.Xml.Xsl/PatternParser.jay")){
-
- xpp.Write (xps.ReadToEnd ().Replace ("%start Expr", "%start Pattern"));
+ using (var ins = new StreamReader (){
+ using (var outs = new StreamWriter ()){
+ filter (ins, outs);
}
}
}
+ static void Main (string [] args)
+ {
+ string bdir = args.Length == 0 ? "../../../mcs" : args [0];
+
+ Filter (bdir + "/class/System.XML/System.Xml.XPath/Parser.jay",
+ bdir + "/class/System.XML/Mono.Xml.Xsl/PatternParser.jay",
+ (i, o) => o.Write (i.ReadToEnd ().Replace ("%start Expr", "%start Pattern")));
+
+ Filter (bdir + "/mcs/build/common/Consts.cs.in",
+ bdir + "/mcs/build/common/Consts.cs",
+ (i, o) => o.Write (i.ReadToEnd ().Replace ("@MONO_VERSION@", "Mono-VSBuild")));
+ }
+
} \ No newline at end of file