From patchwork Sun Oct 26 13:17:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Forsman?= X-Patchwork-Id: 403157 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 1961A14007D for ; Mon, 27 Oct 2014 00:17:43 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 66F9C96E6C; Sun, 26 Oct 2014 13:17:42 +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 kOBQBNuN3l9G; Sun, 26 Oct 2014 13:17:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B29D596ED7; Sun, 26 Oct 2014 13:17: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 B3FB11BFA28 for ; Sun, 26 Oct 2014 13:17:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B1D1D966C6 for ; Sun, 26 Oct 2014 13:17:37 +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 MVXp93y19Rx1 for ; Sun, 26 Oct 2014 13:17:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by hemlock.osuosl.org (Postfix) with ESMTPS id C87CA96EBF for ; Sun, 26 Oct 2014 13:17:36 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id b13so3825902wgh.34 for ; Sun, 26 Oct 2014 06:17:35 -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:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=xjMYVv36PLlrV8jNoLnTfyDCpfT5ZntNLFFeTg0nQsw=; b=y9agugGeCPQg0lPb7OedFShsilKiCpl85l6UWQe6el65dMTqx487PUqw0W0X1DJk80 trP7WMKgUTldpl252gQZpP4/qKxMNu6QyQFFRFHtOMOiXCJmHrsCEBEh6v07BaG52yNM yk9aStBBsKMZIKDv/ReztsDkAipcIxFGdVGIcHQHmcKaVBCNEY9SqtuHufxZ2xjAau6S sozlWZrRyxQeD+OxDJO19EbTICXmZZQMLwb7nnSVTB1bdKH6IALuJErDeqJs938q6ZkV 1SfarJWAxn6w7mQ1GxujZ5PU+uzPMnV5qoU6KhhFiuwvbzrJQk0AQu1DADWiaoNfq2S0 pPyA== X-Received: by 10.194.110.104 with SMTP id hz8mr16259398wjb.62.1414329455328; Sun, 26 Oct 2014 06:17:35 -0700 (PDT) Received: from localhost (cm-84.208.223.239.getinternet.no. [84.208.223.239]) by mx.google.com with ESMTPSA id p3sm11967181wjf.49.2014.10.26.06.17.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Oct 2014 06:17:34 -0700 (PDT) From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= To: buildroot@buildroot.org Date: Sun, 26 Oct 2014 14:17:26 +0100 Message-Id: <1414329446-16587-3-git-send-email-bjorn.forsman@gmail.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1414329446-16587-1-git-send-email-bjorn.forsman@gmail.com> References: <1414329446-16587-1-git-send-email-bjorn.forsman@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] Makefile: pass host PKG_CONFIG_PATH at "make menuconfig" time X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Buildroot unexports PKG_CONFIG_PATH in the top-level Makefile for purity reasons. But it has an unfortunate side-effect in that "make menuconfig" will not (necessarily) be able to pick up ncurses via host pkg-config, breaking "make menuconfig" on systems where ncurses is installed in a non-standard location. This patch saves the original PKG_CONFIG_PATH variable in HOST_PKG_CONFIG_PATH and restores the original PKG_CONFIG_PATH variable only in the sub-processes that builds the various menuconfig/nconfig/... targets. With this change, I am able to run "make menuconfig" on NixOS[1]. [1]: http://nixos.org/ Signed-off-by: Bjørn Forsman --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 907a0fc..afabaf7 100644 --- a/Makefile +++ b/Makefile @@ -263,6 +263,7 @@ export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTFC HOSTLD export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE # Make sure pkg-config doesn't look outside the buildroot tree +export HOST_PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) unexport PKG_CONFIG_PATH unexport PKG_CONFIG_SYSROOT_DIR unexport PKG_CONFIG_LIBDIR @@ -691,7 +692,10 @@ export HOSTCFLAGS $(BUILD_DIR)/buildroot-config/%onf: mkdir -p $(@D)/lxdialog - $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F) + (export PKG_CONFIG_PATH=$(HOST_PKG_CONFIG_PATH); \ + $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" \ + obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F) \ + ) DEFCONFIG = $(call qstrip,$(BR2_DEFCONFIG))