[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: configure cd'ing to home
From: |
Eric Blake |
Subject: |
Re: configure cd'ing to home |
Date: |
Mon, 26 Jul 2010 07:46:27 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100720 Fedora/3.1.1-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.1.1 |
On 07/26/2010 07:40 AM, Eric Blake wrote:
> cd '$(top_builddir)' && ...
>
> since "cd" will succeed but "cd ''" will fail, but that still doesn't
> explain the root cause for $(top_builddir) not expanding correctly.
Scratch that - bash 4.1, zsh, and dash all share the same bug:
$ bash -c 'cd ""'; echo $?
0
ksh93 is even worse - it changes to the home directory anyways.
Of all the shells I tested, _only_ Solaris /bin/sh errored out!
$ cd /tmp
$ /bin/sh -c 'cd ""; echo $?; pwd'
/bin/sh: null directory
$ echo $?
1
Looks like a gotcha to document in the autoconf manual.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature