From patchwork Fri Feb 21 22:17:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 323057 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 0513F2C0305 for ; Sat, 22 Feb 2014 09:18:10 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 50837270B2; Fri, 21 Feb 2014 22:18:10 +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 lkaZW0imrkTG; Fri, 21 Feb 2014 22:18:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id EFA7732F5E; Fri, 21 Feb 2014 22:18:02 +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 13C291BF862 for ; Fri, 21 Feb 2014 22:18:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 115BD93D53 for ; Fri, 21 Feb 2014 22:18:00 +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 xDWNmSe5Gr+I for ; Fri, 21 Feb 2014 22:17:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by hemlock.osuosl.org (Postfix) with ESMTPS id AFC7893D48 for ; Fri, 21 Feb 2014 22:17:57 +0000 (UTC) Received: by mail-wg0-f53.google.com with SMTP id x12so3010642wgg.20 for ; Fri, 21 Feb 2014 14:17:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=cS9wnP/deoFC7t2GM/TeGgiB1+dGQBGBaXXsHi6UAFs=; b=cWdzhQJ+GQlmL8xOG2fbB9EkLWaXAwl3Df3UTX6znWyKraHA4TEuysmJlgETyG6cNM logYwuvJZ+N+Rvt86O2kqI49+KOO78GbE3iAf/08M89HrSuwtdCvzC/7I+t5buZWipSt f+tasvYu6s497WKQjEV687IzxTCaZtdp6hIu9hv+7SUsgMcOB0r6WyXwxQbEE5Jw8+SX k1O6d7FHhZkvP6YNLwzsYqqWnEtNhu0mlxD/O5rSD+zmefh2CxmDQPqQrkUVbJ9ioaUf VJ4FsTuKGwHMpTxwHbGbbjTWqConL8D/hv0nzbO17ayP4WomPInR1oRhLIkywI4wdhVH KeLQ== X-Received: by 10.194.185.113 with SMTP id fb17mr9139224wjc.29.1393021076261; Fri, 21 Feb 2014 14:17:56 -0800 (PST) Received: from gourin.bzh.lan (ks3095497.kimsufi.com. [94.23.60.27]) by mx.google.com with ESMTPSA id ha1sm20165416wjc.23.2014.02.21.14.17.55 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Feb 2014 14:17:55 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Fri, 21 Feb 2014 23:17:52 +0100 Message-Id: X-Mailer: git-send-email 1.8.1.2 In-Reply-To: References: MIME-Version: 1.0 Cc: "Yann E. MORIN" , Peter Korsgaard Subject: [Buildroot] [PATCH 1/3] Makefile: internally use absolute paths to BR2_EXTERNAL 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: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: "Yann E. MORIN" Using a relative path for BR2_EXTERNAL, and using an external defconfig, such as in (from a Buildroot top-dir): make O=.. BR2_EXTERNAL=.. foo_defconfig is broken. It is unclear why the %_defconfig rule recurses in that case. This patch internaly makes BR2_EXTERNAL canonical (ie. makes it an absolute path), and checks the directory exists. Reported-by: Jérémy Rosen Signed-off-by: "Yann E. MORIN" Cc: Peter Korsgaard Cc: Romain Naour Cc: Arnout Vandecappelle --- Changes v1->v2: - fix override BR2_EXTERNAL (Jérémy) - only one error message (Arnout) --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 98d32c0..4766160 100644 --- a/Makefile +++ b/Makefile @@ -119,6 +119,11 @@ ifeq ($(BR2_EXTERNAL),) override BR2_EXTERNAL = support/dummy-external $(shell rm -f $(BR2_EXTERNAL_FILE)) else + _BR2_EXTERNAL = $(shell cd $(BR2_EXTERNAL) >/dev/null 2>&1 && pwd) + ifeq ($(_BR2_EXTERNAL),) + $(error BR2_EXTERNAL='$(BR2_EXTERNAL)' does not exist, relatively to $(TOPDIR)) + endif + override BR2_EXTERNAL := $(_BR2_EXTERNAL) $(shell echo BR2_EXTERNAL ?= $(BR2_EXTERNAL) > $(BR2_EXTERNAL_FILE)) endif