diff options
author | unknown <monty@mashka.mysql.fi> | 2004-02-22 11:01:28 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2004-02-22 11:01:28 +0200 |
commit | 07b40e621e5ff2a285b673b6b7bab345c7c361cf (patch) | |
tree | 5cbf5acd9871f4013aae8ed412d72912dbc4706f /Build-tools | |
parent | 4e17890f6afaddfa8bcdb483a60505b7aee1f652 (diff) | |
parent | a594279dc99b0397476fbc4b2179657cd1a3e9e7 (diff) | |
download | mariadb-git-07b40e621e5ff2a285b673b6b7bab345c7c361cf.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mashka.mysql.fi:/home/my/mysql-4.1
innobase/rem/rem0cmp.c:
Auto merged
libmysql/libmysql.c:
Auto merged
sql-common/client.c:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/sql_base.cc:
Auto merged
Diffstat (limited to 'Build-tools')
-rwxr-xr-x | Build-tools/Do-win-build | 76 |
1 files changed, 59 insertions, 17 deletions
diff --git a/Build-tools/Do-win-build b/Build-tools/Do-win-build index b446ba6f601..a78b091a737 100755 --- a/Build-tools/Do-win-build +++ b/Build-tools/Do-win-build @@ -3,12 +3,13 @@ use Getopt::Long; $opt_help=0; -$opt_tarball=$opt_builddir=""; +$opt_tarball=$opt_builddir=$opt_suffix=""; GetOptions( "help", - "tarball=s", - "builddir=s", + "tarball=s", + "builddir=s", + "suffix=s" ) || print_help(); print_help() if ($opt_help); @@ -22,30 +23,60 @@ if (!$opt_builddir) { $opt_tarball =~ /(mysql[^\/]*)-win-src\.tar/; $mysqlver=$1; $basedir = "$opt_builddir/$mysqlver"; +$scriptdir = `pwd`; # 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"); +# Unpack in the script directory +system("tar -zxvf $opt_tarball"); +# Move to the build directory +system("mv $mysqlver $opt_builddir"); if (!chdir($basedir)) { - print "Do-win-build error: Could not change to $opt_builddir"; + print "Do-win-build error: Could not change to $basedir"; exit 1; } -mkdir("build"); -chdir("build"); +# Check whether this is a classic edition build +if ($opt_suffix =~ /-classic/) +{ + # Blank out ha_innodb.cpp + chmod 0644, 'sql/ha_innodb.cpp'; + open(OUT, '>', 'sql/ha_innodb.cpp'); + close(OUT); + + # Remove HAVE_INNOBASE_DB from the requisite project files + for $dspfile ('libmysqld/libmysqld.dsp', 'mysqldemb/mysqldemb.dsp', 'mysqlserver/mysqlserver.dsp', 'sql/mysqld.dsp', 'sql/mysqldmax.dsp') + { + open(IN, '<', $dspfile); + open(OUT, '>', "$dspfile.tmp"); + while (readline IN) + { + s/\D \"HAVE_INNOBASE_DB\" //g; + print OUT $_; + } + close(IN); + close(OUT); + unlink $dspfile; + rename "$dspfile.tmp", $dspfile; + } +} -system("tar -zxvf ../tarball/$mysqlver-win-src.tar.gz"); +# Perform compilation +system("\"$MSDEV\" mysql.dsw /MAKE \"ALL\" /OUT $mysqlver-build.log"); -chdir($mysqlver); +# Package binary +system("./scripts/make_win_binary_distribution --suffix=$opt_suffix"); -system("\"$MSDEV\" mysql.dsw /MAKE \"ALL\" /OUT $mysqlver-build.log"); +# Copy log back to script directory +system("cp $mysqlver$suffix-build.log $scriptdir"); + +# Move binary package to script directory +system("mv *.zip $scriptdir"); # # Print a help text message @@ -55,11 +86,15 @@ sub print_help print <<EOF; Usage: Do-compile-win [options] source-tarball -Unpacks a Windows source distribution on the local machine and +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. +This script is intended for Cygwin Perl. You must have a working +MSDEV.EXE in your path for compilation, as well as the following: + +sed +tar (GNU tar) +which Options: @@ -68,11 +103,18 @@ Options: 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 +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 +--suffix=<suffix> +If specified, the resulting binary will have the specified suffix +in its name. If the suffix is "-classic", the project files will +be stripped of all occurrences of HAVE_INNOBASE_DB and +ha_innodb.cpp will be blanked out, to create classic edition +server binaries. + --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) |