diff options
author | unknown <tim@cane.mysql.fi> | 2000-12-18 23:24:19 +0200 |
---|---|---|
committer | unknown <tim@cane.mysql.fi> | 2000-12-18 23:24:19 +0200 |
commit | 447b5534d02b99327d73ac15edb43bcf5d793e7e (patch) | |
tree | 144029d1dacb5aaa27e21b64dbfc97258409e2ab | |
parent | 7cdb2b2d1d1efef069a305d130abf57d099c790e (diff) | |
download | mariadb-git-447b5534d02b99327d73ac15edb43bcf5d793e7e.tar.gz |
- cleaned up BUILD scripts
- consolidate common functionality into one place
- make them detect gmake/make
BUILD/compile-alpha:
- cleaned up BUILD scripts
- consolidate common functionality into one place
- make them detect gmake/make
BUILD/compile-pentium-debug-no-bdb:
- cleaned up BUILD scripts
- consolidate common functionality into one place
- make them detect gmake/make
BUILD/compile-pentium-debug:
- cleaned up BUILD scripts
- consolidate common functionality into one place
- make them detect gmake/make
BUILD/compile-pentium-gcov:
- cleaned up BUILD scripts
- consolidate common functionality into one place
- make them detect gmake/make
BUILD/compile-pentium-myodbc:
- cleaned up BUILD scripts
- consolidate common functionality into one place
- make them detect gmake/make
BUILD/compile-pentium:
- cleaned up BUILD scripts
- consolidate common functionality into one place
- make them detect gmake/make
BUILD/compile-solaris-sparc-purify:
- cleaned up BUILD scripts
- consolidate common functionality into one place
- make them detect gmake/make
BUILD/compile-solaris-sparc:
- cleaned up BUILD scripts
- consolidate common functionality into one place
- make them detect gmake/make
-rw-r--r-- | BUILD/FINISH.sh | 8 | ||||
-rw-r--r-- | BUILD/SETUP.sh | 43 | ||||
-rwxr-xr-x | BUILD/compile-alpha | 14 | ||||
-rwxr-xr-x | BUILD/compile-pentium | 15 | ||||
-rwxr-xr-x | BUILD/compile-pentium-debug | 24 | ||||
-rwxr-xr-x | BUILD/compile-pentium-debug-no-bdb | 22 | ||||
-rwxr-xr-x | BUILD/compile-pentium-gcov | 21 | ||||
-rwxr-xr-x | BUILD/compile-pentium-myodbc | 14 | ||||
-rwxr-xr-x | BUILD/compile-solaris-sparc | 16 | ||||
-rwxr-xr-x | BUILD/compile-solaris-sparc-purify | 18 |
10 files changed, 110 insertions, 85 deletions
diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh new file mode 100644 index 00000000000..39a3dc3f7ef --- /dev/null +++ b/BUILD/FINISH.sh @@ -0,0 +1,8 @@ +cflags="$c_warnings $extra_flags" +cxxflags="$cxx_warnings $base_cxxflags $extra_flags" +configure="./configure $base_configs $extra_configs" + +CFLAGS="$cflags" CXX=gcc CXXFLAGS="$cxxflags" eval "$configure" + +test "$make" = no || $make $AM_MAKEFLAGS +test -z "$strip" || strip mysqld diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh new file mode 100644 index 00000000000..37c3dc2ea37 --- /dev/null +++ b/BUILD/SETUP.sh @@ -0,0 +1,43 @@ +if ! test -f sql/mysqld.cc; then + echo "You must run this script from the MySQL top-level directory" + exit 1 +fi + +set -e # exit on error + +AM_MAKEFLAGS="-j4" # XXX: auto-make uses this variable - export it??? + +# If you are not using codefusion add "-Wpointer-arith" to WARNINGS +# The following warning flag will give too many warnings: +# -Wshadow -Wunused -Winline (The later isn't usable in C++ as +# __attribute()__ doesn't work with gnu C++) +global_warnings="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wuninitialized -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings" +c_warnings="$global_warnings -Wunused" +cxx_warnings="$global_warnings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" + +alpha_cflags="-mcpu=ev6 -Wa,-mev6" # not used yet +pentium_cflags="-mpentiumpro" +sparc_cflags="" + +fast_cflags="-O6 -fomit-frame-pointer" +debug_cflags="-DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -O2" + +base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti" + +base_configs="--prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --disable-shared" +alpha_configs="" # not used yet +pentium_configs="" +sparc_configs="" + +debug_configs="--with-debug" + +if gmake --version > /dev/null 2>&1; then + make=gmake +else + make=make +fi + +$make -k clean || true +/bin/rm -f */.deps/*.P config.cache + +aclocal; autoheader; aclocal; automake; autoconf diff --git a/BUILD/compile-alpha b/BUILD/compile-alpha index ff70be8a5ab..10b9d67e1c1 100755 --- a/BUILD/compile-alpha +++ b/BUILD/compile-alpha @@ -1,7 +1,9 @@ -make -k clean -/bin/rm -f */.deps/*.P */*.o -/bin/rm -f config.cache -aclocal; autoheader; aclocal; automake; autoconf +#! /bin/sh -CFLAGS="-O6 -fomit-frame-pointer -mcpu=ev6 -Wa,-mev6" CXX=gcc CXXFLAGS="-O6 -mcpu=ev6 -Wa,-mev6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex -make +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="$alpha_cflags $fast_cflags" +extra_configs="$alpha_configs" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium b/BUILD/compile-pentium index 2197ca28628..cdbc7e773eb 100755 --- a/BUILD/compile-pentium +++ b/BUILD/compile-pentium @@ -1,9 +1,10 @@ -AM_MAKEFLAGS="-j 2" -make -k clean -/bin/rm -f */.deps/*.P config.cache +#! /bin/sh -aclocal; autoheader; aclocal; automake; autoconf +path=`dirname $0` +. "$path/SETUP.sh" -CFLAGS="-O6 -mpentiumpro -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -mpentiumpro -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-extra-charsets=complex --enable-thread-safe-client -make -j 2 -strip sql/mysqld +extra_flags="$pentium_cflags $fast_cflags" +extra_configs="$pentium_configs" +strip=yes + +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-debug b/BUILD/compile-pentium-debug index beae200ea31..37381cc47df 100755 --- a/BUILD/compile-pentium-debug +++ b/BUILD/compile-pentium-debug @@ -1,21 +1,9 @@ -AM_MAKEFLAGS="-j 2" -make -k clean -/bin/rm -f */.deps/*.P config.cache +#! /bin/sh -aclocal; autoheader; aclocal; automake; autoconf +path=`dirname $0` +. "$path/SETUP.sh" -# If you are not using codefusion add "-Wpointer-arith" to WARNINGS -# The following warning flag will give too many warnings: -# -Wshadow -Wunused -Winline (The later isn't usable in C++ as -# __attribute()__ doesn't work with gnu C++) +extra_flags="$pentium_cflags $debug_cflags" +extra_configs="$pentium_configs $debug_configs" -GLOBAL_WARNINGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wuninitialized -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings" -C_WARNINGS="$GLOBAL_WARNINGS -Wunused" -CC_WARNINGS="$GLOBAL_WARNINGS -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" - - -CFLAGS="-DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -O2 -mpentiumpro $C_WARNINGS" CXX=gcc \ -CXXFLAGS="-DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -O2 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti $CC_WARNINGS" \ -./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-extra-charsets=complex --with-debug=full \ ---with-berkeley-db=/usr/local/BerkeleyDB -make -j 2 +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-debug-no-bdb b/BUILD/compile-pentium-debug-no-bdb index b7f931a6718..fad58bec437 100755 --- a/BUILD/compile-pentium-debug-no-bdb +++ b/BUILD/compile-pentium-debug-no-bdb @@ -1,19 +1,9 @@ -make -k clean -/bin/rm -f */.deps/*.P config.cache +#! /bin/sh -aclocal; autoheader; aclocal; automake; autoconf +path=`dirname $0` +. "$path/SETUP.sh" -# If you are not using codefusion add "-Wpointer-arith" to WARNINGS -# The following warning flag will give too many warnings: -# -Wshadow -Wunused -Winline (The later isn't usable in C++ as -# __attribute()__ doesn't work with gnu C++) +extra_flags="$pentium_cflags $debug_cflags" +extra_configs="$pentium_configs $debug_configs --without-berkeley-db" -GLOBAL_WARNINGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wuninitialized -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings" -C_WARNINGS="$GLOBAL_WARNINGS -Wunused" -CC_WARNINGS="$GLOBAL_WARNINGS -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" - - -CFLAGS="-DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -O2 -mpentiumpro $C_WARNINGS" CXX=gcc \ -CXXFLAGS="-DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -O2 -mpentiumpro -felide-constructors -fno-exceptions -fno-rtti $CC_WARNINGS" \ -./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-extra-charsets=complex --with-debug=full -make +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-gcov b/BUILD/compile-pentium-gcov index 2137798389b..4cb4ddb8057 100755 --- a/BUILD/compile-pentium-gcov +++ b/BUILD/compile-pentium-gcov @@ -1,18 +1,9 @@ -AM_MAKEFLAGS="-j 2" -make -k clean -/bin/rm -f */.deps/*.P config.cache +#! /bin/sh -aclocal; autoheader; aclocal; automake; autoconf +path=`dirname $0` +. "$path/SETUP.sh" -# If you are not using codefusion add "-Wpointer-arith" to WARNINGS -# The following warning flag will give too many warnings: -# -Wshadow -Wunused (The later isn't usable in C++ as -# __attribute()__ doesn't work with gnu C++) - -GLOBAL_WARNINGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wuninitialized -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings" -C_WARNINGS="$GLOBAL_WARNINGS -Wunused" -CC_WARNINGS="$GLOBAL_WARNINGS -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" - -CFLAGS="-O2 -mpentiumpro -fprofile-arcs -ftest-coverage $C_WARNINGS" CXX=gcc CXXFLAGS="-O2 -mpentiumpro -fprofile-arcs -ftest-coverage -felide-constructors -fno-exceptions -fno-rtti $CC_WARNINGS" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-extra-charsets=complex --with-debug=full -make -j 2 +extra_flags="$pentium_cflags -O2 -fprofile-arcs -ftest-coverage" +extra_configs="$pentium_configs $debug_configs" +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-myodbc b/BUILD/compile-pentium-myodbc index 989f98eac60..4fcfc7e49dc 100755 --- a/BUILD/compile-pentium-myodbc +++ b/BUILD/compile-pentium-myodbc @@ -1,6 +1,12 @@ -make -k clean -/bin/rm -f */.deps/*.P config.cache +#! /bin/sh -aclocal; autoheader; aclocal; automake; autoconf +path=`dirname $0` +. "$path/SETUP.sh" -CFLAGS="-O6 -mpentiumpro -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -mpentiumpro -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --with-extra-charsets=complex --without-server +extra_flags="$pentium_cflags $fast_cflags" +extra_configs="$pentium_configs --without-server" + +make=no +strip=yes + +. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-sparc b/BUILD/compile-solaris-sparc index d234fb2ab9c..0558cfda25d 100755 --- a/BUILD/compile-solaris-sparc +++ b/BUILD/compile-solaris-sparc @@ -1,9 +1,9 @@ -gmake -k clean -/bin/rm -f */.deps/*.P */*.o -/bin/rm -f config.cache -aclocal; autoheader; aclocal; automake; autoconf +#! /bin/sh -CFLAGS="-O6 -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -fomit-frame-pointer -f -elide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/m -ysql --with-extra-charsets=complex -gmake +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="$sparc_cflags $fast_cflags" +extra_configs="$sparc_configs" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-sparc-purify b/BUILD/compile-solaris-sparc-purify index 2a48d71375d..bad8a569ea3 100755 --- a/BUILD/compile-solaris-sparc-purify +++ b/BUILD/compile-solaris-sparc-purify @@ -1,13 +1,9 @@ -gmake -k clean -/bin/rm -f */.deps/*.P */*.o -/bin/rm -f config.cache -aclocal; autoheader; aclocal; automake; autoconf +#! /bin/sh -GLOBAL_WARNINGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wuninitialized -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings" -C_WARNINGS="$GLOBAL_WARNINGS -Wunused" -CC_WARNINGS="$GLOBAL_WARNINGS -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" +path=`dirname $0` +. "$path/SETUP.sh" -CFLAGS="-DHAVE_PURIFY -O2 $C_WARNINGS" CXX=gcc \ -CXXFLAGS="-DHAVE_PURIFY -O2 -felide-constructors -fno-exceptions -fno-rtti $CC_WARNINGS" \ -./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-debug=full -gmake +extra_flags="$sparc_cflags -DHAVE_PURIFY -O2" +extra_configs="$sparc_configs --with-debug=full" + +. "$path/FINISH.sh" |