mariadb/Build-tools/Do-all-build-steps

104 lines
2.1 KiB
Text
Raw Normal View History

#!/bin/sh
2000-07-31 21:29:14 +02:00
WD=`pwd`
2000-08-30 23:52:33 +02:00
# Don't write a wrong path for BD !!!!!
if [ -w /my/tmp ]
then
BD=/my/tmp/BUILD
elif [ -n "$TMPDIR" ]
then
BD=$TMPDIR/BUILD
else
BD=/tmp/BUILD
fi
2000-07-31 21:29:14 +02:00
TMP_SCRIPT=$WD/Logs/00-temp-for-do-all-build-steps.$$
# We build on work
to_host=`hostname`
cc=gcc
ccc=gcc
EXTRA_CONFIG="--without-perl"
AM_MAKEFLAGS="-j 2"
2000-07-31 21:29:14 +02:00
echo "Building on $to_host"
2000-08-30 23:52:33 +02:00
rm -rf $BD/*
2000-09-01 00:53:34 +02:00
rm -f $WD/binary/*
mkdir -p $WD/binary
mkdir -p $WD/Logs
2000-08-30 17:49:25 +02:00
mkdir -p $BD/Logs
2000-07-31 21:29:14 +02:00
cat > $TMP_SCRIPT <<END
# Show executed commands
set -x
# Move to the right place
cd "$WD"
2000-08-30 17:49:25 +02:00
# Create a build directory tree
2000-09-07 14:43:46 +02:00
bk export $BD
2000-08-30 17:49:25 +02:00
cd "$BD"
2000-09-08 09:49:25 +02:00
chmod -R u+rw,g+rw .
2000-07-31 21:29:14 +02:00
# Make it easy to remove an old build
2000-08-30 23:52:33 +02:00
umask 002
2000-07-31 21:29:14 +02:00
CC=$cc CXX=$ccc
export CC CXX
gmake -j 2 -k distclean
2000-07-31 21:29:14 +02:00
rm -f NEW-RPMS/*
# Stop on error
set -e
/bin/rm -f */.deps/*.P
/bin/rm -f config.cache
aclocal; autoheader; aclocal; automake; autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
2000-07-31 21:29:14 +02:00
2001-04-13 15:21:38 +02:00
# A normal user starts here. We must use mit-threads, bdb and innodb.
2001-03-07 22:47:51 +01:00
# Otherwise they do not end up in the distribution.
2000-07-31 21:29:14 +02:00
./configure \
--with-unix-socket-path=/var/tmp/mysql.sock \
--with-low-memory \
2000-08-30 23:52:33 +02:00
--with-mit-threads=yes $EXTRA_CONFIG \
--enable-thread-safe-client \
--with-berkeley-db \
2001-04-13 15:21:38 +02:00
--with-innodb
2000-07-31 21:29:14 +02:00
2000-12-14 02:29:38 +01:00
gmake -j 2
2000-07-31 21:29:14 +02:00
time gmake -j 2 distcheck \
2000-07-31 21:29:14 +02:00
EXTRA_CONF_ARGS="--with-unix-socket-path=/var/tmp/mysql.sock --with-low-memory $EXTRA_CONFIG"
2000-08-30 17:49:25 +02:00
sh $BD/Build-tools/Do-rpm
2000-07-31 21:29:14 +02:00
rm -f $TMP_SCRIPT
END
set -e
2000-07-31 21:29:14 +02:00
log=$WD/Logs/Log-distcheck-`date +%y%m%d-%H%M`
echo "Logging script $TMP_SCRIPT into $log"
2000-07-31 21:29:14 +02:00
if test $to_host = "mysql-work"
then
# Try to get the right user for MySQL builds on work so that all
# files is owned by the same user (mysql)
ssh -n $to_host -l my "time sh $TMP_SCRIPT" > $log 2>&1
2000-07-31 21:29:14 +02:00
else
time sh $TMP_SCRIPT > $log 2>&1
2000-07-31 21:29:14 +02:00
fi
# Create a commercial MySQL distribution (mysqlcom-VER.tar.gz) from
# the newly made source distribution
2000-08-30 23:52:33 +02:00
cd "$BD"
2000-07-31 21:29:14 +02:00
DIST=`ls -t mysql-*.tar.gz | head -1`
2000-08-30 23:52:33 +02:00
$BD/Build-tools/mysql-copyright --target=. $DIST
2000-09-01 00:53:34 +02:00
# move the binaries to the 'binary' directory
mv $BD/mysql*tar.gz $WD/binary
mv $BD/NEW-RPMS/* $WD/binary