summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <df@pippilotta.erinye.com>2007-11-23 13:38:59 +0100
committerunknown <df@pippilotta.erinye.com>2007-11-23 13:38:59 +0100
commit0e31abb9dc57aab71975c73c28f31d9c3ee8727a (patch)
tree3628a73bce65b08141fef88bb9b64dc64c62beff /scripts
parent76126a779c708cc1f784f0904ec87eb9f03b52fc (diff)
downloadmariadb-git-0e31abb9dc57aab71975c73c28f31d9c3ee8727a.tar.gz
Fix make distcheck.
scripts/mysql_install_db.sh: Give precedence to basedir if both basedir and srcdir are specified, but set mysqld_opt, pkgdatadir and scriptdir always from srcdir if it is specified. This is to unbreak out-of-directory builds like make distcheck does, where we don't have binaries in srcdir.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_install_db.sh34
1 files changed, 19 insertions, 15 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 260c372c802..798dbf60acd 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -189,12 +189,12 @@ parse_arguments PICK-ARGS-FROM-ARGV "$@"
#
# or default to compiled-in locations.
#
-if test -n "$srcdir"
-then
- print_defaults="$srcdir/extra/my_print_defaults"
-elif test -n "$basedir"
+if test -n "$basedir"
then
print_defaults=`find_in_basedir my_print_defaults bin extra`
+elif test -n "$srcdir"
+then
+ print_defaults="$srcdir/extra/my_print_defaults"
else
print_defaults="@bindir@/my_print_defaults"
fi
@@ -211,22 +211,19 @@ parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
# Configure paths to support files
-if test -n "$srcdir"
-then
- basedir="$srcdir"
- bindir="$srcdir/client"
- extra_bindir="$srcdir/extra"
- mysqld="$srcdir/sql/mysqld"
- mysqld_opt="--language=$srcdir/sql/share/english"
- pkgdatadir="$srcdir/scripts"
- scriptdir="$srcdir/scripts"
-elif test -n "$basedir"
+if test -n "$basedir"
then
bindir="$basedir/bin"
extra_bindir="$bindir"
- mysqld=`find_in_basedir mysqld libexec sbin bin`
+ mysqld=`find_in_basedir mysqld libexec sbin bin sql`
pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql`
scriptdir="$basedir/scripts"
+elif test -n "$srcdir"
+then
+ basedir="$srcdir"
+ bindir="$srcdir/client"
+ extra_bindir="$srcdir/extra"
+ mysqld="$srcdir/sql/mysqld"
else
basedir="@prefix@"
bindir="@bindir@"
@@ -236,6 +233,13 @@ else
scriptdir="@scriptdir@"
fi
+if test -n "$srcdir"
+then
+ mysqld_opt="--language=$srcdir/sql/share/english"
+ pkgdatadir="$srcdir/scripts"
+ scriptdir="$srcdir/scripts"
+fi
+
# Set up paths to SQL scripts required for bootstrap
fill_help_tables="$pkgdatadir/fill_help_tables.sql"
create_system_tables="$pkgdatadir/mysql_system_tables.sql"