From patchwork Thu Jan 30 20:38:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Martin X-Patchwork-Id: 315446 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 20F042C0257 for ; Fri, 31 Jan 2014 07:38:38 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5F011EB9B; Thu, 30 Jan 2014 20:38:37 +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 ooY5AP9pW47o; Thu, 30 Jan 2014 20:38:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id AF4C4EB10; Thu, 30 Jan 2014 20:38:34 +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 1C4321BF9F1 for ; Thu, 30 Jan 2014 20:38:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1D81C90F5A for ; Thu, 30 Jan 2014 20:38:33 +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 8Y9hfeokEtLA for ; Thu, 30 Jan 2014 20:38:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4F77190F66 for ; Thu, 30 Jan 2014 20:38:32 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id m15so7369497wgh.14 for ; Thu, 30 Jan 2014 12:38:30 -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; bh=8Z/lqjy5iXgIukGAL9O2sYxTi1t8TXmRoyGkeYNvOiU=; b=RmBpQAWCUNvt3oghaQN1dA2AopwHrwtEQXabdltFtZo1xtMmNfhKdNMJE6HS2hkn1p QDaZjJUn0FS1dtb01eJbAWrrZqq/JC/YpTPTOvE1Kf3JTkF+TyD/9s8AGC1Y1Nze2w3c Ke90pekwjae98up0HBHXF0/keaewIKEll0hFCPcM231rob7VcfY5lw0Xb1xjTSA2ggd0 rjFt7MqpDr1cfOIwgVhCWuE8Q6v0GwvtTZeZe5oIc+amrOHegbYGWj3HNB/PEQYReexn nx9XxrUXDyabs5ZC2ichNcGRbmvgboiRA1iYREpO5mIgq2X6/Bfk+DGdcpwhzQ8YMTe3 ZjcQ== X-Received: by 10.194.81.196 with SMTP id c4mr2715494wjy.57.1391114310423; Thu, 30 Jan 2014 12:38:30 -0800 (PST) Received: from smartin-de.aldebaran.lan ([46.218.232.202]) by mx.google.com with ESMTPSA id w1sm700268wix.1.2014.01.30.12.38.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Jan 2014 12:38:29 -0800 (PST) From: Samuel Martin To: buildroot@busybox.net Date: Thu, 30 Jan 2014 21:38:48 +0100 Message-Id: <1391114333-28001-2-git-send-email-s.martin49@gmail.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1391114333-28001-1-git-send-email-s.martin49@gmail.com> References: <1391114333-28001-1-git-send-email-s.martin49@gmail.com> Subject: [Buildroot] [PATCH v3 1/6] Makefile: introduce BR2_PATH 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 Since the HOST_PATH and TARGET_PATH variables almost contain the same things, let's factorize this in a single BR2_PATH. Signed-off-by: Samuel Martin --- changes v2 -> v3: - rebase changes v1 -> v2: - rebase --- Makefile | 3 +++ package/Makefile.in | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dc57cf4..0d638ce 100644 --- a/Makefile +++ b/Makefile @@ -305,6 +305,9 @@ TAR_OPTIONS=$(call qstrip,$(BR2_TAR_OPTIONS)) -xf # packages compiled for the host go here HOST_DIR:=$(call qstrip,$(BR2_HOST_DIR)) +# Set BR2_PATH (including host bindirs) +BR2_PATH:="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)" + # locales to generate GENERATE_LOCALE=$(call qstrip,$(BR2_GENERATE_LOCALE)) diff --git a/package/Makefile.in b/package/Makefile.in index 2e433fd..a940f54 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -145,7 +145,7 @@ TARGET_CROSS=$(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX)) endif # Quotes are needed for spaces et al in path components. -TARGET_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)" +TARGET_PATH = $(BR2_PATH) # Define TARGET_xx variables for all common binutils/gcc TARGET_AR = $(TARGET_CROSS)ar @@ -200,7 +200,7 @@ HOST_CFLAGS ?= -O2 HOST_CFLAGS += $(HOST_CPPFLAGS) HOST_CXXFLAGS += $(HOST_CFLAGS) HOST_LDFLAGS += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib -HOST_PATH=$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(PATH) +HOST_PATH = $(BR2_PATH) # hostcc version as an integer - E.G. 4.3.2 => 432 HOSTCC_VERSION:=$(shell $(HOSTCC_NOCCACHE) --version | \