[RFC kvm-unit-tests PATCH 1/8] configure: make it run-able from outside source tree
Peter Maydell
peter.maydell at linaro.org
Fri Apr 7 07:46:25 EDT 2017
On 7 April 2017 at 12:40, Andrew Jones <drjones at redhat.com> 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
More information about the linux-arm-kernel
mailing list