From patchwork Tue Sep 4 06:58:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francois Perrad X-Patchwork-Id: 181505 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 30DCF2C008F for ; Tue, 4 Sep 2012 16:59:43 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 94929A02CA; Tue, 4 Sep 2012 06:59:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QMXAWASOe-OF; Tue, 4 Sep 2012 06:59:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 17BF3A02DD; Tue, 4 Sep 2012 06:59:08 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 9B58B8F753 for ; Tue, 4 Sep 2012 06:59:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DF4318A9C6 for ; Tue, 4 Sep 2012 06:59:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9O-TuDXZRoSa for ; Tue, 4 Sep 2012 06:59:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by whitealder.osuosl.org (Postfix) with ESMTPS id 6D8F18A3D7 for ; Tue, 4 Sep 2012 06:59:01 +0000 (UTC) Received: by wgbds1 with SMTP id ds1so2608829wgb.4 for ; Mon, 03 Sep 2012 23:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=XSXLoDnq2u7k67AKmVbnSDNlPI0r5yOTcuEEMKJ54r8=; b=y4UVr2zSCLYXN7CKPOY6zV6C82lvR9TYbkC+zQQquYYqqJkEuUbCh6zVEJSFABmSq4 otZHmd1rcgbueSiuWT+vBSRwL4yl3jUiJlQBUODHDckFyxBxer7IBatXMybHXfR7t/wq U5/r+WqToNtH/jXjQnpnNbiy4WYjbeohbO6E9BbXlsv8FBrNPRlJ6eaIH3iNUBuP2Jno +e7onjyy987rFhddufqsuVOesQf09p+2+ZDFCvbHd2kG7qX4js9IDaykmdiQlxaYVsxO +xLJuiyaPfT3BN9/DAskLaQP0Cyb6B9QtbX64cAt/F0InC1+VH0eAl2ZbLrrP79YGX2y athQ== Received: by 10.180.107.103 with SMTP id hb7mr28591928wib.3.1346741939542; Mon, 03 Sep 2012 23:58:59 -0700 (PDT) Received: from xubuntu-12.04 (135.135.193.77.rev.sfr.net. [77.193.135.135]) by mx.google.com with ESMTPS id j6sm34144260wiy.4.2012.09.03.23.58.58 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Sep 2012 23:58:58 -0700 (PDT) From: Francois Perrad To: buildroot@busybox.net Date: Tue, 4 Sep 2012 08:58:41 +0200 Message-Id: <1346741921-28968-5-git-send-email-francois.perrad@gadz.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1346741921-28968-1-git-send-email-francois.perrad@gadz.org> References: <1346741921-28968-1-git-send-email-francois.perrad@gadz.org> Subject: [Buildroot] [PATCH 5/5] lua: refactor without useless define's X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Francois Perrad Acked-by: Arnout Vandecappelle (Essensium/Mind) Tested-by: Arnout Vandecappelle (Essensium/Mind) --- package/lua/lua.mk | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/package/lua/lua.mk b/package/lua/lua.mk index 4704e4c..9e0d387 100644 --- a/package/lua/lua.mk +++ b/package/lua/lua.mk @@ -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