summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild-tools/Do-all-build-steps13
-rw-r--r--Makefile.am3
-rw-r--r--configure.in6
-rw-r--r--libmysql/Makefile.am2
-rw-r--r--libmysql/Makefile.shared2
-rw-r--r--libmysql_r/Makefile.am16
-rwxr-xr-xscripts/safe_mysqld.sh3
7 files changed, 35 insertions, 10 deletions
diff --git a/Build-tools/Do-all-build-steps b/Build-tools/Do-all-build-steps
index 78644e03982..682113f4f72 100755
--- a/Build-tools/Do-all-build-steps
+++ b/Build-tools/Do-all-build-steps
@@ -1,6 +1,7 @@
#!/bin/bash
WD=`pwd`
+# Don't write a wrong path for BD !!!!!
BD=/my/tmp/BUILD
TMP_SCRIPT=$WD/Logs/00-temp-for-do-all-build-steps.$$
@@ -12,6 +13,7 @@ EXTRA_CONFIG="--without-perl"
echo "Building on $to_host"
+rm -rf $BD/*
mkdir -p $WD/Logs
mkdir -p $BD/Logs
@@ -22,9 +24,12 @@ set -x
cd "$WD"
# Create a build directory tree
bk export -w $BD
-chmod a+x $BD/mit-pthreads/config/configure
+chmod a+x $BD/mit-pthreads/config/configure $BD/Build-tools/* $BD/tests/*.pl
cd "$BD"
+#Make it easy to remove an old build
+umask 002
+
CC=$cc CXX=$ccc
export CC CXX
@@ -51,7 +56,8 @@ aclocal; autoheader; aclocal; automake; autoconf
./configure \
--with-unix-socket-path=/var/tmp/mysql.sock \
--with-low-memory \
- --with-mit-threads=yes $EXTRA_CONFIG
+ --with-mit-threads=yes $EXTRA_CONFIG \
+ --enable-thread-safe-client
gmake # --jobs=4 does not work.
@@ -77,5 +83,6 @@ fi
# Create a commercial MySQL distribution (mysqlcom-VER.tar.gz) from
# the newly made source distribution
+cd "$BD"
DIST=`ls -t mysql-*.tar.gz | head -1`
-sh $BD/Build-tools/mysql-copyright --target=. $DIST
+$BD/Build-tools/mysql-copyright --target=. $DIST
diff --git a/Makefile.am b/Makefile.am
index 9f74861ce48..a24164f0bca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,8 @@ TAR = gtar
# These are built from source in the Docs directory
EXTRA_DIST = INSTALL-SOURCE README \
COPYING COPYING.LIB MIRRORS
-SUBDIRS = include @docs_dirs@ @readline_dir@ @sql_client_dirs@ \
+SUBDIRS = include @docs_dirs@ @readline_dir@ \
+ @thread_dirs@ @sql_client_dirs@ \
@sql_server_dirs@ scripts tests man \
@bench_dirs@ support-files
diff --git a/configure.in b/configure.in
index 5a9d79f3ae1..d42f792d7a0 100644
--- a/configure.in
+++ b/configure.in
@@ -1753,6 +1753,7 @@ MYSQL_CHECK_BDB
# If we have threads generate some library functions and test programs
sql_server_dirs=
server_scripts=
+thread_dirs=
dnl This probably should be cleaned up more - for now the threaded
dnl client is just using plain-old libs.
@@ -1807,11 +1808,11 @@ install: all # modified by MySQL configure' \
if test "$with_posix_threads" = "no" -o "$with_mit_threads" = "yes"
then
# MIT user level threads
- sql_server_dirs="mit-pthreads $sql_server_dirs"
+ thread_dirs="mit-pthreads"
AC_DEFINE(HAVE_mit_thread)
MT_INCLUDES="-I\$(top_srcdir)/mit-pthreads/include"
AC_SUBST(MT_INCLUDES)
- MT_LD_ADD="\$(top_srcdir)/mit-pthreads/obj/libpthread.a"
+ MT_LD_ADD="-L \$(top_srcdir)/mit-pthreads/obj/ -lpthread"
AC_SUBST(MT_LD_ADD)
LIBS="$MT_LD_ADD $LIBS"
echo ""
@@ -1823,6 +1824,7 @@ install: all # modified by MySQL configure' \
fi
fi
AC_SUBST(sql_server_dirs)
+AC_SUBST(thread_dirs)
AC_SUBST(server_scripts)
if test "$with_posix_threads" = "no" -o "$with_mit_threads" = "yes"
diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am
index c67aebc10c9..758af52fe5a 100644
--- a/libmysql/Makefile.am
+++ b/libmysql/Makefile.am
@@ -20,6 +20,8 @@
target = libmysqlclient.la
target_defs = -DUNDEF_THREADS_HACK
LIBS = @CLIENT_LIBS@
+INCLUDES = -I$(srcdir)/../include -I../include \
+ -I$(srcdir)/.. -I$(top_srcdir) -I..
include $(srcdir)/Makefile.shared
diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared
index 223518e99d7..b6d0f93cbba 100644
--- a/libmysql/Makefile.shared
+++ b/libmysql/Makefile.shared
@@ -20,8 +20,6 @@
MYSQLDATAdir = $(localstatedir)
MYSQLSHAREdir = $(pkgdatadir)
MYSQLBASEdir= $(prefix)
-INCLUDES = -I$(srcdir)/../include -I../include \
- -I$(srcdir)/.. -I$(top_srcdir) -I..
## We'll use CLIENT_EXTRA_LDFLAGS for threaded and non-threaded
## until someone complains that they need separate options.
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(target)
diff --git a/libmysql_r/Makefile.am b/libmysql_r/Makefile.am
index 424e6bdf854..110e26797bd 100644
--- a/libmysql_r/Makefile.am
+++ b/libmysql_r/Makefile.am
@@ -15,15 +15,29 @@
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
-# This file is public domain and comes with NO WARRANTY of any kind
+
target = libmysqlclient_r.la
target_defs =
## LIBS = @LIBS@
+INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include \
+ -I$(srcdir)/.. -I$(top_srcdir) -I..
+
## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include
include $(top_srcdir)/libmysql/Makefile.shared
+# Don't depend on files in pthread library
+OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\
+ __math.h time.h __time.h unistd.h __unistd.h types.h \
+ xtypes.h ac-types.h posix.h string.h __string.h \
+ errno.h socket.h inet.h dirent.h netdb.h \
+ cleanup.h cond.h debug_out.h fd.h kernel.h mutex.h \
+ prio_queue.h pthread_attr.h pthread_once.h queue.h\
+ sleep.h specific.h version.h pwd.h timers.h uio.h \
+ cdefs.h machdep.h signal.h __signal.h util.h lex.h \
+ wait.h
+
libmysql_dir = $(top_srcdir)/libmysql
libmysqlclient_r_la_SOURCES = $(target_sources)
diff --git a/scripts/safe_mysqld.sh b/scripts/safe_mysqld.sh
index c2da0f2ea73..55147a84852 100755
--- a/scripts/safe_mysqld.sh
+++ b/scripts/safe_mysqld.sh
@@ -26,6 +26,7 @@ parse_arguments() {
--datadir=*) DATADIR=`echo "$arg" | sed -e "s;--datadir=;;"` ;;
--pid-file=*) pid_file=`echo "$arg" | sed -e "s;--pid-file=;;"` ;;
--socket=*) MYSQL_UNIX_PORT=`echo "$arg" | sed -e "s;--socket=;;"` ;;
+ --port=*) MYSQL_TCP_PORT=`echo "$arg" | sed -e "s;--socket=;;"` ;;
--log=*) log=`echo "$arg" | sed -e "s;--log=;;"` ;;
--err-log=*) err_log=`echo "$arg" | sed -e "s;--err-log=;;"` ;;
--basedir=*) MY_BASEDIR_VERSION=`echo "$arg" | sed -e "s;--basedir=;;"` ;;
@@ -95,7 +96,7 @@ else
fi
export MYSQL_UNIX_PORT
-#export MYSQL_TCP_PORT
+export MYSQL_TCP_PORT
touch $err_log; chown $user $err_log
#