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

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Quirk <chrisq@microsoft.com>2012-08-14 20:27:28 +0400
committerChris Quirk <chrisq@microsoft.com>2012-08-14 20:27:28 +0400
commitcac837d8d4db6e1bb81cbf0f8c39881bcaf50ea1 (patch)
treeee41a89af084955370fdb386a8b30465ea2448f1 /vowpalwabbit/win32
parentb34bb5372d6e4247624737d81be35588f0884561 (diff)
make debug and release compile cleanly
Diffstat (limited to 'vowpalwabbit/win32')
-rw-r--r--vowpalwabbit/win32/make_config_h.cs35
-rw-r--r--vowpalwabbit/win32/make_config_h.exebin0 -> 4608 bytes
2 files changed, 35 insertions, 0 deletions
diff --git a/vowpalwabbit/win32/make_config_h.cs b/vowpalwabbit/win32/make_config_h.cs
new file mode 100644
index 00000000..746a2398
--- /dev/null
+++ b/vowpalwabbit/win32/make_config_h.cs
@@ -0,0 +1,35 @@
+using System;
+using System.IO;
+
+public class Program
+{
+ public static void Main(string[] args)
+ {
+ try
+ {
+ string[] lines = File.ReadAllLines("..\\configure.ac");
+ foreach (var line in lines)
+ {
+ if (line.Contains("AC_INIT"))
+ {
+ string version = line.Split('[')[2].Split(']')[0];
+ string config = "#define PACKAGE_VERSION \"" + version + "\"\n";
+ if (!File.Exists("win32\\config.h") ||
+ string.CompareOrdinal(File.ReadAllText("win32\\config.h"), config) != 0)
+ {
+ File.WriteAllText("win32\\config.h", config);
+ }
+ return;
+ }
+ }
+ throw new Exception("can't find AC_INIT line");
+ }
+ catch (Exception e)
+ {
+ Console.Error.WriteLine(e.ToString());
+ Environment.Exit(1);
+ }
+ }
+}
+
+// vim:sw=4:ts=4:et:ai:cindent
diff --git a/vowpalwabbit/win32/make_config_h.exe b/vowpalwabbit/win32/make_config_h.exe
new file mode 100644
index 00000000..8ad38deb
--- /dev/null
+++ b/vowpalwabbit/win32/make_config_h.exe
Binary files differ