summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-07-24 10:31:48 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-07-24 10:31:48 -0300
commitf740fbdc854f837d229577c53d85f4ec5b78134d (patch)
treebf450c07ef85807d910a2dcc3cd5ce5cfa4b1d6a /BUILD
parent1a9e4bfaff9330422bd2023c3cd3fa2f376bfd4b (diff)
downloadmariadb-git-f740fbdc854f837d229577c53d85f4ec5b78134d.tar.gz
Add a maintainer target to the warning-mode of the build scripts.
Fix assorted warnings in order for the warning-mode to be effective.
Diffstat (limited to 'BUILD')
-rwxr-xr-xBUILD/SETUP.sh30
1 files changed, 18 insertions, 12 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index b5f1c7b200e..afb8eca08f2 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -15,7 +15,7 @@ Usage: $0 [-h|-n] [configure-options]
-n, --just-print Don't actually run any commands; just print them.
-c, --just-configure Stop after running configure.
--with-debug=full Build with full debug.
- --warning-mode=[old|pedantic]
+ --warning-mode=[old|pedantic|maintainer]
Influences the debug flags. Old is default.
--prefix=path Build with prefix 'path'.
@@ -62,6 +62,7 @@ just_print=
just_configure=
full_debug=
warning_mode=
+maintainer_mode=
parse_options "$@"
@@ -88,7 +89,21 @@ AM_MAKEFLAGS="-j 6"
# Ex --with-ssl=/usr
SSL_LIBRARY=--with-ssl
-if [ "x$warning_mode" != "xpedantic" ]; then
+if [ "x$warning_mode" = "xpedantic" ]; then
+ warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"
+ c_warnings="$warnings"
+ cxx_warnings="$warnings -std=c++98"
+# NOTE: warning mode should not influence optimize/debug mode.
+# Please feel free to add a separate option if you don't feel it's an overkill.
+ debug_extra_cflags="-O0"
+# Reset CPU flags (-mtune), they don't work in -pedantic mode
+ check_cpu_cflags=""
+elif [ "x$warning_mode" = "xmaintainer" ]; then
+ c_warnings="-Wall -Wextra"
+ cxx_warnings="$c_warnings -Wno-unused-parameter"
+ maintainer_mode="--enable-mysql-maintainer-mode"
+ debug_extra_cflags="-g3"
+else
# Both C and C++ warnings
warnings="-Wall -Wextra -Wunused -Wwrite-strings"
@@ -103,15 +118,6 @@ if [ "x$warning_mode" != "xpedantic" ]; then
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
# Added unless --with-debug=full
debug_extra_cflags="-O0 -g3 -gdwarf-2"
-else
- warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"
- c_warnings="$warnings"
- cxx_warnings="$warnings -std=c++98"
-# NOTE: warning mode should not influence optimize/debug mode.
-# Please feel free to add a separate option if you don't feel it's an overkill.
- debug_extra_cflags="-O0"
-# Reset CPU flags (-mtune), they don't work in -pedantic mode
- check_cpu_cflags=""
fi
# Set flags for various build configurations.
@@ -147,7 +153,7 @@ fi
base_configs="--prefix=$prefix --enable-assembler "
base_configs="$base_configs --with-extra-charsets=complex "
base_configs="$base_configs --enable-thread-safe-client "
-base_configs="$base_configs --with-big-tables"
+base_configs="$base_configs --with-big-tables $maintainer_mode"
if test -d "$path/../cmd-line-utils/readline"
then