[Buildroot] [PATCH 3/5] lua : don't install shared library in staging
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Mon Jul 16 15:44:46 UTC 2012
Le Mon, 16 Jul 2012 15:45:50 +0200,
Francois Perrad <fperrad at gmail.com> a écrit :
> dead code, LUA_INSTALL_STAGING_SHARED_LIB not used
> ---
> package/lua/lua.mk | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/package/lua/lua.mk b/package/lua/lua.mk
> index ab9a1a2..5b8022a 100644
> --- a/package/lua/lua.mk
> +++ b/package/lua/lua.mk
> @@ -42,14 +42,6 @@ define HOST_LUA_BUILD_CMDS
> PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all
> endef
>
> -ifeq ($(BR2_PACKAGE_LUA_SHARED_LIBRARY),y)
> -define LUA_INSTALL_STAGING_SHARED_LIB
> - $(INSTALL) -D $(@D)/src/liblua.so.$(LUA_VERSION) \
> - $(STAGING_DIR)/usr/lib/liblua.so.$(LUA_VERSION)
> - ln -sf liblua.so.$(LUA_VERSION)
> $(STAGING_DIR)/usr/lib/liblua.so -endef
> -endif
> -
> define LUA_INSTALL_STAGING_CMDS
> $(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \
> $(STAGING_DIR)/usr/lib/pkgconfig/lua.pc
Doh? The code is probably dead, but the right thing here is not to
remove, but to make it work: the liblua.so.* files *SHOULD* definitely
be installed in the staging directory, just like all other shared
libraries. They are needed so that other packages (that rely on the
Lua shared library) can be linked against this library.
The installation code in this package tries to be smart, but is in fact
very complicated. It should just:
* Install the shared library + .pc file + .h files + .a file to both
the staging directory and target directory, unconditionally
* Install the Lua compiler in the target directory if the compiler is
enabled in the config
* Install the Lua interpreter in the target directory if the
interpreter is enabled in the config.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
More information about the buildroot
mailing list