Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] luajit: allow to build Lua extensions without lua
Date: Mon, 4 Mar 2013 22:29:32 +0100	[thread overview]
Message-ID: <20130304222932.40f646b4@skate> (raw)
In-Reply-To: <1355564002-14490-2-git-send-email-francois.perrad@gadz.org>

Dear Francois Perrad,

On Sat, 15 Dec 2012 10:33:22 +0100, Francois Perrad wrote:

> diff --git a/package/Makefile.in b/package/Makefile.in
> index 8dea51e..c19887b 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -307,6 +307,12 @@ else
>  SHARED_STATIC_LIBS_OPTS=--enable-static --enable-shared
>  endif
>  
> +ifeq ($(BR2_PACKAGE_LUA),y)
> +LUA_INTERPRETER = lua
> +else ifeq ($(BR2_PACKAGE_LUAJIT),y)
> +LUA_INTERPRETER = luajit
> +endif

I think what we want instead here is a virtual package, in the sense of
the OpenGL virtual package I proposed in my Qt5 patch set. See
http://git.free-electrons.com/users/thomas-petazzoni/buildroot/commit/?h=qt5&id=31ceec3926db7fea4fa2ac4b328b022bcec97aac.

In your case, it could be package/luainterpreter/Config.in:

config BR2_PACKAGE_HAS_LUA_INTERPRETER
	bool

package/luainterpreter/luainterpreter.mk:

LUAINTERPRETER_SOURCE =

ifeq ($(BR2_PACKAGE_LUA),y)
LUAINTERPRETER_DEPENDENCIES = lua
endif

ifeq ($(BR2_PACKAGE_LUAJIT),y)
LUAINTERPRETER_DEPENDENCIES = luajit
endif

$(eval $(generic-package))

and then package/lua/Config.in and package/luajit/Config.in would
'select BR2_PACKAGE_HAS_LUA_INTERPRETER'.

And all lua modules would do a 'depends on
BR2_PACKAGE_HAS_LUA_INTERPRETER' and have <pkg>_DEPENDENCIES =
luainterpreter in their .mk file.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2013-03-04 21:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-15  9:33 [Buildroot] [PATCH 1/2] lua: remove built dependencies Francois Perrad
2012-12-15  9:33 ` [Buildroot] [PATCH 2/2] luajit: allow to build Lua extensions without lua Francois Perrad
2013-03-04 21:29   ` Thomas Petazzoni [this message]
2013-01-08  7:36 ` [Buildroot] [PATCH 1/2] lua: remove built dependencies François Perrad
2013-03-04 20:48 ` François Perrad
2013-03-04 21:24 ` Thomas Petazzoni

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=20130304222932.40f646b4@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --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