From patchwork Wed Feb 6 23:10:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 218796 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id CB9962C02B1 for ; Thu, 7 Feb 2013 10:11:05 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 812EBFFCFE; Wed, 6 Feb 2013 23:10:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PZgBYvZhvg-r; Wed, 6 Feb 2013 23:10:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id BC1A6101098; Wed, 6 Feb 2013 23:10:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id C30778F7A4 for ; Wed, 6 Feb 2013 23:10:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0E557A0014 for ; Wed, 6 Feb 2013 23:10:31 +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 my1feq-Ta7V5 for ; Wed, 6 Feb 2013 23:10:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [94.23.35.102]) by hemlock.osuosl.org (Postfix) with ESMTP id E9C39A01B9 for ; Wed, 6 Feb 2013 23:10:26 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 35862825; Thu, 7 Feb 2013 00:10:24 +0100 (CET) Received: from localhost (humanoidz.org [82.247.183.72]) by mail.free-electrons.com (Postfix) with ESMTPSA id A24CB730 for ; Thu, 7 Feb 2013 00:10:23 +0100 (CET) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Thu, 7 Feb 2013 00:10:15 +0100 Message-Id: <1360192218-30930-3-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1360192218-30930-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1360192218-30930-1-git-send-email-thomas.petazzoni@free-electrons.com> Subject: [Buildroot] [PATCH 2/5] package: remove scripts listed in _CONFIG_SCRIPTS from target 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 The -config scripts are useless on the target, since they are only needed for development, so we remove them automatically. Signed-off-by: Thomas Petazzoni Acked-by: Arnout Vandecappelle (Essensium/Mind) Acked-by: "Samuel Martin" --- docs/manual/adding-packages-generic.txt | 11 ++++++++++- package/pkg-generic.mk | 5 +++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt index 13d200d..1450907 100644 --- a/docs/manual/adding-packages-generic.txt +++ b/docs/manual/adding-packages-generic.txt @@ -90,6 +90,11 @@ The argument to be given to +LIBFOO_CONFIG_SCRIPTS+ is the file name(s) of the shell script(s) needing fixing. All these names are relative to '$(STAGING_DIR)/usr/bin' and if needed multiple names can be given. +In addition, the scripts listed in +LIBFOO_CONFIG_SCRIPTS+ are removed +from +$(TARGET_DIR)/usr/bin+ if they are not needed (i.e, when the +installation of development files on the target has not been selected, +which is the default). + Example 1: Package divine installs shell script '$(STAGING_DIR)/usr/bin/divine-config'. @@ -288,7 +293,11 @@ information is (assuming the package name is +libfoo+) : * +LIBFOO_CONFIG_SCRIPTS+ lists the names of the files in '$(STAGING_DIR)/usr/bin' that need some special fixing to make them cross-compiling friendly. Multiple file names separated by space can - be given and all are relative to '$(STAGING_DIR)/usr/bin'. + be given and all are relative to '$(STAGING_DIR)/usr/bin'. The files + listed in +LIBFOO_CONFIG_SCRIPTS+ are also removed from + +$(TARGET_DIR)/usr/bin+ if they are not needed (i.e, when the + installation of development files on the target has not been + selected, which is the default). * +LIBFOO_DEVICES+ lists the device files to be created by Buildroot when using the static device table. The syntax to use is the diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 066b6c8..57b0fd0 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -153,6 +153,11 @@ $(BUILD_DIR)/%/.stamp_target_installed: $($(PKG)_INSTALL_INIT_SYSV)) $($(PKG)_INSTALL_TARGET_CMDS) $(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep)) +ifeq ($(BR2_HAVE_DEVFILES),) + $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ + $(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \ + fi +endif $(Q)touch $@ # Clean package