summaryrefslogtreecommitdiff
path: root/mysql/buildfile
diff options
context:
space:
mode:
Diffstat (limited to 'mysql/buildfile')
-rw-r--r--mysql/buildfile269
1 files changed, 0 insertions, 269 deletions
diff --git a/mysql/buildfile b/mysql/buildfile
deleted file mode 100644
index 513eda9..0000000
--- a/mysql/buildfile
+++ /dev/null
@@ -1,269 +0,0 @@
-# file : mysql/buildfile
-# copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
-# license : GPLv2 with FOSS License Exception; see accompanying COPYING file
-
-# Windows-specific utilities.
-#
-mysys_win32 = my_winerr my_winfile
-
-# Windows-specific named pipe and shared memory based communication channels.
-#
-vio_win32 = viopipe vioshm
-
-lib{mysqlclient}: {h }{* -version} \
- {h }{ version} \
- zlib/{h c }{* } \
- strings/{h c }{* } \
- atomic/{h }{* } \
- mysys/{h c }{* -posix_timers -{$mysys_win32}} \
- mysys_ssl/{h cxx}{* } \
- extra/yassl/{h c hxx cxx}{** } \
- vio/{h c }{* -{$vio_win32}} \
- sql/{h c hxx cxx}{** } \
- sql-common/{h c hxx cxx}{* } \
- libmysql/{h c }{* } \
- mysql/{h }{** }
-
-tclass = $c.target.class
-tsys = $c.target.system
-
-linux = ($tclass == 'linux')
-bsd = ($tclass == 'bsd')
-windows = ($tclass == 'windows')
-
-gcc = ($c.class == 'gcc')
-msvc = ($c.class == 'msvc')
-
-lib{mysqlclient}: mysys/c{posix_timers}: include = $linux
-
-lib{mysqlclient}: mysys/{ c }{$mysys_win32} \
- vio/{ c }{$vio_win32 } \
- libmysql/authentication_win/{h cxx}{* } \
- libmysql/def{libmysql_exports_win32}: include = $windows
-
-# Makes sense to distribute READMEs and licenses for the bundled libraries.
-#
-lib{mysqlclient}: zlib/file{README* } \
- extra/yassl/file{README COPYING FLOSS-EXCEPTIONS} \
- extra/yassl/taocrypt/file{README COPYING }
-
-# Include the generated version header into the distribution (so that we
-# don't pick up an installed one) and don't remove it when cleaning in src (so
-# that clean results in a state identical to distributed).
-#
-# @@ We should probably allow to configure MYSQL_UNIX_ADDR via configuration
-# variable config.libmysqlclient.unix_addr. Note that it is set differently
-# for the upstream package and major Linux distributions:
-#
-# Debian/Ubuntu: /var/run/mysqld/mysqld.sock
-# Fedora/RHEL: /var/lib/mysql/mysql.sock
-# Source package: /tmp/mysql.sock
-#
-h{version}: in{version} $src_root/manifest
-h{version}:
-{
- dist = true
- clean = ($src_root != $out_root)
-
- in.symbol = '@'
-
- PROTOCOL_VERSION = $protocol_version
- VERSION = $version.project
- MYSQL_BASE_VERSION = "$version.major.$version.minor"
- MYSQL_VERSION_MAJOR = $version.major
- MYSQL_VERSION_MINOR = $version.minor
- MYSQL_SERVER_SUFFIX = ''
- DOT_FRM_VERSION = 6 # File format (server-related).
-
- MYSQL_VERSION_ID = \
- "\(10000 * $version.major + 100 * $version.minor + $version.patch\)"
-
- MYSQL_TCP_PORT = 3306
- MYSQL_TCP_PORT_DEFAULT = 0
- MYSQL_UNIX_ADDR = ($windows ? '' : /tmp/mysql.sock)
- COMPILATION_COMMENT = 'Source distribution'
- SYS_SCHEMA_VERSION = '1.5.1' # Server-related.
- MACHINE_TYPE = $c.target.cpu
- SYSTEM_TYPE = $tsys
-
- DEFAULT_BASEDIR = ($install.root != [null] \
- ? $regex.replace("$install.resolve($install.root)", \
- '\\', \
- '/') \
- : '')
-
- PLUGINDIR = ($install.root != [null] \
- ? $regex.replace($install.resolve($install.lib)/mysql/plugin, \
- '\\', \
- '/') \
- : '')
-
- SHAREDIR = ($install.root != [null] \
- ? $regex.replace($install.resolve($install.data_root)/share/mysql, \
- '\\', \
- '/') \
- : '')
-}
-
-# Build options.
-#
-# We have dropped the macro definitions that are not used in the package code:
-#
-# -DHAVE_LIBEVENT1
-#
-cc.poptions += -DHAVE_CONFIG_H -DDBUG_OFF
-
-if! $windows
-{
- cc.poptions += -D_FILE_OFFSET_BITS=64
-
- if $linux
- cc.poptions += -D_GNU_SOURCE
-}
-else
-{
- # Note that the original package defines the WIN32 macro for VC only,
- # relying on the fact that MinGW GCC defines it by default. However, the
- # macro disappears from the default ones if to compile with -std=c9x (as we
- # do). So we define it for both VC and MinGW GCC (though libmysqlclient
- # doesn't support building with MinGW GCC at the moment).
- #
- cc.poptions += -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -DNOGDI -DNOMINMAX \
- -DWIN32_LEAN_AND_MEAN -D_MBCS
-}
-
-# Note that we add "-I$src_root" for the headers auto-generating machinery to
-# work properly.
-#
-cc.poptions =+ "-I$out_root" "-I$src_root" "-I$src_base"
-
-zlib_poptions = "-I$src_base/zlib"
-strings_poptions = "-I$src_base/strings"
-mysys_poptions = "-I$src_base/mysys"
-
-# To keep "-I$out_root" "-I$src_root" first we use '+=', rather than '=+' to
-# append poptions for the target wildcards.
-#
- zlib/ cc.poptions += $zlib_poptions
- mysys/ cc.poptions += $mysys_poptions $zlib_poptions
-strings/ cc.poptions += $strings_poptions -DDISABLE_MYSQL_THREAD_H
-
-yassl_dir = $src_base/extra/yassl
-taocrypt_dir = $yassl_dir/taocrypt
-
-taocrypt_poptions = "-I$taocrypt_dir/include" "-I$taocrypt_dir/mySTL" \
- -DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL \
- -DMULTI_THREADED
-
-yassl_poptions = "-I$yassl_dir/include" $taocrypt_poptions
-
-extra/yassl/
-{
- taocrypt/ cc.poptions += $taocrypt_poptions
-
- cc.poptions += -Dget_tty_password=yassl_mysql_get_tty_password \
- -Dget_tty_password_ext=yassl_mysql_get_tty_password_ext \
- $yassl_poptions
-}
-
- vio/ cc.poptions += "-I$src_base" $yassl_poptions
-mysys_ssl/ cc.poptions += "-I$src_base" $yassl_poptions $mysys_poptions
-
-# The CLIENT_PROTOCOL_TRACING macro seems to be required for debugging only.
-# However, the compilation falls apart if undefined, so we keep it.
-#
-sql_poptions = "-I$src_base/sql" "-I$src_base/libmysql" \
- -DCLIENT_PROTOCOL_TRACING \
- $yassl_poptions $zlib_poptions $strings_poptions
-
-if $windows
- sql_poptions += -DAUTHENTICATION_WIN
-
-sql/ cc.poptions += $sql_poptions
-sql-common/ cc.poptions += $sql_poptions
-libmysql/ cc.poptions += $sql_poptions
-
-# The upstream package always adds -DDEBUG_ERRROR_LOG -DWINAUTH_USE_DBUG_LIB.
-# Looks like they are required for debugging only, so let's omit them.
-#
-if $windows
- libmysql/authentication_win/ cc.poptions += -DSECURITY_WIN32
-
-if $msvc
-{
- # Disable warnings that pop up with /W3.
- #
- cc.coptions += /wd4311 /wd4113 /wd4996 /wd4244 /wd4267 /wd4334 /wd4800 /wd4091
-}
-elif $gcc
-{
- # We don't care about C++ ABI specification conformance, especially given
- # that only C functions are exported. So we omit -fabi-version=2.
- #
- cc.coptions += -fno-omit-frame-pointer -fno-strict-aliasing
-
- # Disable warnings that pop up with -Wall -Wextra. Upstream doesn't seem to
- # care about these and it is not easy to disable specific warnings in a way
- # that works across compilers/version (some -Wno-* options are only
- # recognized in newer versions). There are still some warnings left that
- # appear for certain platforms/compilers. We pass them through but disable
- # treating them as errors.
- #
- cc.coptions += -Wno-all -Wno-extra -Wno-error
-}
-
-if! $windows
-{
- # On Linux the upstream package also passes the cmake-generated
- # libmysql.ver file. The symbols it contains are hard-coded into
- # libmysql/CMakeList.txt. We have dropped the file for now.
- #
- if $linux
- {
- # Make sure all symbols are resolvable.
- #
- libs{mysqlclient}: cc.loptions += -Wl,--no-undefined
- }
-
- cc.libs += ($bsd ? -lexecinfo : -ldl) -lpthread -lm
-
- if $linux
- cc.libs += -lrt # Posix timers.
-}
-else
- cc.libs += advapi32.lib
-
-# Export options.
-#
-# The library clients must include the API header as <mysql/mysql.h>.
-#
-lib{mysqlclient}: cc.export.poptions = "-I$out_root" "-I$src_root"
-
-# See bootstrap.build for details.
-#
-if $version.pre_release
- lib{mysqlclient}: bin.lib.version = @"-$version.project_id"
-else
- lib{mysqlclient}: bin.lib.version = @"-$abi_version"
-
-# Let's install the bare minimum of headers: mysql.h, errmsg.h, mysqld_error.h
-# and headers they recursively include.
-#
-h{*}: install = false
-hxx{*}: install = false
-
-# Install into the mysql/ subdirectory of, say, /usr/include/.
-#
-# @@ Fix once LHS pair generation is implemented.
-#
-for h: mysql errmsg mysqld_error mysql_time mysql_version mysql_com \
- my_list my_alloc my_command binary_log_types typelib \
- mysql/client_plugin mysql/plugin_auth_common \
- mysql/psi/psi_base mysql/psi/psi_memory
-{
- d = $path.directory($h)
-
- h{$h}@./$d: install = include/mysql/$d
-}
-
-h{version}: install = include/mysql/