diff options
author | Miguel de Icaza <miguel@gnome.org> | 2009-05-02 09:04:38 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2009-05-02 09:04:38 +0400 |
commit | 314ce8627cb6f7d01f85da3859341c3894918635 (patch) | |
tree | 0866239edab1adb25d624cc7c4a2e0065e17b035 /msvc | |
parent | 67e68c8c4612711d14b4489f449601ad10840ff0 (diff) |
Add prebuild commands
svn path=/trunk/mono/; revision=133364
Diffstat (limited to 'msvc')
-rw-r--r-- | msvc/scripts/System.Xml.pre | 7 | ||||
-rw-r--r-- | msvc/scripts/genproj.cs | 27 | ||||
-rw-r--r-- | msvc/scripts/prepare.cs | 23 | ||||
-rwxr-xr-x | msvc/setup-solution.bat | 1 |
4 files changed, 51 insertions, 7 deletions
diff --git a/msvc/scripts/System.Xml.pre b/msvc/scripts/System.Xml.pre new file mode 100644 index 00000000000..2ba6d463ddc --- /dev/null +++ b/msvc/scripts/System.Xml.pre @@ -0,0 +1,7 @@ +..\..\jay\bin\Debug\jay.exe -ct ..\..\jay\skeleton.cs System.Xml.XPath/Parser.jay > System.Xml.XPath/Parser.cs
+echo #define XSLT_PATTERN > Mono.Xml.Xsl/PatternParser.cs
+..\..\jay\bin\Debug\jay.exe -ct ..\..\jay\skeleton.cs Mono.Xml.Xsl/PatternParser.jay >> Mono.Xml.Xsl/PatternParser.cs
+echo #define XSLT_PATTERN > Mono.Xml.Xsl/PatternTokenizer.cs
+type System.Xml.XPath/Tokenizer.cs >> Mono.Xml.Xsl/PatternTokenizer.cs
+..\..\..\mono\msvc\scripts\prepare . +
\ No newline at end of file diff --git a/msvc/scripts/genproj.cs b/msvc/scripts/genproj.cs index 4f03899f4d0..803591209f9 100644 --- a/msvc/scripts/genproj.cs +++ b/msvc/scripts/genproj.cs @@ -442,6 +442,16 @@ class MsbuildGenerator { return ret_value; } + + static string Load (string f) + { + if (File.Exists (f)){ + using (var sr = new StreamReader (f)){ + return sr.ReadToEnd (); + } + } else + return ""; + } public void Generate (XElement xproject) { @@ -456,14 +466,17 @@ class MsbuildGenerator { library_output = xproject.Element ("library_output").Value; response = xproject.Element ("response").Value; - string prefile = Path.Combine ("inputs", library + ".pre"); - string prebuild = ""; - if (File.Exists (prefile)){ - using (var pre = new StreamReader (prefile)){ - prebuild = pre.ReadToEnd (); - } - } + // + // Prebuild code, might be in inputs, check: + // inputs/LIBRARY-PROFILE.pre + // inputs/LIBRARY.pre + // + string prebuild = Load (library + ".pre"); + int q = library.IndexOf ("-"); + if (q != -1) + prebuild = prebuild + Load (library.Substring (0, q) + ".pre"); + var all_args = new Queue<string []> (); all_args.Enqueue (flags.Split ()); while (all_args.Count > 0){ diff --git a/msvc/scripts/prepare.cs b/msvc/scripts/prepare.cs new file mode 100644 index 00000000000..9bafb352fba --- /dev/null +++ b/msvc/scripts/prepare.cs @@ -0,0 +1,23 @@ +// +// C# implementation of a handful of shell steps +// this is used to automate the buidl in Windows +// +using System; +using System.Text; +using System.IO; + +class Prepare { + + static void Main (string [] args) + { + 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")); + } + } + } + +}
\ No newline at end of file diff --git a/msvc/setup-solution.bat b/msvc/setup-solution.bat index bc358cfd7a1..fb4f3ac7d9b 100755 --- a/msvc/setup-solution.bat +++ b/msvc/setup-solution.bat @@ -1,6 +1,7 @@ @echo off
csc -debug -out:scripts\monowrap.exe scripts\monowrap.cs
csc -debug -out:scripts\genproj.exe scripts\genproj.cs
+csc -debug -out:scripts\prepare.exe scripts\prepare.cs
cd scripts
genproj.exe
cd ..
|