From patchwork Fri Jan 2 23:58:47 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: 425074 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id D58E31400DD for ; Sat, 3 Jan 2015 10:59:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E75AA861CD; Fri, 2 Jan 2015 23:59:04 +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 OT9VSpPiV04S; Fri, 2 Jan 2015 23:59:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D104F8678C; Fri, 2 Jan 2015 23:59:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 2CA211C279D for ; Fri, 2 Jan 2015 23:59:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 24EE4274E4 for ; Fri, 2 Jan 2015 23:59:00 +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 WplHqSsd0GyY for ; Fri, 2 Jan 2015 23:58:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by silver.osuosl.org (Postfix) with ESMTPS id 1324726D5B for ; Fri, 2 Jan 2015 23:58:58 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id x13so24942666wgg.33 for ; Fri, 02 Jan 2015 15:58:56 -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=it4b4LNxzgMIO1nINwk/h2tcP4AOMJ3uuZHkjkbXmeY=; b=OePI8eMx91RMJrne3nIjEnjY/78JmaY7GuygALpUw4sOxV0sqMzuCnnotTaeB16bBZ 0kjd8UGevjdyqPE/vmnwkqtFl8CU5numR7dSmR36ky1JzQCgBYQJZU5EjqZIXey4/mVh 3hnALqcAQlo7LoUsEsAPRkINxqey4cnHMUJdtqteM1Qns8pfZsR+i+miyjP5pS29+ruM 6MB/vxJPcELgHGT5yHCBHa7nxPMiVq5HK+aWB8nlxM7uq2AvGtRMW2BxM2iqGEoTWRuS YKvW7TpXCoCzohdvHkxhYueSACaVYJY8CbwwP+edEP9f+1Yc7F+A5iqqisa4HPpUjcBP MZHQ== X-Received: by 10.180.97.7 with SMTP id dw7mr2395953wib.6.1420243136758; Fri, 02 Jan 2015 15:58:56 -0800 (PST) Received: from localhost (cm-84.208.241.218.getinternet.no. [84.208.241.218]) by mx.google.com with ESMTPSA id je12sm776834wic.22.2015.01.02.15.58.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jan 2015 15:58:56 -0800 (PST) From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= To: buildroot@buildroot.org Date: Sat, 3 Jan 2015 00:58:47 +0100 Message-Id: <1420243128-7708-2-git-send-email-bjorn.forsman@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1420243128-7708-1-git-send-email-bjorn.forsman@gmail.com> References: <1420243128-7708-1-git-send-email-bjorn.forsman@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 1/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. (PKG_CONFIG_PATH has to be placed in front of the make command so that it propagates to sub-processes. If given as an argument, it doesn't work.) Signed-off-by: Bjørn Forsman Acked-by: "Yann E. MORIN" --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5e0b4f2..0112853 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 +HOST_PKG_CONFIG_PATH := $(PKG_CONFIG_PATH) unexport PKG_CONFIG_PATH unexport PKG_CONFIG_SYSROOT_DIR unexport PKG_CONFIG_LIBDIR @@ -692,7 +693,8 @@ 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) + 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))