summaryrefslogtreecommitdiff
path: root/Build-tools
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-09-10 14:01:02 +0300
committerunknown <bell@sanja.is.com.ua>2004-09-10 14:01:02 +0300
commit28d840f6e2227ce68d49a66432abd48d4055e455 (patch)
treeac6849ba97c2655adaad147d095a2875ae197d4a /Build-tools
parentb61e1f7f6d8d8f8a7d4745cd0277f0faec8f8b49 (diff)
parent01b88943d01e60295f87d75f5963aa26478fd8f9 (diff)
downloadmariadb-git-28d840f6e2227ce68d49a66432abd48d4055e455.tar.gz
Merge
sql/sql_handler.cc: Auto merged mysql-test/r/view.result: SCCS merged mysql-test/t/view.test: SCCS merged
Diffstat (limited to 'Build-tools')
-rwxr-xr-xBuild-tools/Bootstrap54
-rwxr-xr-xBuild-tools/Do-compile6
-rwxr-xr-xBuild-tools/mysql-copyright34
3 files changed, 70 insertions, 24 deletions
diff --git a/Build-tools/Bootstrap b/Build-tools/Bootstrap
index fa3c6344a05..8cad093bc5f 100755
--- a/Build-tools/Bootstrap
+++ b/Build-tools/Bootstrap
@@ -28,8 +28,8 @@ else
# Some predefined settings
$build_command= "BUILD/compile-pentium-max";
$PWD= cwd();
-$LOGFILE= $PWD . "/Bootstrap.log";
$opt_docdir= $PWD . "/mysqldoc";
+$opt_archive_log= undef;
$opt_build_command= undef;
$opt_changelog= undef;
$opt_delete= undef;
@@ -51,6 +51,7 @@ $version= "unknown";
$major=$minor=$release=0;
GetOptions(
+ "archive-log|a",
"build-command|b=s",
"changelog|c:s",
"directory|d=s",
@@ -73,6 +74,17 @@ GetOptions(
) || print_help("");
#
+# Override predefined build command
+#
+if (defined $opt_build_command)
+{
+ $build_command= $opt_build_command;
+}
+
+print_help("") if ($opt_help);
+defined($REPO=$ARGV[0]) || print_help("Please enter the BK repository to be used!");
+
+#
# Override predefined Log file name
#
if (defined $opt_log)
@@ -90,16 +102,7 @@ if (defined $opt_log)
}
}
-#
-# Override predefined build command
-#
-if (defined $opt_build_command)
-{
- $build_command= $opt_build_command;
-}
-
-print_help("") if ($opt_help);
-defined($REPO=$ARGV[0]) || print_help("Please enter the BK repository to be used!");
+$LOGFILE= $PWD . "/Bootstrap-" . $REPO . ".log" unless ($LOGFILE);
&logger("Starting build");
&abort("The directory \"$REPO\" could not be found!") if (!-d $REPO);
@@ -120,14 +123,16 @@ if (($opt_directory ne $PWD) && (!-d $opt_directory && !$opt_dry_run))
if ($opt_pull)
{
&logger("Updating BK tree $REPO to latest ChangeSet first");
- $command= "cd $REPO; bk pull; cd ..";
- &run_command($command, "Could not update $REPO!");
+ chdir ($REPO) or &abort("Could not chdir to $REPO!");
+ &run_command("bk pull", "Could not update $REPO!");
+ chdir ($PWD) or &abort("Could not chdir to $PWD!");
unless ($opt_skip_manual)
{
&logger("Updating manual tree in $opt_docdir");
- $command= "cd $opt_docdir; bk pull; cd ..";
- &run_command($command, "Could not update $opt_docdir!");
+ chdir ($opt_docdir) or &abort("Could not chdir to $opt_docdir!");
+ &run_command("bk pull", "Could not update $opt_docdir!");
+ chdir ($PWD) or &abort("Could not chdir to $PWD!");
}
}
@@ -351,6 +356,21 @@ if (!$opt_skip_check)
# All done when we came down here
#
&logger("SUCCESS: Build finished successfully.") if (!$opt_dry_run);
+
+#
+# Move the log file into the Log dir of the target dir
+#
+if ($opt_archive_log)
+{
+ my $logdir= $target_dir . "/Logs";
+ &logger("Moving $LOGFILE to $logdir");
+ mkdir "$logdir" if (! -d $logdir);
+ $command= "mv ";
+ $command.= "-v " if ($opt_verbose || defined $opt_log);
+ $command.= "$LOGFILE $logdir";
+ &run_command($command, "Could not move $LOGFILE to $logdir!");
+}
+
exit 0;
#
@@ -378,6 +398,8 @@ distribution check can be run before the source archive is being created.
Options:
+-a, --archive-log Move the log file into the Logs directory of
+ the exported tree after a successful build
-b, --build-command=<cmd> Use <cmd> to compile the sources before packing
the distribution.
(default is "$build_command")
@@ -398,7 +420,7 @@ Options:
do not build or test the source distribution
-h, --help Print this help message
-l, --log[=<filename>] Write a log file [to <filename>]
- (default is "$LOGFILE")
+ (default is "./Bootstrap-<bk repository>.log")
-m, --mail=<address> Mail a failure report to the given address (and
include a log file snippet, if logging is enabled)
Note that the \@-Sign needs to be quoted!
diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile
index e6e71582c74..f3c20c81a9f 100755
--- a/Build-tools/Do-compile
+++ b/Build-tools/Do-compile
@@ -10,12 +10,13 @@ use Sys::Hostname;
$opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env="";
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
$opt_tmp=$opt_version_suffix="";
-$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_cluster=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0;
+$opt_bundled_zlib=$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_cluster=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0;
$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=0;
GetOptions(
"bdb",
"build-thread=i",
+ "bundled-zlib",
"config-env=s" => \@config_env,
"config-extra-env=s" => \@config_extra_env,
"config-options=s" => \@config_options,
@@ -255,6 +256,7 @@ if ($opt_stage <= 1)
log_system("$make clean") if ($opt_use_old_distribution);
$opt_config_options.= " --disable-shared" if (!$opt_enable_shared); # Default for binary versions
$opt_config_options.= " --with-berkeley-db" if ($opt_bdb);
+ $opt_config_options.= " --with-zlib-dir=bundled" if ($opt_bundled_zlib);
$opt_config_options.= " --with-client-ldflags=-all-static" if ($opt_static_client);
$opt_config_options.= " --with-debug" if ($opt_with_debug);
$opt_config_options.= " --with-libwrap" if ($opt_libwrap);
@@ -374,7 +376,7 @@ if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest)
log_timestamp();
system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir);
safe_cd("${test_dir}/mysql-test");
- check_system("./mysql-test-run $flags --warnings --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful");
+ check_system("./mysql-test-run $flags --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful");
}
#
diff --git a/Build-tools/mysql-copyright b/Build-tools/mysql-copyright
index e1ee513e06d..0c091890e72 100755
--- a/Build-tools/mysql-copyright
+++ b/Build-tools/mysql-copyright
@@ -101,6 +101,7 @@ sub main
# on the toplevel of the directory instead. file 'PUBLIC' shouldn't
# exist in the new mysql distributions, but let's be sure..
unlink("$destdir/PUBLIC", "$destdir/README");
+ unlink("$destdir/COPYING", "$destdir/EXCEPTIONS-CLIENT");
copy("$WD/Docs/MySQLEULA.txt", "$destdir");
# remove readline, bdb subdirs and update 'configure'
@@ -114,6 +115,9 @@ sub main
# fix file copyrights
&fix_usage_copyright();
&add_copyright();
+
+ # fix LICENSE tag in include/mysql_version.h
+ &fix_mysql_version();
# rename the directory with new distribution name
chdir("$WD/$dir");
@@ -141,6 +145,28 @@ sub main
}
####
+#### This function will s/GPL/Commercial/ in include/mysql_version.h for the
+#### LICENSE tag.
+####
+sub fix_mysql_version
+{
+ chdir("$destdir");
+ my $header_file= (-f 'include/mysql_version.h.in')? 'include/mysql_version.h.in' : 'include/mysql_version.h';
+
+ open(MYSQL_VERSION,"<$header_file") or die "Unable to open $header_file for read: $!\n";
+ undef $/;
+ my $mysql_version= <MYSQL_VERSION>;
+ close(MYSQL_VERSION);
+
+ $mysql_version=~ s/\#define LICENSE[\s\t]+GPL/#define LICENSE Commercial/;
+
+ open(MYSQL_VERSION,">$header_file") or die "Unable to open $header_file for write: $!\n";
+ print MYSQL_VERSION $mysql_version;
+ close(MYSQL_VERSION);
+ chdir("$cwd");
+}
+
+####
#### This function will remove unwanted parts of a src tree for the mysqlcom
#### distributions.
####
@@ -150,11 +176,7 @@ sub trim_the_fat
my $cwd= getcwd();
system("rm -rf $destdir/${the_fat}");
- if ($win_flag)
- {
- chdir("$destdir") or die "Unable to change directory to $destdir!: $!\n";
- }
- else
+ if (!$win_flag)
{
chdir("$destdir");
unlink ("configure") or die "Can't delete $destdir/configure: $!\n";
@@ -182,7 +204,7 @@ sub trim_the_fat
open(CONFIGURE,">configure.in") or die "Unable to open configure.in for write: $!\n";
print CONFIGURE $configure;
close(CONFIGURE);
- `autoconf`;
+ `aclocal && autoheader && aclocal && automake && autoconf`;
die "'./configure' was not produced!" unless (-f "configure");
chdir("$cwd");
}