From patchwork Fri Jul 18 21:02:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 371719 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 EF6E814010C for ; Sat, 19 Jul 2014 07:02:43 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E6AF38B538; Fri, 18 Jul 2014 21:02:42 +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 Qw7J9nnh-qVH; Fri, 18 Jul 2014 21:02:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6EE878B1F8; Fri, 18 Jul 2014 21:02:40 +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 352A71C1E96 for ; Fri, 18 Jul 2014 21:02:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3039A8A4CA for ; Fri, 18 Jul 2014 21:02:39 +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 XoKsdIDj4D2B for ; Fri, 18 Jul 2014 21:02:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by hemlock.osuosl.org (Postfix) with ESMTPS id DC4C789CA8 for ; Fri, 18 Jul 2014 21:02:37 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id bs8so1484457wib.15 for ; Fri, 18 Jul 2014 14:02:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=medcZ0T57nZ9uyNuaeVlW5SYKixNg2XNAwaowwKjWoo=; b=O9SCyGO+Ox9oVBpsJUpSVpskIBIu2vrpt5iw4e5FjOVDj/+LJV0rOBTgHEob3FcH6i xW31fp8QVGSYnu88Nj7o2xmTaK1rHJRW8PlsEssWR5qyMcnd6oaiqMCUI6B5IIDoa1Zg cibxKz2tQ/khknyZzurjwbStkYSyp1h099YasX6vPSq95pKOk28bC2gsPKCAcKp5sVuo ay/F2oPgjcxMU1rcZYUWfVbEOWt79PS4jur6ug7jHehOUJadK6y42/hlp388B8/vi8LA M8Kp3cL8R2UQMSCzAIcJLs0+DeMxTm2GN4NKodvTcE/lIXcFSK3V5HVrUV7zOed7O86q KeJA== X-Received: by 10.180.21.235 with SMTP id y11mr11009465wie.75.1405717356423; Fri, 18 Jul 2014 14:02:36 -0700 (PDT) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id 10sm16860129wjr.22.2014.07.18.14.02.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Jul 2014 14:02:35 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Fri, 18 Jul 2014 23:02:31 +0200 Message-Id: <1405717351-3820-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 1.9.1 Cc: Thomas Petazzoni , "Yann E. MORIN" Subject: [Buildroot] [PATCH v3] infra/pkg-autotools: cleanup the gettextize step 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 Align the way we call gettextize to the way we call autoreconf: - provide the $(GETTEXTIZE) variable - pass $(HOST_CONFIGURE_OPTS) in the environment - pass the fully-qualified path to autom4te - use of -f even if the package provides its own options Some eye-candy in the output of gettextize. Thanks to Gustavo for pointing out the discrepancy between the way we call gettextize and the way we call autoreconf, and to Thomas for the live debug session. ;-) Signed-off-by: "Yann E. MORIN" Cc: Gustavo Zacarias Cc: Thomas Petazzoni Cc: Thomas De Schampheleire --- Changes v2 -> v3; - fix typo s/autm4te/autom4te/ Changes v1 -> v2: - fix typoes (Thomas DS) - pass AUTOM4TE in the environment --- package/gettext/gettext.mk | 8 ++++++++ package/pkg-autotools.mk | 10 +++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk index c8ef765..121d25d 100644 --- a/package/gettext/gettext.mk +++ b/package/gettext/gettext.mk @@ -57,6 +57,12 @@ endef GETTEXT_POST_INSTALL_TARGET_HOOKS += GETTEXT_REMOVE_UNNEEDED +define GETTEXT_GETTEXTIZE_EYE_CANDY + $(SED) '/Press Return\|read dummy/d' $(HOST_DIR)/usr/bin/gettextize +endef + +HOST_GETTEXT_POST_INSTALL_HOOKS += GETTEXT_GETTEXTIZE_EYE_CANDY + # Force build with NLS support, otherwise libintl is not built # This is needed because some packages (eg. libglib2) requires # locales, but do not properly depend on BR2_ENABLE_LOCALE, and @@ -72,5 +78,7 @@ define HOST_GETTEXT_GETTEXTIZE_CONFIRMATION endef HOST_GETTEXT_POST_INSTALL_HOOKS += HOST_GETTEXT_GETTEXTIZE_CONFIRMATION +GETTEXTIZE = $(HOST_CONFIGURE_OPTS) AUTOM4TE=$(HOST_DIR)/usr/bin/autom4te $(HOST_DIR)/usr/bin/gettextize -f + $(eval $(autotools-package)) $(eval $(host-autotools-package)) diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk index 557413d..53bca30 100644 --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -95,12 +95,8 @@ ifndef $(2)_GETTEXTIZE endif endif -ifndef $(2)_GETTEXTIZE_OPT - ifdef $(3)_GETTEXTIZE_OPT - $(2)_GETTEXTIZE_OPT = $$($(3)_GETTEXTIZE_OPT) - else - $(2)_GETTEXTIZE_OPT ?= -f - endif +ifeq ($(4),host) + $(2)_GETTEXTIZE_OPT ?= $$($(3)_GETTEXTIZE_OPT) endif ifeq ($(4),host) @@ -220,7 +216,7 @@ endif # define GETTEXTIZE_HOOK @$$(call MESSAGE,"Gettextizing") - $(Q)cd $$($$(PKG)_SRCDIR) && $(HOST_DIR)/usr/bin/gettextize $$($$(PKG)_GETTEXTIZE_OPT) + $(Q)cd $$($$(PKG)_SRCDIR) && $$(GETTEXTIZE) $$($$(PKG)_GETTEXTIZE_OPT) endef #