mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 21:42:35 +01:00
9d9b533fed
git-svn-id: file:///svn/mysql/tokudb-engine/src@3190 c7de825b-a66e-492c-adef-691d508d4ae1
51 lines
1.3 KiB
Bash
Executable file
51 lines
1.3 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# create the Makefile from the Makefile.tokutek template and some
|
|
# command line parameters
|
|
|
|
tokudb=/usr/local/tokudb
|
|
mysql=/usr/local/mysql
|
|
libdir=/usr/local/mysql/lib
|
|
|
|
while [ $# -gt 0 ] ; do
|
|
arg=$1; shift
|
|
if [[ $arg =~ "--with-tokudb=(.*)" ]] ; then
|
|
tokudb=${BASH_REMATCH[1]}
|
|
fi
|
|
if [[ $arg =~ "--with-mysql=(.*)" ]] ; then
|
|
mysql=${BASH_REMATCH[1]}
|
|
fi
|
|
if [[ $arg =~ "--libdir=(.*)" ]] ; then
|
|
libdir=${BASH_REMATCH[1]}
|
|
fi
|
|
done
|
|
|
|
error=0
|
|
if [ ! -d $tokudb ] ; then
|
|
echo $tokudb missing
|
|
# error=1
|
|
fi
|
|
if [ ! -d $mysql ] ; then
|
|
echo $mysql missing
|
|
error=1
|
|
fi
|
|
if [ ! -d $libdir ] ; then
|
|
echo $libdir missing
|
|
error=1
|
|
fi
|
|
if [ $error -ne 0 ] ; then exit 1 ; fi
|
|
|
|
tokudb_version=`basename $tokudb`
|
|
# escape the path names so that the sed works
|
|
# note: i was not smart enough to get this right without a sequence of experiments
|
|
tokudb=`echo $tokudb | sed -e s/\\\//\\\\\\\\\\\//g`
|
|
# echo $tokudb
|
|
mysql=`echo $mysql | sed -e s/\\\//\\\\\\\\\\\//g`
|
|
# echo $mysql
|
|
libdir=`echo $libdir | sed -e s/\\\//\\\\\\\\\\\//g`
|
|
# echo $libdir
|
|
|
|
sed -e "s/^TOKUDB =\(.*\)$/TOKUDB = $tokudb/" \
|
|
-e "s/^MYSQL_SRC = \(.*\)/MYSQL_SRC = $mysql/" \
|
|
-e "s/^MYSQL_LIBDIR = \(.*\)/MYSQL_LIBDIR = $libdir/" \
|
|
-e "s/^TOKUDB_VERSION =\(.*\)/TOKUDB_VERSION = \"$tokudb_version\"/" <Makefile.tokutek >Makefile
|