Re: configure cd'ing to home

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux