summaryrefslogtreecommitdiffstats
path: root/package/mysql/mysql.mk
diff options
context:
space:
mode:
authorMarcelo Gutierrez <kuyurix@gmail.com>2014-02-12 22:39:33 +0000
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-03-03 23:13:18 +0100
commitf7aa61c6f93981c94bafc4cc98bf7788c5c08a68 (patch)
tree235b2a45946049230e64b2d4d8114e399af7030d /package/mysql/mysql.mk
parent5412b62d196445b3ae842d993571ef7799adbd7a (diff)
downloadbuildroot-f7aa61c6f93981c94bafc4cc98bf7788c5c08a68.tar.gz
buildroot-f7aa61c6f93981c94bafc4cc98bf7788c5c08a68.zip
mysql: add option to build the server
Signed-off-by: Marcelo Gutierrez (UTN/FRH) <kuyurix@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/mysql/mysql.mk')
-rw-r--r--package/mysql/mysql.mk46
1 files changed, 45 insertions, 1 deletions
diff --git a/package/mysql/mysql.mk b/package/mysql/mysql.mk
index 9b22c2d699..27afc9f864 100644
--- a/package/mysql/mysql.mk
+++ b/package/mysql/mysql.mk
@@ -25,7 +25,6 @@ MYSQL_CONF_ENV = \
MYSQL_CONF_OPT = \
--without-ndb-binlog \
- --without-server \
--without-docs \
--without-man \
--without-libedit \
@@ -34,6 +33,50 @@ MYSQL_CONF_OPT = \
--enable-thread-safe-client \
$(ENABLE_DEBUG)
+ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y)
+MYSQL_DEPENDENCIES += host-mysql host-bison
+HOST_MYSQL_DEPENDENCIES =
+
+HOST_MYSQL_CONF_OPT = \
+ --with-embedded-server
+
+MYSQL_CONF_OPT += \
+ --disable-dependency-tracking \
+ --with-atomic-ops=up \
+ --with-embedded-server \
+ --without-query-cache \
+ --without-plugin-partition \
+ --without-plugin-daemon_example \
+ --without-plugin-ftexample \
+ --without-plugin-archive \
+ --without-plugin-blackhole \
+ --without-plugin-example \
+ --without-plugin-federated \
+ --without-plugin-ibmdb2i \
+ --without-plugin-innobase \
+ --without-plugin-innodb_plugin \
+ --without-plugin-ndbcluster
+
+define HOST_MYSQL_BUILD_CMDS
+ $(MAKE) -C $(@D)/include my_config.h
+ $(MAKE) -C $(@D)/mysys libmysys.a
+ $(MAKE) -C $(@D)/strings libmystrings.a
+ $(MAKE) -C $(@D)/vio libvio.a
+ $(MAKE) -C $(@D)/dbug libdbug.a
+ $(MAKE) -C $(@D)/regex libregex.a
+ $(MAKE) -C $(@D)/sql gen_lex_hash
+endef
+
+define HOST_MYSQL_INSTALL_CMDS
+ $(INSTALL) -m 0755 $(@D)/sql/gen_lex_hash $(HOST_DIR)/usr/bin/
+endef
+
+else
+MYSQL_CONF_OPT += \
+ --without-server
+endif
+
+
define MYSQL_REMOVE_TEST_PROGS
rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench
endef
@@ -46,3 +89,4 @@ MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_REMOVE_TEST_PROGS
MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_MYSQL_LIB_PATH
$(eval $(autotools-package))
+$(eval $(host-autotools-package))
OpenPOWER on IntegriCloud