summaryrefslogtreecommitdiff
path: root/Build-tools
diff options
context:
space:
mode:
authorunknown <greg@mysql.com>2004-01-15 16:08:32 -0100
committerunknown <greg@mysql.com>2004-01-15 16:08:32 -0100
commitf6940525aa6aec2c56aeffae919cc536fc577291 (patch)
tree8d520f4ec614538b4a97110b09daea4a42dcfb8e /Build-tools
parentd04194e3345cb09cd4c612b48500aa6f4b06bd02 (diff)
downloadmariadb-git-f6940525aa6aec2c56aeffae919cc536fc577291.tar.gz
Wrote small Windows build automation script in preparation
for re-working project files and enabling remote builds.
Diffstat (limited to 'Build-tools')
-rwxr-xr-xBuild-tools/Do-win-build82
1 files changed, 82 insertions, 0 deletions
diff --git a/Build-tools/Do-win-build b/Build-tools/Do-win-build
new file mode 100755
index 00000000000..b446ba6f601
--- /dev/null
+++ b/Build-tools/Do-win-build
@@ -0,0 +1,82 @@
+#!/usr/bin/perl -w
+
+use Getopt::Long;
+
+$opt_help=0;
+$opt_tarball=$opt_builddir="";
+
+GetOptions(
+ "help",
+ "tarball=s",
+ "builddir=s",
+) || print_help();
+
+print_help() if ($opt_help);
+
+chomp($MSDEV=`which msdev`);
+
+if (!$opt_builddir) {
+ $opt_builddir = "/cygdrive/c/mysql-win-build";
+}
+
+$opt_tarball =~ /(mysql[^\/]*)-win-src\.tar/;
+$mysqlver=$1;
+$basedir = "$opt_builddir/$mysqlver";
+
+# Make sure build dir exists
+mkdir($opt_builddir);
+# Clean out any previous build
+system("rm -rf $basedir");
+mkdir($basedir);
+mkdir("$basedir/tarball");
+
+system("cp $opt_tarball $basedir/tarball");
+
+if (!chdir($basedir))
+{
+ print "Do-win-build error: Could not change to $opt_builddir";
+ exit 1;
+}
+
+mkdir("build");
+chdir("build");
+
+system("tar -zxvf ../tarball/$mysqlver-win-src.tar.gz");
+
+chdir($mysqlver);
+
+system("\"$MSDEV\" mysql.dsw /MAKE \"ALL\" /OUT $mysqlver-build.log");
+
+#
+# Print a help text message
+#
+sub print_help
+{
+ print <<EOF;
+Usage: Do-compile-win [options] source-tarball
+
+Unpacks a Windows source distribution on the local machine and
+compiles it using VC++ 6.0.
+
+This script is intended for Cygwin Perl. You must have a working
+MSDEV.EXE in your path for compilation.
+
+
+Options:
+
+--help
+Print this text.
+
+--builddir=<dir>
+Set the Cygwin path to build under; the tarball will actually
+be moved to <builddir>/mysql-<version>/tarball and extracted under
+<builddir>/mysql-<version>/build.
+Default: /cygdrive/c/mysql-win-build
+
+--tarball=<file>
+Windows source tarball to use for this build. Must be of the form
+mysql[com]-x.x.x-win-src.tar.gz (REQUIRED)
+
+EOF
+ exit 1;
+}