From patchwork Fri Jul 18 09:12:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rick Taylor X-Patchwork-Id: 371377 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 C71C41400AF for ; Fri, 18 Jul 2014 19:12:57 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1378B896C7; Fri, 18 Jul 2014 09:12:57 +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 EVw-KLMGYBMb; Fri, 18 Jul 2014 09:12:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 51D17896F2; Fri, 18 Jul 2014 09:12:52 +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 64C271C2456 for ; Fri, 18 Jul 2014 09:12:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5EA1A8B8EC for ; Fri, 18 Jul 2014 09:12:51 +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 LtK5KE1hsrh4 for ; Fri, 18 Jul 2014 09:12:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5DCD18B8DD for ; Fri, 18 Jul 2014 09:12:47 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id l18so3180552wgh.2 for ; Fri, 18 Jul 2014 02:12:45 -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; bh=MXYOqOtVBDS8m9y8d5WR5ZICMt3J3LPAArm2FAzPZ6M=; b=aoNvweYuNzxk7EDLa/mneZX61FaS5/6b9dnZNLrteGZbYhlPO7xVd1NOq4LK2D4CDy khIpNgagmh9pmXX6IuCaCdnpAgmU46EXu2kH/2vvJKaEoyEWxjxax/nzFtbqeD5MZClV EICidtqU4R7EAD4Krsz0+kj5pTOs3ZeFyUrCIa1lYln3/MiS1LSmE3YIp82nwtYN7S9J OUx4BGILyU0M/STzxbVLlkRkqK+/knzOW6e7fxYJQsAD05gz5Er/L95nTRZ3qaYlYasd yh8VvhiLAnEwnp5QfZ13qWl2lScrYl6StbpcOH3UG9PVT7B1gx2F1If42vhGVnLKvaNs 8nPw== X-Received: by 10.180.94.166 with SMTP id dd6mr5473146wib.33.1405674765023; Fri, 18 Jul 2014 02:12:45 -0700 (PDT) Received: from desktop1.mipn.cassidian.com ([217.158.48.187]) by mx.google.com with ESMTPSA id fu7sm4534550wib.2.2014.07.18.02.12.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Jul 2014 02:12:44 -0700 (PDT) From: Rick Taylor X-Google-Original-From: Rick Taylor To: buildroot@busybox.net Date: Fri, 18 Jul 2014 10:12:19 +0100 Message-Id: <1405674739-17167-1-git-send-email-rick.taylor@cassidian.com> X-Mailer: git-send-email 1.9.1 Cc: Rick Taylor Subject: [Buildroot] [PATCH 1/1] pkg-autotools: add support for _AUTORECONF_ENV 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 This commit improves the autotools-package infrastructure to support a _AUTORECONF_ENV variable, which allows a package maintainer to pass additional variables in the environment of the autoreconf execution. This is useful in the situation where configure.ac contains shell commands using environment variables that are only executed when autoreconf is run. Signed-off-by: Rick Taylor Reviewed-by: "Yann E. MORIN" --- docs/manual/adding-packages-autotools.txt | 5 +++++ package/pkg-autotools.mk | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/manual/adding-packages-autotools.txt b/docs/manual/adding-packages-autotools.txt index 3f40503..4329ca7 100644 --- a/docs/manual/adding-packages-autotools.txt +++ b/docs/manual/adding-packages-autotools.txt @@ -121,6 +121,11 @@ cases, typical packages will therefore only use a few of them. automake, libtool, etc.). Valid values are +YES+ and +NO+. By default, the value is +NO+ +* +LIBFOO_AUTORECONF_ENV+, to specify additional environment + variables to pass to the 'autoreconf' program if + +LIBFOO_AUTORECONF=YES+. These are passed in the environment of + the 'autoreconf' command. By default, empty. + * +LIBFOO_AUTORECONF_OPT+ to specify additional options passed to the 'autoreconf' program if +LIBFOO_AUTORECONF=YES+. By default, empty. diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk index 557413d..255c42d 100644 --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -228,7 +228,7 @@ endef # define AUTORECONF_HOOK @$$(call MESSAGE,"Autoreconfiguring") - $$(Q)cd $$($$(PKG)_SRCDIR) && $$(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT) + $$(Q)cd $$($$(PKG)_SRCDIR) && $$($$(PKG)_AUTORECONF_ENV) $$(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT) $$(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES"; then \ for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \ ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \