Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/6] package/mysql: unconditionally define host variables
Date: Sun, 15 Nov 2015 17:59:59 +0100	[thread overview]
Message-ID: <5648BA0F.10707@mind.be> (raw)
In-Reply-To: <70800f7df3d1c437d4368d764e26e0e87fa583f3.1447449754.git.yann.morin.1998@free.fr>

On 13-11-15 22:48, Yann E. MORIN wrote:
> To build the host-mysql, we only build parts of the source, just the
> strictly minimum required to then cross-compile it.
> 
> However, the host variables (conf opts, build and install cmds) are only
> defined when the mysql server is enabled in the configuration.
> 
> So, this breaks:
>     make defconfig; make host-mysql
> 
> Even though it is not much use to have that partial host-mysql on its
> own, it is still very interesting to be able to build it, if at least
> for testing changes in the core package infrastructures (like new step
> hooks or the likes...)
> 
> Move the definitions of the host variant out of the server conditional
> block.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Marcelo Guti?rrez(UTN/FRH) <kuyurix@gmail.com>

Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Perhaps it would be a good opportunity to add a comment:

# host-mysql only installs what is needed to build mysql, i.e. the gen_lex_hash
# tool, and it only builds the parts that are needed to create this tool.


 Regards,
 Arnout

> ---
>  package/mysql/mysql.mk | 39 ++++++++++++++++++++-------------------
>  1 file changed, 20 insertions(+), 19 deletions(-)
> 
> diff --git a/package/mysql/mysql.mk b/package/mysql/mysql.mk
> index c6d9f3a..00fab85 100644
> --- a/package/mysql/mysql.mk
> +++ b/package/mysql/mysql.mk
> @@ -33,6 +33,26 @@ MYSQL_CONF_OPTS = \
>  	--enable-thread-safe-client \
>  	--disable-mysql-maintainer-mode
>  
> +HOST_MYSQL_DEPENDENCIES = host-zlib host-ncurses
> +
> +HOST_MYSQL_CONF_OPTS = \
> +	--with-embedded-server \
> +	--disable-mysql-maintainer-mode
> +
> +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
> +
>  ifeq ($(BR2_PACKAGE_OPENSSL),y)
>  MYSQL_DEPENDENCIES += openssl
>  endif
> @@ -43,11 +63,6 @@ endif
>  
>  ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y)
>  MYSQL_DEPENDENCIES += host-mysql host-bison
> -HOST_MYSQL_DEPENDENCIES = host-zlib host-ncurses
> -
> -HOST_MYSQL_CONF_OPTS = \
> -	--with-embedded-server \
> -	--disable-mysql-maintainer-mode
>  
>  MYSQL_CONF_OPTS += \
>  	--localstatedir=/var/mysql \
> @@ -74,20 +89,6 @@ else
>  MYSQL_CONF_OPTS += --without-debug
>  endif
>  
> -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
> -
>  define MYSQL_USERS
>  	mysql -1 nogroup -1 * /var/mysql - - MySQL daemon
>  endef
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  reply	other threads:[~2015-11-15 16:59 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13 21:48 [Buildroot] [PATCH 0/6] core: ditch LD_LIBRARY_PATH (branch yem/no-ld-library-path) Yann E. MORIN
2015-11-13 21:48 ` [Buildroot] [PATCH 1/6] package/axfsutils: fix Makefile Yann E. MORIN
2015-11-15 16:44   ` Arnout Vandecappelle
2015-11-17  9:08   ` Peter Korsgaard
2015-11-13 21:48 ` [Buildroot] [PATCH 2/6] package/mysql: unconditionally define host variables Yann E. MORIN
2015-11-15 16:59   ` Arnout Vandecappelle [this message]
2015-11-17  9:09   ` Peter Korsgaard
2015-11-13 21:48 ` [Buildroot] [PATCH 3/6] package/perl-file-util: remove host variant Yann E. MORIN
2015-11-15 19:19   ` Arnout Vandecappelle
2015-11-17  9:09   ` Peter Korsgaard
2015-11-13 21:48 ` [Buildroot] [PATCH 4/6] package/libcurl: carefully override LD_LIBRARY_PATH Yann E. MORIN
2015-11-15 19:27   ` Arnout Vandecappelle
2015-11-17  9:09   ` Peter Korsgaard
2015-11-13 21:48 ` [Buildroot] [PATCH 5/6] core: check host executables have appropriate RPATH Yann E. MORIN
2015-11-14  9:52   ` Yann E. MORIN
2015-11-15 21:49   ` Arnout Vandecappelle
2015-11-16 23:54     ` Yann E. MORIN
2015-11-18 21:46   ` Peter Korsgaard
2015-11-13 21:48 ` [Buildroot] [PATCH 6/6] core/pkg-infrastructures: remove LD_LIBRARY_PATH from the environment Yann E. MORIN
2015-11-18 21:46   ` Peter Korsgaard
2015-11-15 21:54 ` [Buildroot] [PATCH 0/6] core: ditch LD_LIBRARY_PATH (branch yem/no-ld-library-path) Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5648BA0F.10707@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox