From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Maydell Subject: Re: [RFC kvm-unit-tests PATCH 1/8] configure: make it run-able from outside source tree Date: Fri, 7 Apr 2017 12:46:25 +0100 Message-ID: References: <20170406190727.5624-1-alex.bennee@linaro.org> <20170406190727.5624-2-alex.bennee@linaro.org> <20170407114053.powj76325kjseqek@kamzik.brq.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: =?UTF-8?B?QWxleCBCZW5uw6ll?= , kvm-devel , Marc Zyngier , arm-mail-list , Paolo Bonzini , "kvmarm@lists.cs.columbia.edu" To: Andrew Jones Return-path: Received: from mail-wr0-f179.google.com ([209.85.128.179]:35977 "EHLO mail-wr0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752971AbdDGLqr (ORCPT ); Fri, 7 Apr 2017 07:46:47 -0400 Received: by mail-wr0-f179.google.com with SMTP id c55so30230294wrc.3 for ; Fri, 07 Apr 2017 04:46:47 -0700 (PDT) In-Reply-To: <20170407114053.powj76325kjseqek@kamzik.brq.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 7 April 2017 at 12:40, Andrew Jones wrote: > On Thu, Apr 06, 2017 at 08:07:20PM +0100, Alex Benn=C3=A9e wrote: >> diff --git a/configure b/configure >> index 8821f37..223809c 100755 >> --- a/configure >> +++ b/configure >> @@ -1,5 +1,6 @@ >> #!/bin/bash >> >> +srcdir=3D$(cd "$(dirname "$0")"; pwd) > > Why not just $(dirname "$0")? Any reason the path can't > be relative? Also, could use realpath vs. the cd/pwd. Having srcdir be maybe relative and maybe absolute seems like a recipe for confusion later on to me -- much better for it to always be an absolute path, I think. (Compare how QEMU's configure is careful to absolutize the source_path variable.) realpath isn't portable (not on OSX, for instance). thanks -- PMM From mboxrd@z Thu Jan 1 00:00:00 1970 From: peter.maydell@linaro.org (Peter Maydell) Date: Fri, 7 Apr 2017 12:46:25 +0100 Subject: [RFC kvm-unit-tests PATCH 1/8] configure: make it run-able from outside source tree In-Reply-To: <20170407114053.powj76325kjseqek@kamzik.brq.redhat.com> References: <20170406190727.5624-1-alex.bennee@linaro.org> <20170406190727.5624-2-alex.bennee@linaro.org> <20170407114053.powj76325kjseqek@kamzik.brq.redhat.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 7 April 2017 at 12:40, Andrew Jones wrote: > On Thu, Apr 06, 2017 at 08:07:20PM +0100, Alex Benn?e wrote: >> diff --git a/configure b/configure >> index 8821f37..223809c 100755 >> --- a/configure >> +++ b/configure >> @@ -1,5 +1,6 @@ >> #!/bin/bash >> >> +srcdir=$(cd "$(dirname "$0")"; pwd) > > Why not just $(dirname "$0")? Any reason the path can't > be relative? Also, could use realpath vs. the cd/pwd. Having srcdir be maybe relative and maybe absolute seems like a recipe for confusion later on to me -- much better for it to always be an absolute path, I think. (Compare how QEMU's configure is careful to absolutize the source_path variable.) realpath isn't portable (not on OSX, for instance). thanks -- PMM