From patchwork Sun Sep 2 15:43:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 181198 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 64AD62C008E for ; Mon, 3 Sep 2012 01:46:37 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 980611018CE; Sun, 2 Sep 2012 15:46:35 +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 nLYv2UcDQveK; Sun, 2 Sep 2012 15:46:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 46E07101A12; Sun, 2 Sep 2012 15:44:26 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 0407F8F75B for ; Sun, 2 Sep 2012 15:44:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 89E2B10172D for ; Sun, 2 Sep 2012 15:44:09 +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 gmI2iCjUUYAB for ; Sun, 2 Sep 2012 15:44:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.smtpout.orange.fr (smtp05.smtpout.orange.fr [80.12.242.127]) by fraxinus.osuosl.org (Postfix) with ESMTP id E96D410183D for ; Sun, 2 Sep 2012 15:44:02 +0000 (UTC) Received: from treguer.bzh.lan ([90.32.144.8]) by mwinf5d40 with ME id uFjx1j00E0B56Sa03Fk1JM; Sun, 02 Sep 2012 17:44:01 +0200 From: "Yann E. MORIN" To: buildroot@busybox.net Date: Sun, 2 Sep 2012 17:43:53 +0200 Message-Id: <1346600635-30946-11-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1346600635-30946-1-git-send-email-yann.morin.1998@free.fr> References: <1346600635-30946-1-git-send-email-yann.morin.1998@free.fr> Cc: Thomas Petazzoni , Maxime Ripard , "Yann E. MORIN" Subject: [Buildroot] [PATCH 10/12] pkg-infra: ensure gettext gets built before all other packages 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 If the gettext package is selected, it means that the toolchain does not provide gettext functionality, and that at least one package needs it. Thus, the gettext package needs to be built before any such package. So far, packages that need gettext declare an explicit conditional build-dependency upon gettext, thus ensuring that gettext be built before they are. But if gettext was built first, packages would no longer need to declare such an explicit build-dependency. As it is not easy to ensure that gettext be the first package, we can also declare it as a dependency of all packages (except itself, of course). Signed-off-by: "Yann E. MORIN" --- package/pkg-generic.mk | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index ffe7dfb..b731ff0 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -367,7 +367,8 @@ $(1)-patch: $(1)-extract $$($(2)_TARGET_PATCH) $(1)-extract: $(1)-source \ $$($(2)_TARGET_EXTRACT) -$(1)-depends: $$($(2)_DEPENDENCIES) +$(1)-depends: $(filter-out $(1),$(if $(BR2_PACKAGE_GETTEXT),gettext)) \ + $$($(2)_DEPENDENCIES) $(1)-source: $$($(2)_TARGET_SOURCE) else @@ -378,7 +379,9 @@ else $(1)-configure: $(1)-depends \ $$($(2)_TARGET_CONFIGURE) -$(1)-depends: $(1)-rsync $$($(2)_DEPENDENCIES) +$(1)-depends: $(1)-rsync \ + $(filter-out $(1),$(if $(BR2_PACKAGE_GETTEXT),gettext)) \ + $$($(2)_DEPENDENCIES) $(1)-rsync: $$($(2)_TARGET_RSYNC) @@ -386,7 +389,7 @@ $(1)-source: $$($(2)_TARGET_RSYNC_SOURCE) endif $(1)-show-depends: - @echo $$($(2)_DEPENDENCIES) + @echo $(filter-out $(1),$(if $(BR2_PACKAGE_GETTEXT),gettext)) $$($(2)_DEPENDENCIES) $(1)-uninstall: $(1)-configure $$($(2)_TARGET_UNINSTALL)