From patchwork Thu Jan 1 20:54:38 2015 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: 424916 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id AA9301400F1 for ; Fri, 2 Jan 2015 07:54:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 83C4E32C14; Thu, 1 Jan 2015 20:54:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LJEu6OPxyO6v; Thu, 1 Jan 2015 20:54:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id B9E7625BC2; Thu, 1 Jan 2015 20:54:51 +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 A4BC91C296C for ; Thu, 1 Jan 2015 20:54:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9EBBD8ADA7 for ; Thu, 1 Jan 2015 20:54:49 +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 Ml3rH7qt6rat for ; Thu, 1 Jan 2015 20:54:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8FE828ACEE for ; Thu, 1 Jan 2015 20:54:48 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id w62so3759095wes.41 for ; Thu, 01 Jan 2015 12:54:47 -0800 (PST) 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=iBg9cXqtnQrN13IOV95wiKhbAMlBBY48qaiyfQCuYaE=; b=mOmMjApiCADJJrF1fH5d7iHMDd8uMN5q/4UWYxqvlIVMD1c0WM8fKtWnqBS0wQb/Zi AO2r+Fm6MPT71Ina/UprzsQIzeQwM8YzXz/QYK4P7Nz+YsPojAx4erTnp9KbatWtSZCu ZP7/6LU39h5gGuiOtArIeHo+NkygCy6x1Lp0bG4n6LZu1IKqdwx1aNQVK33s7tRK90Nv GefHMo1TfrK9RHxVhyXZMYVm68h6JkGfuqsSUDRkn6d2fooavfiQsFoLAceD/QmXe2sb pOKqvWQD2hlLHNqTMIHBN3MBIiTJ8HrhnElj2V+8LcG3mgH5POHSq1SZzuCvTZghE/rQ JudA== X-Received: by 10.194.90.229 with SMTP id bz5mr31516053wjb.63.1420145687236; Thu, 01 Jan 2015 12:54:47 -0800 (PST) Received: from localhost (cm-84.208.241.218.getinternet.no. [84.208.241.218]) by mx.google.com with ESMTPSA id b10sm51877850wiw.9.2015.01.01.12.54.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jan 2015 12:54:46 -0800 (PST) From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= To: buildroot@buildroot.org Date: Thu, 1 Jan 2015 21:54:38 +0100 Message-Id: <1420145678-11134-3-git-send-email-bjorn.forsman@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1420145678-11134-1-git-send-email-bjorn.forsman@gmail.com> References: <1420145678-11134-1-git-send-email-bjorn.forsman@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 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 5e0b4f2..2f1108f 100644 --- a/Makefile +++ b/Makefile @@ -264,6 +264,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 @@ -692,7 +693,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))