summaryrefslogtreecommitdiff
path: root/Build-tools/Do-compile
diff options
context:
space:
mode:
authorunknown <patg@krsna.patg.net>2004-06-08 13:22:31 -0700
committerunknown <patg@krsna.patg.net>2004-06-08 13:22:31 -0700
commitca96a3b41052a7e2bc8d03c0697c318275e829c5 (patch)
treec6fb0a5e1dda9cdf80eb29214902aa47277d318a /Build-tools/Do-compile
parenta3d48fc6db3c813732bb1c7e280df207161f58bd (diff)
parent3e159f3fc9dfc652a5338e6b564226717560add1 (diff)
downloadmariadb-git-ca96a3b41052a7e2bc8d03c0697c318275e829c5.tar.gz
Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-4.0
into krsna.patg.net:/home/patg/mysql-4.0 Build-tools/Do-compile: Auto merged
Diffstat (limited to 'Build-tools/Do-compile')
-rwxr-xr-xBuild-tools/Do-compile37
1 files changed, 27 insertions, 10 deletions
diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile
index 099d7c8aac7..d79fd1f0b65 100755
--- a/Build-tools/Do-compile
+++ b/Build-tools/Do-compile
@@ -7,7 +7,7 @@ use Sys::Hostname;
@config_options= ();
@make_options= ();
-$opt_distribution=$opt_user=$opt_config_env="";
+$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_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=0;
@@ -17,6 +17,7 @@ GetOptions(
"bdb",
"build-thread=i",
"config-env=s" => \@config_env,
+ "config-extra-env=s" => \@config_extra_env,
"config-options=s" => \@config_options,
"dbd-options=s",
"debug",
@@ -79,6 +80,12 @@ if (@config_env > 0)
$opt_config_env= join(" ", @config_env);
}
+if (@config_extra_env > 0)
+{
+ chomp(@config_extra_env);
+ $opt_config_extra_env= join(" ", @config_extra_env);
+}
+
$host= hostname();
chomp($uname=`uname`);
$full_host_name=$host;
@@ -89,6 +96,7 @@ $email="$opt_user\@mysql.com";
chomp($pwd = `pwd`);
$VER= basename($opt_distribution);
$VER=~ /mysql.*-([1-9]\.[0-9]{1,2}\.[0-9]{1,2}.*)\.tar*/; $version=$1;
+$release=""; # Shut up perl
($major, $minor, $release) = split(/\./,$version);
$log="$pwd/Logs/$host-$major.$minor$opt_version_suffix.log";
$opt_distribution =~ /(mysql[^\/]*)\.tar/;
@@ -111,6 +119,8 @@ if (defined($gcc_version) && ! $opt_config_env)
}
}
+$opt_config_env.=" $opt_config_extra_env";
+
$new_opt_tmp=0;
if ($opt_tmp)
{
@@ -154,6 +164,9 @@ select STDOUT;
$|=1;
info("Compiling MySQL$opt_version_suffix at $host$opt_suffix, stage: $opt_stage\n");
+info("LD_LIBRARY_PATH is $ENV{LD_LIBRARY_PATH}");
+info("PATH is $ENV{PATH}");
+
log_timestamp();
if (-x "$host/bin/mysqladmin")
@@ -240,14 +253,14 @@ if ($opt_stage <= 1)
# Only enable InnoDB when requested (required to be able to
# build the "Classic" packages that do not include InnoDB)
- if ($opt_innodb)
- {
- $opt_config_options.= " --with-innodb";
- }
- else
- {
- $opt_config_options.= " --without-innodb";
- }
+ if ($opt_innodb)
+ {
+ $opt_config_options.= " --with-innodb";
+ }
+ else
+ {
+ $opt_config_options.= " --without-innodb";
+ }
if ($opt_with_other_libc)
{
@@ -443,7 +456,7 @@ exit 0;
sub usage
{
print <<EOF;
-$0 version 1.5
+$0 version 1.6
$0 takes the following options:
@@ -453,6 +466,10 @@ Compile with support for Berkeley DB tables
--config-env <environment for configure>
To set up the environment, like 'CC=cc CXX=gcc CXXFLAGS=-O3'
+--config-extra-env <environment for configure>
+Additional flags for environment (not CC or CXX). Should be used when one
+wants Do-compile to propose proper CC and CXX flags.
+
--config-options <options>
To add some extra options to configure (e.g. '--with-perl=yes')