lua: refactor without useless define's

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Francois Perrad 2012-09-03 20:58:41 +00:00 committed by Peter Korsgaard
parent 76983349cf
commit 53adfc5f49

View File

@ -42,39 +42,21 @@ define HOST_LUA_BUILD_CMDS
PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all
endef
define LUA_INSTALL_STAGING_SHARED_LIB
$(INSTALL) -m 0755 -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
define LUA_INSTALL_STAGING_CMDS
$(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \
$(STAGING_DIR)/usr/lib/pkgconfig/lua.pc
$(INSTALL) -m 0644 -D $(@D)/src/liblua.a $(STAGING_DIR)/usr/lib/liblua.a
$(INSTALL) -m 0755 -D $(@D)/src/lua $(STAGING_DIR)/usr/bin/lua
$(INSTALL) -m 0755 -D $(@D)/src/luac $(STAGING_DIR)/usr/bin/luac
$(INSTALL) -m 0755 -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
$(INSTALL) -m 0644 -D $(@D)/src/liblua.a $(STAGING_DIR)/usr/lib/liblua.a
$(INSTALL) -m 0644 -D $(@D)/src/lua.h $(STAGING_DIR)/usr/include/lua.h
$(INSTALL) -m 0644 -D $(@D)/src/luaconf.h $(STAGING_DIR)/usr/include/luaconf.h
$(INSTALL) -m 0644 -D $(@D)/src/lualib.h $(STAGING_DIR)/usr/include/lualib.h
$(INSTALL) -m 0644 -D $(@D)/src/lauxlib.h $(STAGING_DIR)/usr/include/lauxlib.h
endef
define LUA_INSTALL_INTERPRETER
$(INSTALL) -m 0755 -D $(@D)/src/lua $(TARGET_DIR)/usr/bin/lua
endef
define LUA_INSTALL_COMPILER
$(INSTALL) -m 0755 -D $(@D)/src/luac $(TARGET_DIR)/usr/bin/luac
endef
define LUA_INSTALL_LIBRARY
$(INSTALL) -m 0755 -D $(@D)/src/liblua.so.$(LUA_VERSION) \
$(TARGET_DIR)/usr/lib/liblua.so.$(LUA_VERSION)
ln -sf liblua.so.$(LUA_VERSION) $(TARGET_DIR)/usr/lib/liblua.so
$(INSTALL) -m 0644 -D $(@D)/src/liblua.a $(TARGET_DIR)/usr/lib/liblua.a
endif
ifeq ($(BR2_HAVE_DEVFILES),y)
define LUA_INSTALL_DEVFILES
$(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \
@ -86,10 +68,14 @@ define LUA_INSTALL_DEVFILES
endef
endif
define LUA_INSTALL_TARGET_CMDS
$(LUA_INSTALL_INTERPRETER)
$(LUA_INSTALL_COMPILER)
$(LUA_INSTALL_LIBRARY)
$(INSTALL) -m 0755 -D $(@D)/src/lua $(TARGET_DIR)/usr/bin/lua
$(INSTALL) -m 0755 -D $(@D)/src/luac $(TARGET_DIR)/usr/bin/luac
$(INSTALL) -m 0755 -D $(@D)/src/liblua.so.$(LUA_VERSION) \
$(TARGET_DIR)/usr/lib/liblua.so.$(LUA_VERSION)
ln -sf liblua.so.$(LUA_VERSION) $(TARGET_DIR)/usr/lib/liblua.so
$(INSTALL) -m 0644 -D $(@D)/src/liblua.a $(TARGET_DIR)/usr/lib/liblua.a
$(LUA_INSTALL_DEVFILES)
endef