compile-linux-tools 1.53 KB
Newer Older
1
#! /bin/sh
unknown's avatar
unknown committed
2

3
# debug
unknown's avatar
unknown committed
4 5
#set -x

6 7 8
# stop on errors
set -e

unknown's avatar
unknown committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
if test ! -r ./sql/mysqld.cc
then
  echo "you must start from the top source directory"
  exit 1
fi

path=`dirname $0`

# clean
if test -e "Makefile"; then make -k clean; fi

# remove files
rm -f */.deps/*.P
rm -f */*.linux

# run autotools
. $path/compile-AUTOTOOLS

# configure
./configure --without-innodb --without-docs

# build	tools only
unknown's avatar
unknown committed
31 32
make clean
make
unknown's avatar
unknown committed
33 34 35 36

# Create mysql_version.h which was deleted my previous step
./config.status include/mysql_version.h
                                                                                                                             
unknown's avatar
unknown committed
37 38 39
(cd dbug; make libdbug.a)
(cd strings; make libmystrings.a)
(cd mysys; make libmysys.a)
unknown's avatar
unknown committed
40
(cd storage/heap; make libheap.a)
unknown's avatar
unknown committed
41 42
(cd vio; make libvio.a)
(cd regex; make libregex.a)
unknown's avatar
unknown committed
43 44
(cd storage/myisam; make libmyisam.a)
(cd storage/myisammrg; make libmyisammrg.a)
unknown's avatar
unknown committed
45 46 47
(cd extra; make comp_err)
(cd libmysql; make conf_to_src)
(cd libmysql_r; make conf_to_src)
48 49
# so the file will be linked
(cd sql; make sql_yacc.cc)
unknown's avatar
unknown committed
50 51 52
(cd sql; make gen_lex_hash)
(cd strings; make conf_to_src)

53 54 55
# so the file will be linked
(cd sql; make sql_yacc.cc)

56 57 58
# we need initilizing SQL files.
(cd netware; make test_db.sql init_db.sql)

unknown's avatar
unknown committed
59 60 61
# copying required linux tools
cp extra/comp_err extra/comp_err.linux
cp libmysql/conf_to_src libmysql/conf_to_src.linux
unknown's avatar
unknown committed
62
#cp libmysql_r/conf_to_src libmysql_r/conf_to_src.linux
unknown's avatar
unknown committed
63
cp sql/gen_lex_hash sql/gen_lex_hash.linux
unknown's avatar
unknown committed
64 65
cp strings/conf_to_src strings/conf_to_src.linux

unknown's avatar
unknown committed
66 67
# Delete mysql_version.h
rm -f include/mysql_version.h