From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-03.nifty.com ([210.131.2.82]:44672 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751966AbdJEUR6 (ORCPT ); Thu, 5 Oct 2017 16:17:58 -0400 MIME-Version: 1.0 In-Reply-To: References: <1506931648-15511-1-git-send-email-yamada.masahiro@socionext.com> From: Masahiro Yamada Date: Fri, 6 Oct 2017 05:17:01 +0900 Message-ID: Subject: Re: [PATCH] kbuild: revert $(realpath ...) to $(shell cd ... && /bin/pwd) Content-Type: text/plain; charset="UTF-8" Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Julien Grall Cc: Linux Kbuild mailing list , Linux PM mailing list , Michal Marek , David Carrillo-Cisneros , Linux Kernel Mailing List , Thomas Renninger , Josh Poimboeuf , Jiri Olsa , Arnaldo Carvalho de Melo 2017-10-02 20:27 GMT+09:00 Julien Grall : > Hello, > > On 02/10/17 09:07, Masahiro Yamada wrote: >> >> I thought commit 8e9b46679923 ("kbuild: use $(abspath ...) instead of >> $(shell cd ... && /bin/pwd)") was a safe conversion, but it changed >> the behavior. >> >> $(abspath ...) / $(realpath ...) does not expand shell special >> characters, such as '~'. >> >> Here is a simple Makefile example: >> >> ---------------->8---------------- >> $(info /bin/pwd: $(shell cd ~/; /bin/pwd)) >> $(info abspath: $(abspath ~/)) >> $(info realpath: $(realpath ~/)) >> all: >> @: >> ---------------->8---------------- >> >> $ make >> /bin/pwd: /home/masahiro >> abspath: /home/masahiro/workspace/~ >> realpath: >> >> This can be a real problem if 'make O=~/foo' is invoked from another >> Makefile or primitive shell like dash. >> >> This commit partially reverts 8e9b46679923. >> >> Fixes: 8e9b46679923 ("kbuild: use $(abspath ...) instead of $(shell cd ... >> && /bin/pwd)") >> Reported-by: Julien Grall >> Signed-off-by: Masahiro Yamada > > > Tested-by: Julien Grall Applied to linux-kbuild/fixes. -- Best Regards Masahiro Yamada