From patchwork Fri Sep 30 10:09:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 676949 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3slnHk74bFz9s1h for ; Fri, 30 Sep 2016 20:10:10 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 901A495535; Fri, 30 Sep 2016 10:10:07 +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 Zigk+t4SAr4L; Fri, 30 Sep 2016 10:10:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id DFE079552F; Fri, 30 Sep 2016 10:10:06 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D6B5B1C1774 for ; Fri, 30 Sep 2016 10:10:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CDF379217F for ; Fri, 30 Sep 2016 10:10:01 +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 P3fVayTT0W3I for ; Fri, 30 Sep 2016 10:09:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from lupi.sysmic.org (sysmic.org [62.210.89.17]) by whitealder.osuosl.org (Postfix) with ESMTPS id 14CEB91F93 for ; Fri, 30 Sep 2016 10:09:59 +0000 (UTC) Received: from lupi.online.net (sysmic.org [62.210.89.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jezz) by lupi.sysmic.org (Postfix) with ESMTPSA id 235F9444C7; Fri, 30 Sep 2016 12:09:57 +0200 (CEST) From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= To: buildroot@busybox.net Date: Fri, 30 Sep 2016 12:09:54 +0200 Message-Id: <1475230194-18524-3-git-send-email-jezz@sysmic.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1475230194-18524-1-git-send-email-jezz@sysmic.org> References: <1475230194-18524-1-git-send-email-jezz@sysmic.org> MIME-Version: 1.0 Cc: =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [Buildroot] [PATCH 2/2] Canonicalize $(BASE_DIR) 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" If compilation path contains symlinks, $(*_DIR) variables does not contains same values depending if user run 'make O=out' or 'make -C out'. This patch always canonicalize $(BASE_DIR) to avoid this problem. Signed-off-by: Jérôme Pouiller --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5e4daef..5c907e5 100644 --- a/Makefile +++ b/Makefile @@ -136,7 +136,7 @@ endif # line doesn't affect the environment of $(shell ..) calls, so # explictly throw away any output from 'cd' here. export CDPATH := -BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && pwd) +BASE_DIR := $(shell mkdir -p $(O) && cd $(O) >/dev/null && readlink -m .) $(if $(BASE_DIR),, $(error output directory "$(O)" does not exist))