From patchwork Sun Sep 7 09:35:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 386687 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 C6A49140186 for ; Sun, 7 Sep 2014 19:35:35 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E64B194C2F; Sun, 7 Sep 2014 09:35:34 +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 UXVtjtME3Ci2; Sun, 7 Sep 2014 09:35:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E0EEC9439F; Sun, 7 Sep 2014 09:35:32 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 1941B1BF9D3 for ; Sun, 7 Sep 2014 09:35:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 10B8832ED3 for ; Sun, 7 Sep 2014 09:35:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bxlkBlGLoqR3 for ; Sun, 7 Sep 2014 09:35:29 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp3-g21.free.fr (smtp3-g21.free.fr [212.27.42.3]) by silver.osuosl.org (Postfix) with ESMTPS id 9DC6A2F535 for ; Sun, 7 Sep 2014 09:35:29 +0000 (UTC) Received: from localhost.localdomain (unknown [81.57.22.125]) by smtp3-g21.free.fr (Postfix) with ESMTP id 6E5E6A6229; Sun, 7 Sep 2014 11:35:27 +0200 (CEST) From: Romain Naour To: buildroot@buildroot.net Date: Sun, 7 Sep 2014 11:35:17 +0200 Message-Id: <1410082517-3435-1-git-send-email-romain.naour@openwide.fr> X-Mailer: git-send-email 1.9.3 Subject: [Buildroot] [PATCH v2] package/mtd: install libubi.a and libmtd.a to staging 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 Currently, the mtd package only installs the mtd utilities into the target directory. However, the mtd-utils also provide two static libraries (libmtd.a and libubi.a) that can be used by other packages or tools. Therefore, this commit extends the mtd package by adding the installation to the staging directory of those two libraries. Signed-off-by: Romain Naour --- v2: rewrite the commit message (Thomas Petazzoni) fix coding style (Thomas Petazzoni) --- package/mtd/mtd.mk | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk index 80928b6..1d92f81 100644 --- a/package/mtd/mtd.mk +++ b/package/mtd/mtd.mk @@ -10,6 +10,8 @@ MTD_SITE = ftp://ftp.infradead.org/pub/mtd-utils MTD_LICENSE = GPLv2 MTD_LICENSE_FILES = COPYING +MTD_INSTALL_STAGING = YES + ifeq ($(BR2_PACKAGE_MTD_MKFSJFFS2),y) MTD_DEPENDENCIES = zlib lzo endif @@ -36,6 +38,7 @@ endef MKFS_JFFS2 = $(HOST_DIR)/usr/sbin/mkfs.jffs2 SUMTOOL = $(HOST_DIR)/usr/sbin/sumtool +MTD_STAGING_y = lib/libmtd.a ubi-utils/libubi.a MTD_TARGETS_$(BR2_PACKAGE_MTD_DOCFDISK) += docfdisk MTD_TARGETS_$(BR2_PACKAGE_MTD_DOC_LOADBIOS) += doc_loadbios MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASHCP) += flashcp @@ -79,16 +82,17 @@ MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIBLOCK) += ubiblock MTD_TARGETS_y += $(addprefix ubi-utils/,$(MTD_TARGETS_UBI_y)) MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSUBIFS) += mkfs.ubifs/mkfs.ubifs -# only call make if atleast a single tool is enabled -ifneq ($(MTD_TARGETS_y),) - define MTD_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \ BUILDDIR=$(@D) WITHOUT_XATTR=1 WITHOUT_LARGEFILE=1 -C $(@D) \ - $(addprefix $(@D)/,$(MTD_TARGETS_y)) + $(addprefix $(@D)/,$(MTD_TARGETS_y)) \ + $(addprefix $(@D)/,$(MTD_STAGING_y)) endef -endif +define MTD_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/lib/libmtd.a $(STAGING_DIR)/usr/lib/libmtd.a + $(INSTALL) -D -m 0755 $(@D)/ubi-utils/libubi.a $(STAGING_DIR)/usr/lib/libubi.a +endef define MTD_INSTALL_TARGET_CMDS for f in $(MTD_TARGETS_y) ; do \