Commit 0e31abb9 authored by unknown's avatar unknown

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.
parent 76126a77
...@@ -189,12 +189,12 @@ parse_arguments PICK-ARGS-FROM-ARGV "$@" ...@@ -189,12 +189,12 @@ parse_arguments PICK-ARGS-FROM-ARGV "$@"
# #
# or default to compiled-in locations. # or default to compiled-in locations.
# #
if test -n "$srcdir" if test -n "$basedir"
then
print_defaults="$srcdir/extra/my_print_defaults"
elif test -n "$basedir"
then then
print_defaults=`find_in_basedir my_print_defaults bin extra` print_defaults=`find_in_basedir my_print_defaults bin extra`
elif test -n "$srcdir"
then
print_defaults="$srcdir/extra/my_print_defaults"
else else
print_defaults="@bindir@/my_print_defaults" print_defaults="@bindir@/my_print_defaults"
fi fi
...@@ -211,22 +211,19 @@ parse_arguments `$print_defaults $defaults mysqld mysql_install_db` ...@@ -211,22 +211,19 @@ parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
parse_arguments PICK-ARGS-FROM-ARGV "$@" parse_arguments PICK-ARGS-FROM-ARGV "$@"
# Configure paths to support files # Configure paths to support files
if test -n "$srcdir" if test -n "$basedir"
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"
then then
bindir="$basedir/bin" bindir="$basedir/bin"
extra_bindir="$bindir" 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` pkgdatadir=`find_in_basedir --dir fill_help_tables.sql share share/mysql`
scriptdir="$basedir/scripts" scriptdir="$basedir/scripts"
elif test -n "$srcdir"
then
basedir="$srcdir"
bindir="$srcdir/client"
extra_bindir="$srcdir/extra"
mysqld="$srcdir/sql/mysqld"
else else
basedir="@prefix@" basedir="@prefix@"
bindir="@bindir@" bindir="@bindir@"
...@@ -236,6 +233,13 @@ else ...@@ -236,6 +233,13 @@ else
scriptdir="@scriptdir@" scriptdir="@scriptdir@"
fi 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 # Set up paths to SQL scripts required for bootstrap
fill_help_tables="$pkgdatadir/fill_help_tables.sql" fill_help_tables="$pkgdatadir/fill_help_tables.sql"
create_system_tables="$pkgdatadir/mysql_system_tables.sql" create_system_tables="$pkgdatadir/mysql_system_tables.sql"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment